@nubjs/nub 0.9.2 → 0.9.3-canary.20260920.524

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -30,6 +30,9 @@ nub run build
30
30
  # Execute a local or remote binary
31
31
  nubx vitest --run
32
32
 
33
+ # One name for a file, a script, or an installed bin
34
+ nubr app.ts
35
+
33
36
  # Watch mode — restart on change
34
37
  nub watch server.ts
35
38
  ```
package/bin/launch.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
- // Shared launcher used by bin/nub and bin/nubx.
2
+ // Shared launcher used by bin/nub, bin/nubx and bin/nubr.
3
3
  //
4
- // bin/nub and bin/nubx ship as committed `#!/usr/bin/env node` shims because the
4
+ // bin/nub, bin/nubx and bin/nubr ship as committed `#!/usr/bin/env node` shims because the
5
5
  // cross-platform @nubjs/nub package cannot ship a native binary (it doesn't know
6
6
  // the target platform at publish time). On Windows that is the whole story: npm's
7
7
  // generated nub.cmd / nubx.cmd invoke `node bin/nub`, which spawns the platform
@@ -381,7 +381,8 @@ function healPathEntry(verb, nativePath) {
381
381
  } catch {}
382
382
  }
383
383
 
384
- // argv0Name: the verb this stub represents ("nubx" for bin/nubx; undefined => nub).
384
+ // argv0Name: the verb this stub represents ("nubx" for bin/nubx, "nubr" for bin/nubr;
385
+ // undefined => nub).
385
386
  module.exports = function launch(argv0Name) {
386
387
  const verb = argv0Name || "nub";
387
388
  const resolved = resolveBinary(verb);
package/bin/nubr ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ // Entry point for the `nubr` command (the unified runner: a file, a package.json
4
+ // script, or an installed bin). The package manager links its on-PATH `nubr` to
5
+ // this Node launcher; on its first POSIX call launch.js self-heals that entry into
6
+ // a tiny sh trampoline that exec's the platform package's bin/nub with the verb in
7
+ // `__NUB_ARGV0`, which makes the Rust CLI enter runner mode (Argv0::Nubr). On
8
+ // Windows this Node launcher runs every call (no fast path).
9
+ require("./launch.js")("nubr");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nubjs/nub",
3
- "version": "0.9.2",
3
+ "version": "0.9.3-canary.20260920.524",
4
4
  "description": "TypeScript-first developer supertool — a fast script runner and TS runtime powered by Node.js",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/nubjs/nub",
@@ -23,7 +23,8 @@
23
23
  },
24
24
  "bin": {
25
25
  "nub": "bin/nub",
26
- "nubx": "bin/nubx"
26
+ "nubx": "bin/nubx",
27
+ "nubr": "bin/nubr"
27
28
  },
28
29
  "scripts": {
29
30
  "postinstall": "node postinstall.js"
@@ -36,13 +37,13 @@
36
37
  "LICENSE"
37
38
  ],
38
39
  "optionalDependencies": {
39
- "@nubjs/nub-darwin-arm64": "0.9.2",
40
- "@nubjs/nub-darwin-x64": "0.9.2",
41
- "@nubjs/nub-linux-x64": "0.9.2",
42
- "@nubjs/nub-linux-x64-musl": "0.9.2",
43
- "@nubjs/nub-linux-arm64": "0.9.2",
44
- "@nubjs/nub-linux-arm64-musl": "0.9.2",
45
- "@nubjs/nub-win32-x64": "0.9.2",
46
- "@nubjs/nub-win32-arm64": "0.9.2"
40
+ "@nubjs/nub-darwin-arm64": "0.9.3-canary.20260920.524",
41
+ "@nubjs/nub-darwin-x64": "0.9.3-canary.20260920.524",
42
+ "@nubjs/nub-linux-x64": "0.9.3-canary.20260920.524",
43
+ "@nubjs/nub-linux-x64-musl": "0.9.3-canary.20260920.524",
44
+ "@nubjs/nub-linux-arm64": "0.9.3-canary.20260920.524",
45
+ "@nubjs/nub-linux-arm64-musl": "0.9.3-canary.20260920.524",
46
+ "@nubjs/nub-win32-x64": "0.9.3-canary.20260920.524",
47
+ "@nubjs/nub-win32-arm64": "0.9.3-canary.20260920.524"
47
48
  }
48
49
  }
package/postinstall.js CHANGED
@@ -41,14 +41,14 @@ function platformPkg() {
41
41
  // runtime chmod is the second line of defense.
42
42
  function chmodExecutable(pkg) {
43
43
  const ext = process.platform === "win32" ? ".exe" : "";
44
- for (const verb of ["nub", "nubx"]) {
44
+ for (const verb of ["nub", "nubx", "nubr"]) {
45
45
  let binPath;
46
46
  try {
47
47
  binPath = require.resolve(`${pkg}/bin/${verb}${ext}`);
48
48
  } catch {
49
- // `nubx` is expected to miss: current platform packages ship only `bin/nub`
50
- // and the verb rides in `__NUB_ARGV0`. Still probed so a newer launcher paired
51
- // with an older platform package chmods that package's `bin/nubx` too.
49
+ // `nubx` / `nubr` are expected to miss: current platform packages ship only
50
+ // `bin/nub` and the verb rides in `__NUB_ARGV0`. Still probed so a newer launcher
51
+ // paired with an older platform package chmods that package's `bin/nubx` too.
52
52
  continue;
53
53
  }
54
54
  try {
@@ -219,7 +219,7 @@ function dropStaleWindowsExe() {
219
219
  const path = require("path");
220
220
  for (const dir of (process.env.PATH || "").split(path.delimiter)) {
221
221
  if (!dir) continue;
222
- for (const verb of ["nub", "nubx"]) {
222
+ for (const verb of ["nub", "nubx", "nubr"]) {
223
223
  // Only where npm's own shim for that verb still sits: that pairing is what marks the
224
224
  // directory as ours. A bare `<verb>.exe` in some unrelated PATH dir is not ours to
225
225
  // delete — there is a real unrelated `nub@1.0.0` on npm.