@nubjs/nub 0.0.19 → 0.0.21

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.
Files changed (2) hide show
  1. package/bin/launch.js +8 -0
  2. package/package.json +9 -9
package/bin/launch.js CHANGED
@@ -115,6 +115,14 @@ function healPathEntry(verb, nativePath) {
115
115
  module.exports = function launch(argv0Name) {
116
116
  const verb = argv0Name || "nub";
117
117
  const binPath = resolveBinary(verb);
118
+ // Ensure the platform binary is executable. npm strips the +x bit on install from
119
+ // files that aren't `bin`-field entries, and the platform package declares no bin
120
+ // field — so the staged-executable binary lands 0o644 and both spawnSync (below)
121
+ // and the healed sh trampoline's `exec` would EACCES / "Permission denied". The old
122
+ // postinstall did this chmod; doing it in the launcher covers EVERY package manager
123
+ // (npm strips, others may not) and runs before the heal writes a trampoline that
124
+ // exec's this binary. Best-effort; harmless if already executable.
125
+ try { fs.chmodSync(binPath, 0o755); } catch {}
118
126
  // Self-heal the PATH entry on first POSIX call so later calls skip Node entirely.
119
127
  healPathEntry(verb, binPath);
120
128
  // This call still runs through Node; spawn the native binary. argv0 basename of
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nubjs/nub",
3
- "version": "0.0.19",
3
+ "version": "0.0.21",
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",
@@ -14,13 +14,13 @@
14
14
  "platform.js"
15
15
  ],
16
16
  "optionalDependencies": {
17
- "@nubjs/nub-darwin-arm64": "0.0.19",
18
- "@nubjs/nub-darwin-x64": "0.0.19",
19
- "@nubjs/nub-linux-x64": "0.0.19",
20
- "@nubjs/nub-linux-x64-musl": "0.0.19",
21
- "@nubjs/nub-linux-arm64": "0.0.19",
22
- "@nubjs/nub-linux-arm64-musl": "0.0.19",
23
- "@nubjs/nub-win32-x64": "0.0.19",
24
- "@nubjs/nub-win32-arm64": "0.0.19"
17
+ "@nubjs/nub-darwin-arm64": "0.0.21",
18
+ "@nubjs/nub-darwin-x64": "0.0.21",
19
+ "@nubjs/nub-linux-x64": "0.0.21",
20
+ "@nubjs/nub-linux-x64-musl": "0.0.21",
21
+ "@nubjs/nub-linux-arm64": "0.0.21",
22
+ "@nubjs/nub-linux-arm64-musl": "0.0.21",
23
+ "@nubjs/nub-win32-x64": "0.0.21",
24
+ "@nubjs/nub-win32-arm64": "0.0.21"
25
25
  }
26
26
  }