chore(deps): update dependency @nubjs/nub to v0.9.1 - #197
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.9.0→0.9.1Release Notes
nubjs/nub (@nubjs/nub)
v0.9.1: Nub 0.9.1Compare Source
Nub now sizes libuv's threadpool to the cores of the machine on every augmented run, takes a
prefixcommand innub.jsonc, runsnpm ciandnpm installon its own engine behind an opt-in shim, and accepts more of the npm lockfiles and projects thatnpm ciaccepts.Runtime
Threadpool sized to the machine
Node hands async
fs,dns.lookup, asynczlibandcryptocalls, and native addons such asbcryptandsharp, to a pool of four threads whatever the core count. Nub now sets the size when it starts Node, on every launcher: the file run,nub run,nubx,nub watchand lifecycle scripts.The preload removes Nub's own value from
process.envonce the pool exists, so aclusterworker orchild_processspawn gets Node's default; a child that runs throughnubis sized again. On Linux the threads beyond four are reniced to 10 after the pool is built, and on the compat tier (Node 18.19–22.14) a--requiresidecar builds the pool so the demoted set is exact. A bcrypt route on a 16-vCPU box went from 18 to 66 requests per second under autocannon at 64 connections, mean of three rounds (benchmark); routes that use the pool lightly are within noise of plain Node. The Threadpool page documents the behavior. (#919)A
prefixcommand innub.jsoncA project can put a command in front of everything Nub runs for it: a file run, a
package.jsonscript, andnub watch.{ "prefix": "dotenvx run --" // split like a shell; the array form takes exact arguments }A script is wrapped as a whole, so a script that starts no Node process still runs behind the prefix. The program resolves from the project's
node_modules/.binchain, thenPATH; a path form anchors to the file that set it. A nestednub run, or a wrapper written in Node, does not wrap the same project again. Thenubx,nub dlxandnodeshim entrypoints do not take it, and compat mode runs without it. The field is in the config reference and the JSON schema. (#915)AsyncContextFrame on Node 22.9–23.x
Nub passes
--experimental-async-context-frameon Node 22.9 through 23.x, the band where the flag exists and does not throw. Node 24 made thatAsyncLocalStorageimplementation the default; on the 22 line it roughly halves the cost of carrying a store acrossawait, which tracing SDKs and request-context plugins pay on every request. (#912)Memory-constrained launches
On Linux x64, a direct Node launch inside a cgroup memory budget starts the main isolate with a 16 MiB V8 semi-space on two measured releases: Node 22.23.2 in a 512 MiB–1 GiB budget and Node 24.20.0 at 512 MiB. The flag is hidden from
process.execArgv, Workers keep their ownresourceLimits, and the tuning stands down when Node options, preloads,NODE_OPTIONS, PnP, aprefix, or an environment loader own startup. Other releases, larger budgets, budgets below 512 MiB, watch mode, and compiled executables keep Node's defaults. (#917)User loader hooks layered above Nub's
Running
tsx script.tsundernub run, or apreparescript that does, failed withrequire is not defined in ES module scope. Nub's load results now carryresponseURL, both tiers step aside when an outer resolve hook labels a.tsfile with a barecommonjs/moduleformat, and arequire.extensionshandler that is already registered stays in charge of its extension. (#920)Package manager
npm installs on Nub's engine
One opt-in routes the two npm verbs an install pipeline runs through Nub's engine:
With the marker set, a bare
npm ciin a project with apackage-lock.jsonrunsnub ci, and a barenpm installrunsnub install, both from the same lockfile. Everything else reaches the real npm as typed, including an install that names a package or carries a flag Nub does not translate. Lifecycle scripts run as npm runs them, withNODE_ENV=productionwhen dev dependencies are omitted andignore-scriptshonored from.npmrcand the environment. The engine also runs afile:directory dependency's lifecycle scripts in the link target on an npm-lockfile install, as npm does. The--no-route-installsflag turns the routing off. (#925, docs)npm lockfile compatibility
Frozen-installing popular npm projects under Nub found refusals of lockfiles npm itself wrote.
manifest adds <peer>node_modulesbefore the rootlinktarget with noversion, as npm writes for a name-only local package, parsesCannot find package; alinkinsidenode_modulespointing back at a registry package above it was taken for a local package and never fetched. A lockfile npm wrote for a project with an auto-installed peer now round-trips byte-identical.ERR_NUB_OUTDATED_LOCKFILE; each declaration is compared against its own rowpatchedDependencieskey such asname@github:owner/repo#shamatches by resolved identity instead of failingERR_NUB_PATCH_NON_SEMVER_RANGE; pnpm-origin declarations keep pnpm's semver-only grammarInstalls and lifecycle scripts
extendstarget is a devDependency the install is about to provide; only a run that executes the program keeps the fatal gatenode_modules/.binonPATH, out to the filesystem root, as npm's run-script doespreinstallthat runsnode-gyp installno longer exits 127electronandvscodeare injected by their host process and no install can supply them, so a reference to one is host-provided rather than a phantom. A package such aselectron-logstays in the shared store.CLI and documentation
nub agent docscommand prints usage and the table of contents instead of the overview page;--listprints the contents alone and--pageselects a page (#930).@nubjs/extensionsdatabase, with ready-to-use configuration for pnpm and Yarn (5297d2f).7319aa6,d077198,8375a03,11a435e,f231db0,b0a711b,afa009f).AsyncLocalStorageentry on the modern APIs page, and a memory-constrained launches section on the runtime overview (#919, #912, #917).nodeExecutablepath, with the Windows spelling (5da9a60).setup-nubbeside a keptactions/setup-nodestep (12c2854).56175e8), and a blog post's right-gutter table of contents now shows from thelgbreakpoint (0ede70a).Testing & internals
ac4fa4f).quic/tests. The homepage and README figures are regenerated: Nub passes 98.4% of the 4,690 tests Node 26.7 runs and passes (#931).nubcall fromcmd.exethrough npm'snub.cmdshim against the hardlinkednub.exe, with its first saved run (e5fa958,1b8e7ef).tests/bench/runtime/: threadpool, AsyncContextFrame, pool-bound routes (bcrypt, scrypt, pbkdf2, sharp, gzip, brotli, RSA keygen) and pool-priority beside busy co-tenants, with saved runs on 8, 16 and 22 vCPU (9134538,96f7a14,a33bc4c,b058f75,746c47c,e88ce4f,ab890a2,d4d9e8f,92c348e,250372c,d3d8a38,78a0225).c05a354,056fa95,a71d9e3,2e18646,0e10604,5a8a8b5,9654c1b).publish-npmopen until every one of the ten packages answers a registry read, so the Docker and install jobs no longer race a package the registry has not served yet (3f87d09).cilabel, andci-watchrequires theCI gateaggregate before a green verdict (5c0b233,291af85).__NUB_DOCS_KEYso it counts as internal plumbing under the brand-boundary test (#921).rustcwrapper keeps stdin, so a build-script feature probe fails on stable as it should (fa34f36).c25bc82,2b9a448).fd626cc).--use-system-cais not free on a populated macOS keychain (88a0167,d3bf766).What's Changed
nub pm shim --route-installsby @colinhacks in #925Full Changelog: nubjs/nub@v0.9.0...v0.9.1
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.