github nubjs/nub v0.9.2
Nub 0.9.2

4 hours ago

The standalone loader package is renamed to @nubjs/runner and gains nubr, a command that runs a TypeScript file, a package.json script, or an installed bin.

Important

The standalone loader package moved. @nubjs/loader and its eight platform packages are now @nubjs/runner and @nubjs/runner-*. The old packages stay on the registry at 0.9.1 and stop receiving updates, so switch the dependency and any --import flag over:

-npm install --save-dev @nubjs/loader
+npm install --save-dev @nubjs/runner
-node --import @nubjs/loader app.ts
+node --import @nubjs/runner app.ts

Nothing else about the preload changed — the entry points, the hooks and the resolution behavior are the same.

The unified runner

The package now ships a command as well as a preload. One name covers the three things the full CLI splits across nub <file>, nub run and nubx, because a package with a single bin has to unify them:

nubr app.ts        # a file
nubr build         # a package.json script
nubr vitest run    # an installed node_modules/.bin entry

Names resolve most-specific-first — a file, then a script, then a bin. A script wins over a bin of the same name, matching npm, because a script usually wraps the bin it is named after.

Scripts run through the same shell npm uses, with node_modules/.bin on the path and pre/post hooks honored. A file run re-execs Node with --import rather than arming the hooks in-process, so the command is identical to the documented preload form by construction. (#840, 04929a4b9b)

Package manager

Area What changed Commit
Windows lifecycle scripts Dependency lifecycle scripts run through the bundled busybox sh, so a package whose install script assumes a POSIX shell behaves the same on Windows cb0e091780 (#940)

Documentation

Area What changed Commit
Unified runner page Retitled, moved below the command pages it unifies, and given a nubr chip in the sidebar ba9c84f59a
Compiling executables The nodeExecutable examples show an absolute path alongside the $(...) form, with the Windows spelling b3b5052c2b, 0d9d201bf5

Release tooling

  • The version commit now carries crates/nub-phantom/Cargo.lock. That workspace is excluded from the root and is checked with --locked in CI, so omitting it tagged a stale tree (9fdd379ba7).

What's Changed

  • pm: run Windows dependency lifecycle scripts through the bundled busybox sh by @colinhacks in #940
  • run: rename the standalone loader to @nubjs/runner and give it a nubr command by @colinhacks in #840

Full Changelog: v0.9.1...v0.9.2

Don't miss a new nub release

NewReleases is sending notifications on new releases.