@pnpm/exe 12.3.2 → 12.3.3

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/bin/pnpm.mjs CHANGED
@@ -3,14 +3,17 @@
3
3
  // `./bin/pnpx.mjs` for every pnpm >=11 (see its `config.json`) and loads them
4
4
  // into its own Node.js process, which a native executable cannot be loaded into.
5
5
  //
6
- // Only Corepack reaches this file: `package.json#bin` still points at the native
7
- // binary, so an ordinary `npm install -g pnpm` never pays for a Node.js startup.
6
+ // The `pnpm` placeholder bin runs it too, on Unix, when the install script that
7
+ // replaces it with the native binary did not (build scripts blocked). An
8
+ // ordinary `npm install -g pnpm` never pays for a Node.js startup:
9
+ // `package.json#bin` points at the native binary.
8
10
  //
9
11
  // Corepack installs no dependencies and runs no lifecycle scripts, so the
10
12
  // `@pnpm/exe.<target>` package that carries the binary is absent and
11
13
  // `install.js` never ran. The binary is therefore downloaded on first use and
12
14
  // kept next to this wrapper — where the native binary also finds the `dist/`
13
- // payload it ships node-gyp in.
15
+ // payload it ships node-gyp in. The placeholder's installs usually do carry
16
+ // that package, and the binary is taken from there.
14
17
  //
15
18
  // The download itself is `get-pnpm`, the package behind https://get.pnpm.io,
16
19
  // which already knows how to verify one; it travels in that same `dist/`
@@ -1,9 +1,9 @@
1
1
  {
2
- "lastValidatedTimestamp": 1788478744905,
2
+ "lastValidatedTimestamp": 1788518270048,
3
3
  "projects": {
4
4
  "/home/runner/_work/pnpm/pnpm/pnpm/npm/pnpm/temp-deploy": {
5
5
  "name": "pacquet",
6
- "version": "12.3.2"
6
+ "version": "12.3.3"
7
7
  }
8
8
  },
9
9
  "pnpmfiles": [],
@@ -28,7 +28,7 @@
28
28
  "@commitlint/prompt-cli": "^21.2.2",
29
29
  "@cyclonedx/cyclonedx-library": "10.2.0",
30
30
  "@eslint/js": "^10.0.1",
31
- "@inquirer/prompts": "^8.7.0",
31
+ "@inquirer/prompts": "^8.7.1",
32
32
  "@jest/globals": "30.4.1",
33
33
  "@npm/types": "^2.1.0",
34
34
  "@openpgp/web-stream-tools": "0.3.1",
@@ -227,7 +227,7 @@
227
227
  "semver-utils": "^1.1.4",
228
228
  "shlex": "^3.0.0",
229
229
  "shx": "^0.4.0",
230
- "socks": "^2.8.9",
230
+ "socks": "^2.8.10",
231
231
  "sort-keys": "^6.0.1",
232
232
  "split-cmd": "^1.1.0",
233
233
  "split2": "^4.2.0",
package/install.js CHANGED
@@ -6,8 +6,8 @@
6
6
  // the native binary at the same path. npm's global Windows shims still target
7
7
  // the extensionless path after the `bin` rewrite, so postinstall asks npm to
8
8
  // regenerate them against `pnpm.exe`. When lifecycle scripts are blocked
9
- // (`--ignore-scripts`, pnpm/Bun default), the placeholder remains and pnpm
10
- // cannot run.
9
+ // (`--ignore-scripts`, pnpm/Bun default), the placeholder remains and runs pnpm
10
+ // through Node.js wherever a shell reaches it (see the `pnpm` file).
11
11
  //
12
12
  // `pn`/`pnpx`/`pnx` are committed `#!/bin/sh` scripts on Unix (so only `pnpm` is
13
13
  // relinked); on Windows the native binary is hardlinked onto each and
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "./dist/node_modules/node-gyp/gyp/gyp"
10
10
  ]
11
11
  },
12
- "version": "12.3.2",
12
+ "version": "12.3.3",
13
13
  "description": "Fast, disk space efficient package manager",
14
14
  "keywords": [
15
15
  "pnpm",
@@ -46,14 +46,14 @@
46
46
  "THIRD-PARTY-NOTICES.md"
47
47
  ],
48
48
  "optionalDependencies": {
49
- "@pnpm/exe.win32-x64": "12.3.2",
50
- "@pnpm/exe.win32-arm64": "12.3.2",
51
- "@pnpm/exe.darwin-x64": "12.3.2",
52
- "@pnpm/exe.darwin-arm64": "12.3.2",
53
- "@pnpm/exe.linux-x64": "12.3.2",
54
- "@pnpm/exe.linux-arm64": "12.3.2",
55
- "@pnpm/exe.linux-x64-musl": "12.3.2",
56
- "@pnpm/exe.linux-arm64-musl": "12.3.2"
49
+ "@pnpm/exe.win32-x64": "12.3.3",
50
+ "@pnpm/exe.win32-arm64": "12.3.3",
51
+ "@pnpm/exe.darwin-x64": "12.3.3",
52
+ "@pnpm/exe.darwin-arm64": "12.3.3",
53
+ "@pnpm/exe.linux-x64": "12.3.3",
54
+ "@pnpm/exe.linux-arm64": "12.3.3",
55
+ "@pnpm/exe.linux-x64-musl": "12.3.3",
56
+ "@pnpm/exe.linux-arm64-musl": "12.3.3"
57
57
  },
58
58
  "scripts": {
59
59
  "preinstall": "node install.js",
package/pnpm CHANGED
@@ -1,4 +1,38 @@
1
- This is a placeholder. pnpm's native binary replaces this file during
2
- installation (see ./install.js). If you are reading this, the install/build
3
- script did not run reinstall with build scripts enabled (e.g. allow-list
4
- pnpm's build under pnpm or Bun, or drop --ignore-scripts).
1
+ # pnpm's native binary replaces this file during installation (see
2
+ # ./install.js). Until then this hands over to ./bin/pnpm.mjs, which finds the
3
+ # installed binary or downloads one and spawns it.
4
+ #
5
+ # Shebang-less on purpose, and therefore an `sh` script: a bin shim generated
6
+ # from a shebang records that interpreter, and pnpm 11 generates the shim before
7
+ # it puts the native binary at this path.
8
+ #
9
+ # Something has to retry this file under a shell, because the kernel answers
10
+ # ENOEXEC for it. A bin shim and a shell both do, and so does glibc's `execvp`.
11
+ # Apple's libc does not, so on macOS a program that spawns this path itself gets
12
+ # ENOEXEC; Windows has neither and cannot reach it at all.
13
+ if ! command -v node > /dev/null 2>&1; then
14
+ echo "pnpm's native binary was not installed, and there is no Node.js to run pnpm without it." >&2
15
+ echo "Reinstall pnpm with build scripts enabled (allow-list pnpm's build under pnpm or Bun, or drop --ignore-scripts)." >&2
16
+ exit 1
17
+ fi
18
+
19
+ if [ -t 2 ]; then
20
+ echo "pnpm is running through Node.js because the script that installs its native binary was skipped." >&2
21
+ echo "Reinstall pnpm with its build scripts allowed to run the binary directly." >&2
22
+ fi
23
+
24
+ # $0 is whatever shim or symlink pnpm was launched through; ./bin/pnpm.mjs is
25
+ # found relative to this file. The hop cap matches the kernel's ELOOP limit, so
26
+ # a cycle cannot hang the script.
27
+ self=$0
28
+ hops=0
29
+ while [ -L "$self" ] && [ "$hops" -lt 40 ]; do
30
+ hops=$((hops + 1))
31
+ link=$(readlink "$self")
32
+ case $link in
33
+ /*) self=$link ;;
34
+ *) self=$(dirname "$self")/$link ;;
35
+ esac
36
+ done
37
+
38
+ exec node "$(dirname "$self")/bin/pnpm.mjs" "$@"