@pnpm/exe 12.5.1 → 12.7.0

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.
@@ -31,14 +31,19 @@ msys=""
31
31
 
32
32
  case `command -p uname -a` in
33
33
  *CYGWIN*|*MINGW*|*MSYS*)
34
- if command -v cygpath > /dev/null 2>&1; then
34
+ if converted=$(command -p cygpath -w "$basedir" 2>/dev/null) && [ -n "$converted" ]; then
35
+ basedir_win="$converted"
36
+ elif command -v cygpath > /dev/null 2>&1; then
35
37
  basedir_win=`cygpath -w "$basedir"`
36
38
  fi
37
39
  exe=".exe"
38
40
  msys="true"
39
41
  ;;
40
42
  *WSL2*)
41
- if command -v wslpath > /dev/null 2>&1; then
43
+ if converted=$(command -p wslpath -w "$basedir" 2>/dev/null) && [ -n "$converted" ]; then
44
+ basedir_win="$converted"
45
+ exe=".exe"
46
+ elif command -v wslpath > /dev/null 2>&1; then
42
47
  basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
43
48
  if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
44
49
  basedir_win="$basedir"
@@ -49,15 +54,16 @@ case `command -p uname -a` in
49
54
  ;;
50
55
  esac
51
56
 
57
+ basedir_abs=$(CDPATH= cd -P -- "$basedir" && pwd -P) || exit $?
52
58
  if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
53
59
  exec "$basedir/node.exe" "$basedir_win/../get-pnpm/bin/get-pnpm.js" "$@"
54
60
  elif [ -x "$basedir/node" ]; then
55
- exec "$basedir/node" "$basedir/../get-pnpm/bin/get-pnpm.js" "$@"
61
+ exec "$basedir/node" "$basedir_abs/../get-pnpm/bin/get-pnpm.js" "$@"
56
62
  elif command -v node >/dev/null 2>&1; then
57
- exec node "$basedir/../get-pnpm/bin/get-pnpm.js" "$@"
63
+ exec node "$basedir_abs/../get-pnpm/bin/get-pnpm.js" "$@"
58
64
  elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
59
65
  exec node.exe "$basedir_win/../get-pnpm/bin/get-pnpm.js" "$@"
60
66
  else
61
- exec node "$basedir/../get-pnpm/bin/get-pnpm.js" "$@"
67
+ exec node "$basedir_abs/../get-pnpm/bin/get-pnpm.js" "$@"
62
68
  fi
63
- # cmd-shim-target=/home/runner/_work/pnpm/pnpm/pnpm/npm/pnpm/temp-deploy/node_modules/get-pnpm/bin/get-pnpm.js
69
+ # cmd-shim-target=../get-pnpm/bin/get-pnpm.js
@@ -31,14 +31,19 @@ msys=""
31
31
 
32
32
  case `command -p uname -a` in
33
33
  *CYGWIN*|*MINGW*|*MSYS*)
34
- if command -v cygpath > /dev/null 2>&1; then
34
+ if converted=$(command -p cygpath -w "$basedir" 2>/dev/null) && [ -n "$converted" ]; then
35
+ basedir_win="$converted"
36
+ elif command -v cygpath > /dev/null 2>&1; then
35
37
  basedir_win=`cygpath -w "$basedir"`
36
38
  fi
37
39
  exe=".exe"
38
40
  msys="true"
39
41
  ;;
40
42
  *WSL2*)
41
- if command -v wslpath > /dev/null 2>&1; then
43
+ if converted=$(command -p wslpath -w "$basedir" 2>/dev/null) && [ -n "$converted" ]; then
44
+ basedir_win="$converted"
45
+ exe=".exe"
46
+ elif command -v wslpath > /dev/null 2>&1; then
42
47
  basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
43
48
  if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
44
49
  basedir_win="$basedir"
@@ -49,15 +54,16 @@ case `command -p uname -a` in
49
54
  ;;
50
55
  esac
51
56
 
57
+ basedir_abs=$(CDPATH= cd -P -- "$basedir" && pwd -P) || exit $?
52
58
  if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
53
59
  exec "$basedir/node.exe" "$basedir_win/../node-gyp/bin/node-gyp.js" "$@"
54
60
  elif [ -x "$basedir/node" ]; then
55
- exec "$basedir/node" "$basedir/../node-gyp/bin/node-gyp.js" "$@"
61
+ exec "$basedir/node" "$basedir_abs/../node-gyp/bin/node-gyp.js" "$@"
56
62
  elif command -v node >/dev/null 2>&1; then
57
- exec node "$basedir/../node-gyp/bin/node-gyp.js" "$@"
63
+ exec node "$basedir_abs/../node-gyp/bin/node-gyp.js" "$@"
58
64
  elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
59
65
  exec node.exe "$basedir_win/../node-gyp/bin/node-gyp.js" "$@"
60
66
  else
61
- exec node "$basedir/../node-gyp/bin/node-gyp.js" "$@"
67
+ exec node "$basedir_abs/../node-gyp/bin/node-gyp.js" "$@"
62
68
  fi
63
- # cmd-shim-target=/home/runner/_work/pnpm/pnpm/pnpm/npm/pnpm/temp-deploy/node_modules/node-gyp/./bin/node-gyp.js
69
+ # cmd-shim-target=../node-gyp/bin/node-gyp.js
@@ -31,14 +31,19 @@ msys=""
31
31
 
32
32
  case `command -p uname -a` in
33
33
  *CYGWIN*|*MINGW*|*MSYS*)
34
- if command -v cygpath > /dev/null 2>&1; then
34
+ if converted=$(command -p cygpath -w "$basedir" 2>/dev/null) && [ -n "$converted" ]; then
35
+ basedir_win="$converted"
36
+ elif command -v cygpath > /dev/null 2>&1; then
35
37
  basedir_win=`cygpath -w "$basedir"`
36
38
  fi
37
39
  exe=".exe"
38
40
  msys="true"
39
41
  ;;
40
42
  *WSL2*)
41
- if command -v wslpath > /dev/null 2>&1; then
43
+ if converted=$(command -p wslpath -w "$basedir" 2>/dev/null) && [ -n "$converted" ]; then
44
+ basedir_win="$converted"
45
+ exe=".exe"
46
+ elif command -v wslpath > /dev/null 2>&1; then
42
47
  basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
43
48
  if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
44
49
  basedir_win="$basedir"
@@ -49,15 +54,16 @@ case `command -p uname -a` in
49
54
  ;;
50
55
  esac
51
56
 
57
+ basedir_abs=$(CDPATH= cd -P -- "$basedir" && pwd -P) || exit $?
52
58
  if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
53
59
  exec "$basedir/node.exe" "$basedir_win/../which/bin/which.js" "$@"
54
60
  elif [ -x "$basedir/node" ]; then
55
- exec "$basedir/node" "$basedir/../which/bin/which.js" "$@"
61
+ exec "$basedir/node" "$basedir_abs/../which/bin/which.js" "$@"
56
62
  elif command -v node >/dev/null 2>&1; then
57
- exec node "$basedir/../which/bin/which.js" "$@"
63
+ exec node "$basedir_abs/../which/bin/which.js" "$@"
58
64
  elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
59
65
  exec node.exe "$basedir_win/../which/bin/which.js" "$@"
60
66
  else
61
- exec node "$basedir/../which/bin/which.js" "$@"
67
+ exec node "$basedir_abs/../which/bin/which.js" "$@"
62
68
  fi
63
- # cmd-shim-target=/home/runner/_work/pnpm/pnpm/pnpm/npm/pnpm/temp-deploy/node_modules/which/./bin/which.js
69
+ # cmd-shim-target=../which/bin/which.js
@@ -31,14 +31,19 @@ msys=""
31
31
 
32
32
  case `command -p uname -a` in
33
33
  *CYGWIN*|*MINGW*|*MSYS*)
34
- if command -v cygpath > /dev/null 2>&1; then
34
+ if converted=$(command -p cygpath -w "$basedir" 2>/dev/null) && [ -n "$converted" ]; then
35
+ basedir_win="$converted"
36
+ elif command -v cygpath > /dev/null 2>&1; then
35
37
  basedir_win=`cygpath -w "$basedir"`
36
38
  fi
37
39
  exe=".exe"
38
40
  msys="true"
39
41
  ;;
40
42
  *WSL2*)
41
- if command -v wslpath > /dev/null 2>&1; then
43
+ if converted=$(command -p wslpath -w "$basedir" 2>/dev/null) && [ -n "$converted" ]; then
44
+ basedir_win="$converted"
45
+ exe=".exe"
46
+ elif command -v wslpath > /dev/null 2>&1; then
42
47
  basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
43
48
  if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
44
49
  basedir_win="$basedir"
@@ -49,15 +54,16 @@ case `command -p uname -a` in
49
54
  ;;
50
55
  esac
51
56
 
57
+ basedir_abs=$(CDPATH= cd -P -- "$basedir" && pwd -P) || exit $?
52
58
  if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
53
59
  exec "$basedir/node.exe" "$basedir_win/../nopt/bin/nopt.js" "$@"
54
60
  elif [ -x "$basedir/node" ]; then
55
- exec "$basedir/node" "$basedir/../nopt/bin/nopt.js" "$@"
61
+ exec "$basedir/node" "$basedir_abs/../nopt/bin/nopt.js" "$@"
56
62
  elif command -v node >/dev/null 2>&1; then
57
- exec node "$basedir/../nopt/bin/nopt.js" "$@"
63
+ exec node "$basedir_abs/../nopt/bin/nopt.js" "$@"
58
64
  elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
59
65
  exec node.exe "$basedir_win/../nopt/bin/nopt.js" "$@"
60
66
  else
61
- exec node "$basedir/../nopt/bin/nopt.js" "$@"
67
+ exec node "$basedir_abs/../nopt/bin/nopt.js" "$@"
62
68
  fi
63
- # cmd-shim-target=/home/runner/_work/pnpm/pnpm/pnpm/npm/pnpm/temp-deploy/node_modules/nopt/bin/nopt.js
69
+ # cmd-shim-target=../nopt/bin/nopt.js
@@ -31,14 +31,19 @@ msys=""
31
31
 
32
32
  case `command -p uname -a` in
33
33
  *CYGWIN*|*MINGW*|*MSYS*)
34
- if command -v cygpath > /dev/null 2>&1; then
34
+ if converted=$(command -p cygpath -w "$basedir" 2>/dev/null) && [ -n "$converted" ]; then
35
+ basedir_win="$converted"
36
+ elif command -v cygpath > /dev/null 2>&1; then
35
37
  basedir_win=`cygpath -w "$basedir"`
36
38
  fi
37
39
  exe=".exe"
38
40
  msys="true"
39
41
  ;;
40
42
  *WSL2*)
41
- if command -v wslpath > /dev/null 2>&1; then
43
+ if converted=$(command -p wslpath -w "$basedir" 2>/dev/null) && [ -n "$converted" ]; then
44
+ basedir_win="$converted"
45
+ exe=".exe"
46
+ elif command -v wslpath > /dev/null 2>&1; then
42
47
  basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
43
48
  if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
44
49
  basedir_win="$basedir"
@@ -49,15 +54,16 @@ case `command -p uname -a` in
49
54
  ;;
50
55
  esac
51
56
 
57
+ basedir_abs=$(CDPATH= cd -P -- "$basedir" && pwd -P) || exit $?
52
58
  if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
53
59
  exec "$basedir/node.exe" "$basedir_win/../semver/bin/semver.js" "$@"
54
60
  elif [ -x "$basedir/node" ]; then
55
- exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@"
61
+ exec "$basedir/node" "$basedir_abs/../semver/bin/semver.js" "$@"
56
62
  elif command -v node >/dev/null 2>&1; then
57
- exec node "$basedir/../semver/bin/semver.js" "$@"
63
+ exec node "$basedir_abs/../semver/bin/semver.js" "$@"
58
64
  elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
59
65
  exec node.exe "$basedir_win/../semver/bin/semver.js" "$@"
60
66
  else
61
- exec node "$basedir/../semver/bin/semver.js" "$@"
67
+ exec node "$basedir_abs/../semver/bin/semver.js" "$@"
62
68
  fi
63
- # cmd-shim-target=/home/runner/_work/pnpm/pnpm/pnpm/npm/pnpm/temp-deploy/node_modules/semver/bin/semver.js
69
+ # cmd-shim-target=../semver/bin/semver.js
@@ -1,9 +1,9 @@
1
1
  {
2
- "lastValidatedTimestamp": 1789765288371,
2
+ "lastValidatedTimestamp": 1790330643831,
3
3
  "projects": {
4
4
  "/home/runner/_work/pnpm/pnpm/pnpm/npm/pnpm/temp-deploy": {
5
5
  "name": "pacquet",
6
- "version": "12.5.1"
6
+ "version": "12.7.0"
7
7
  }
8
8
  },
9
9
  "pnpmfiles": [],
@@ -23,10 +23,10 @@
23
23
  "default": {
24
24
  "@babel/core": "^7.29.7",
25
25
  "@babel/plugin-transform-explicit-resource-management": "^7.29.7",
26
- "@commitlint/cli": "^21.2.2",
27
- "@commitlint/config-conventional": "^21.2.2",
28
- "@commitlint/prompt-cli": "^21.2.2",
29
- "@cyclonedx/cyclonedx-library": "10.2.0",
26
+ "@commitlint/cli": "^21.2.3",
27
+ "@commitlint/config-conventional": "^21.2.3",
28
+ "@commitlint/prompt-cli": "^21.2.3",
29
+ "@cyclonedx/cyclonedx-library": "10.3.0",
30
30
  "@eslint/js": "^10.0.1",
31
31
  "@inquirer/prompts": "^8.7.2",
32
32
  "@jest/globals": "30.4.1",
@@ -40,7 +40,6 @@
40
40
  "@pnpm/logger": "^1100.0.0",
41
41
  "@pnpm/meta-updater": "2.0.6",
42
42
  "@pnpm/nopt": "^0.3.1",
43
- "@pnpm/npm-lifecycle": "^1100.1.0",
44
43
  "@pnpm/npm-package-arg": "^2.0.0",
45
44
  "@pnpm/os.env.path-extender": "^3.0.1",
46
45
  "@pnpm/patch-package": "0.0.1",
@@ -48,7 +47,7 @@
48
47
  "@pnpm/tabtab": "^0.5.4",
49
48
  "@pnpm/tgz-fixtures": "0.0.0",
50
49
  "@reflink/reflink": "0.1.19",
51
- "@rushstack/worker-pool": "0.7.27",
50
+ "@rushstack/worker-pool": "0.7.28",
52
51
  "@stylistic/eslint-plugin": "^5.10.0",
53
52
  "@types/adm-zip": "^0.5.8",
54
53
  "@types/archy": "0.0.36",
@@ -79,6 +78,7 @@
79
78
  "@types/ramda": "0.32.0",
80
79
  "@types/retry": "^0.12.5",
81
80
  "@types/semver": "7.8.0",
81
+ "@types/spdx-expression-parse": "4.0.0",
82
82
  "@types/ssri": "^7.1.5",
83
83
  "@types/tar-stream": "^3.1.4",
84
84
  "@types/touch": "^3.1.5",
@@ -87,27 +87,30 @@
87
87
  "@types/write-file-atomic": "^4.0.3",
88
88
  "@types/yarnpkg__lockfile": "^1.1.9",
89
89
  "@types/zkochan__table": "npm:@types/table@6.3.2",
90
- "@typescript-eslint/utils": "^8.70.0",
90
+ "@typescript-eslint/utils": "^8.70.1",
91
91
  "@typescript/native-preview": "7.0.0-dev.20260707.2",
92
92
  "@yarnpkg/core": "4.9.1",
93
93
  "@yarnpkg/extensions": "2.0.7",
94
+ "@yarnpkg/fslib": "^3.1.5",
94
95
  "@yarnpkg/lockfile": "^1.1.0",
95
96
  "@yarnpkg/nm": "4.1.1",
96
97
  "@yarnpkg/pnp": "^4.1.7",
98
+ "@yarnpkg/shell": "4.1.3",
97
99
  "@zkochan/retry": "^0.2.0",
98
100
  "@zkochan/rimraf": "^4.0.0",
99
101
  "@zkochan/table": "^2.0.1",
100
102
  "adm-zip": "^0.6.1",
101
- "amaro": "^1.2.0",
103
+ "amaro": "^1.2.1",
102
104
  "ansi-diff": "^1.2.0",
103
105
  "archy": "^1.0.0",
104
106
  "better-path-resolve": "2.0.0",
105
107
  "bin-links": "^6.0.2",
106
108
  "bole": "^5.0.29",
107
109
  "boxen": "npm:@zkochan/boxen@5.1.2",
110
+ "bz2": "1.0.1",
108
111
  "c8": "^12.0.0",
109
112
  "camelcase": "^9.0.0",
110
- "camelcase-keys": "^10.0.2",
113
+ "camelcase-keys": "^10.0.3",
111
114
  "can-link": "^3.0.0",
112
115
  "can-write-to-dir": "^2.0.0",
113
116
  "chalk": "^6.0.0",
@@ -125,10 +128,10 @@
125
128
  "didyoumean2": "^7.0.4",
126
129
  "dint": "^5.1.0",
127
130
  "dir-is-case-sensitive": "^3.0.0",
128
- "empathic": "^2.0.1",
131
+ "empathic": "^2.1.0",
129
132
  "esbuild": "^0.28.2",
130
133
  "escape-string-regexp": "^5.0.0",
131
- "eslint": "^10.10.0",
134
+ "eslint": "^10.11.0",
132
135
  "eslint-plugin-import-x": "^4.17.1",
133
136
  "eslint-plugin-jest": "^29.16.6",
134
137
  "eslint-plugin-n": "^18.3.0",
@@ -139,7 +142,7 @@
139
142
  "exists-link": "2.0.0",
140
143
  "fast-deep-equal": "^3.1.3",
141
144
  "fast-glob": "^3.3.3",
142
- "fs-extra": "^11.4.0",
145
+ "fs-extra": "^11.4.1",
143
146
  "fuse-native": "^2.2.6",
144
147
  "get-pnpm": "^0.0.5",
145
148
  "get-port": "^7.2.0",
@@ -168,10 +171,10 @@
168
171
  "lodash.kebabcase": "^4.1.1",
169
172
  "lodash.throttle": "4.1.1",
170
173
  "loud-rejection": "^2.2.0",
171
- "lru-cache": "^11.5.2",
174
+ "lru-cache": "^11.5.3",
172
175
  "make-empty-dir": "^4.0.0",
173
176
  "mdast-util-to-string": "^4.0.0",
174
- "memfs": "^4.78.0",
177
+ "memfs": "^4.79.0",
175
178
  "memoize": "^11.0.0",
176
179
  "micromatch": "^4.0.8",
177
180
  "msgpackr": "2.1.0",
@@ -189,7 +192,7 @@
189
192
  "p-defer": "^4.0.1",
190
193
  "p-every": "^2.0.0",
191
194
  "p-filter": "^4.1.0",
192
- "p-limit": "^7.3.2",
195
+ "p-limit": "^7.3.3",
193
196
  "p-queue": "^9.3.3",
194
197
  "parse-json": "^8.3.0",
195
198
  "parse-npm-tarball-url": "^5.0.0",
@@ -226,8 +229,10 @@
226
229
  "semver-utils": "^1.1.4",
227
230
  "shlex": "^3.0.0",
228
231
  "shx": "^0.4.0",
232
+ "signal-exit": "^4.1.0",
229
233
  "socks": "^2.8.10",
230
234
  "sort-keys": "^6.0.1",
235
+ "spdx-expression-parse": "5.0.0",
231
236
  "split-cmd": "^1.1.0",
232
237
  "split2": "^4.2.0",
233
238
  "ssri": "13.0.1",
@@ -236,7 +241,7 @@
236
241
  "string-width": "^8.2.2",
237
242
  "strip-bom": "^5.0.0",
238
243
  "strip-comments-strings": "1.2.0",
239
- "symlink-dir": "^10.0.1",
244
+ "symlink-dir": "^10.0.3",
240
245
  "tar": "^7.5.22",
241
246
  "tar-stream": "^3.2.1",
242
247
  "tempy": "3.0.0",
@@ -246,7 +251,8 @@
246
251
  "tree-kill": "^1.2.2",
247
252
  "ts-jest-resolver": "2.0.1",
248
253
  "typescript": "6.0.3",
249
- "typescript-eslint": "^8.70.0",
254
+ "typescript-eslint": "^8.70.1",
255
+ "uid-number": "0.0.6",
250
256
  "undici": "^7.29.0",
251
257
  "unified": "^11.0.5",
252
258
  "validate-npm-package-name": "7.0.2",
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "./dist/node_modules/node-gyp/gyp/gyp"
10
10
  ]
11
11
  },
12
- "version": "12.5.1",
12
+ "version": "12.7.0",
13
13
  "description": "Fast, disk space efficient package manager",
14
14
  "keywords": [
15
15
  "pnpm",
@@ -46,20 +46,20 @@
46
46
  "THIRD-PARTY-NOTICES.md"
47
47
  ],
48
48
  "optionalDependencies": {
49
- "@pnpm/exe.win32-x64": "12.5.1",
50
- "@pnpm/exe.win32-arm64": "12.5.1",
51
- "@pnpm/exe.darwin-x64": "12.5.1",
52
- "@pnpm/exe.darwin-arm64": "12.5.1",
53
- "@pnpm/exe.linux-x64": "12.5.1",
54
- "@pnpm/exe.linux-arm64": "12.5.1",
55
- "@pnpm/exe.linux-riscv64": "12.5.1",
56
- "@pnpm/exe.linux-ppc64": "12.5.1",
57
- "@pnpm/exe.linux-s390x": "12.5.1",
58
- "@pnpm/exe.linux-x64-musl": "12.5.1",
59
- "@pnpm/exe.linux-arm64-musl": "12.5.1",
60
- "@pnpm/exe.freebsd-x64": "12.5.1",
61
- "@pnpm/exe.android-arm64": "12.5.1",
62
- "@pnpm/exe.android-x64": "12.5.1"
49
+ "@pnpm/exe.win32-x64": "12.7.0",
50
+ "@pnpm/exe.win32-arm64": "12.7.0",
51
+ "@pnpm/exe.darwin-x64": "12.7.0",
52
+ "@pnpm/exe.darwin-arm64": "12.7.0",
53
+ "@pnpm/exe.linux-x64": "12.7.0",
54
+ "@pnpm/exe.linux-arm64": "12.7.0",
55
+ "@pnpm/exe.linux-riscv64": "12.7.0",
56
+ "@pnpm/exe.linux-ppc64": "12.7.0",
57
+ "@pnpm/exe.linux-s390x": "12.7.0",
58
+ "@pnpm/exe.linux-x64-musl": "12.7.0",
59
+ "@pnpm/exe.linux-arm64-musl": "12.7.0",
60
+ "@pnpm/exe.freebsd-x64": "12.7.0",
61
+ "@pnpm/exe.android-arm64": "12.7.0",
62
+ "@pnpm/exe.android-x64": "12.7.0"
63
63
  },
64
64
  "scripts": {
65
65
  "preinstall": "node install.js",
package/pn CHANGED
@@ -8,7 +8,40 @@
8
8
  # itself first. The hop cap matches the kernel's ELOOP limit, so a cycle cannot
9
9
  # hang the script. Directories come from `${self%/*}` and `readlink` runs through
10
10
  # `command -p`, so the caller's `PATH` decides nothing here.
11
+ #
12
+ # Where no default path is compiled in, as on Nix, `command -p` searches PATH
13
+ # instead, so the helpers run with node_modules and relative entries dropped from
14
+ # PATH.
15
+ caller_path_set=${PATH+set}
16
+ caller_path=${PATH-}
17
+ helper_path=
18
+ rest=$caller_path:
19
+ while [ -n "$rest" ]; do
20
+ dir=${rest%%:*}
21
+ rest=${rest#*:}
22
+ case "$dir" in
23
+ */node_modules/*|*/node_modules) ;;
24
+ /*) helper_path=${helper_path:+$helper_path:}$dir ;;
25
+ esac
26
+ done
27
+ # An empty PATH searches the current directory.
28
+ PATH=${helper_path:-/}
11
29
  self=$0
30
+ # MSYS and Cygwin can launch this with a native Windows path, which has no slash
31
+ # for `${self%/*}` to strip. Only a drive letter or a UNC prefix marks one; a
32
+ # backslash anywhere else is an ordinary character in a Unix file name, so the
33
+ # path is left alone. The separators are swapped in the shell rather than through
34
+ # `echo`, which mangles a `\t` or `\b` in a path under dash.
35
+ case $self in
36
+ [A-Za-z]:\\*|\\\\*)
37
+ while :; do
38
+ case $self in
39
+ *\\*) self=${self%%\\*}/${self#*\\} ;;
40
+ *) break ;;
41
+ esac
42
+ done
43
+ ;;
44
+ esac
12
45
  # `${self%/*}` needs a slash to strip. A bare name came from a `PATH` lookup and
13
46
  # stands for a file in the current directory.
14
47
  case $self in
@@ -24,6 +57,7 @@ while [ -L "$self" ] && [ "$hops" -lt 40 ]; do
24
57
  *) self=${self%/*}/$link ;;
25
58
  esac
26
59
  done
60
+ if [ -n "$caller_path_set" ]; then PATH=$caller_path; else unset PATH; fi
27
61
  # The walk has to end at a regular file. Running out of hops leaves $self a
28
62
  # symlink; a chain that changed under us can leave it dangling or a directory, and
29
63
  # a failed readlink leaves a trailing slash. Each case would take `pnpm` from the
package/pnpm CHANGED
@@ -28,7 +28,40 @@ fi
28
28
  # `readlink` runs through `command -p`, which searches the system default path,
29
29
  # and directories come from `${self%/*}`, which runs nothing at all. The caller's
30
30
  # PATH therefore decides only which `node` runs, which is what it is for.
31
+ #
32
+ # Where no default path is compiled in, as on Nix, `command -p` searches PATH
33
+ # instead, so the helpers run with node_modules and relative entries dropped from
34
+ # PATH.
35
+ caller_path_set=${PATH+set}
36
+ caller_path=${PATH-}
37
+ helper_path=
38
+ rest=$caller_path:
39
+ while [ -n "$rest" ]; do
40
+ dir=${rest%%:*}
41
+ rest=${rest#*:}
42
+ case "$dir" in
43
+ */node_modules/*|*/node_modules) ;;
44
+ /*) helper_path=${helper_path:+$helper_path:}$dir ;;
45
+ esac
46
+ done
47
+ # An empty PATH searches the current directory.
48
+ PATH=${helper_path:-/}
31
49
  self=$0
50
+ # MSYS and Cygwin can launch this with a native Windows path, which has no slash
51
+ # for `${self%/*}` to strip. Only a drive letter or a UNC prefix marks one; a
52
+ # backslash anywhere else is an ordinary character in a Unix file name, so the
53
+ # path is left alone. The separators are swapped in the shell rather than through
54
+ # `echo`, which mangles a `\t` or `\b` in a path under dash.
55
+ case $self in
56
+ [A-Za-z]:\\*|\\\\*)
57
+ while :; do
58
+ case $self in
59
+ *\\*) self=${self%%\\*}/${self#*\\} ;;
60
+ *) break ;;
61
+ esac
62
+ done
63
+ ;;
64
+ esac
32
65
  # `${self%/*}` needs a slash to strip. A bare name came from a PATH lookup and
33
66
  # stands for a file in the current directory.
34
67
  case $self in
@@ -44,5 +77,14 @@ while [ -L "$self" ] && [ "$hops" -lt 40 ]; do
44
77
  *) self=${self%/*}/$link ;;
45
78
  esac
46
79
  done
80
+ if [ -n "$caller_path_set" ]; then PATH=$caller_path; else unset PATH; fi
81
+ # The walk has to end at a regular file. Running out of hops leaves $self a
82
+ # symlink; a chain that changed under us can leave it dangling or a directory, and
83
+ # a failed readlink leaves a trailing slash. Each case would take `bin/pnpm.mjs`
84
+ # from the wrong directory.
85
+ if [ -L "$self" ] || [ ! -f "$self" ]; then
86
+ echo "pnpm: could not resolve $0 to a regular file within 40 symlink hops." >&2
87
+ exit 1
88
+ fi
47
89
 
48
90
  exec node "${self%/*}/bin/pnpm.mjs" "$@"
package/pnpx CHANGED
@@ -8,7 +8,40 @@
8
8
  # itself first. The hop cap matches the kernel's ELOOP limit, so a cycle cannot
9
9
  # hang the script. Directories come from `${self%/*}` and `readlink` runs through
10
10
  # `command -p`, so the caller's `PATH` decides nothing here.
11
+ #
12
+ # Where no default path is compiled in, as on Nix, `command -p` searches PATH
13
+ # instead, so the helpers run with node_modules and relative entries dropped from
14
+ # PATH.
15
+ caller_path_set=${PATH+set}
16
+ caller_path=${PATH-}
17
+ helper_path=
18
+ rest=$caller_path:
19
+ while [ -n "$rest" ]; do
20
+ dir=${rest%%:*}
21
+ rest=${rest#*:}
22
+ case "$dir" in
23
+ */node_modules/*|*/node_modules) ;;
24
+ /*) helper_path=${helper_path:+$helper_path:}$dir ;;
25
+ esac
26
+ done
27
+ # An empty PATH searches the current directory.
28
+ PATH=${helper_path:-/}
11
29
  self=$0
30
+ # MSYS and Cygwin can launch this with a native Windows path, which has no slash
31
+ # for `${self%/*}` to strip. Only a drive letter or a UNC prefix marks one; a
32
+ # backslash anywhere else is an ordinary character in a Unix file name, so the
33
+ # path is left alone. The separators are swapped in the shell rather than through
34
+ # `echo`, which mangles a `\t` or `\b` in a path under dash.
35
+ case $self in
36
+ [A-Za-z]:\\*|\\\\*)
37
+ while :; do
38
+ case $self in
39
+ *\\*) self=${self%%\\*}/${self#*\\} ;;
40
+ *) break ;;
41
+ esac
42
+ done
43
+ ;;
44
+ esac
12
45
  # `${self%/*}` needs a slash to strip. A bare name came from a `PATH` lookup and
13
46
  # stands for a file in the current directory.
14
47
  case $self in
@@ -24,6 +57,7 @@ while [ -L "$self" ] && [ "$hops" -lt 40 ]; do
24
57
  *) self=${self%/*}/$link ;;
25
58
  esac
26
59
  done
60
+ if [ -n "$caller_path_set" ]; then PATH=$caller_path; else unset PATH; fi
27
61
  # The walk has to end at a regular file. Running out of hops leaves $self a
28
62
  # symlink; a chain that changed under us can leave it dangling or a directory, and
29
63
  # a failed readlink leaves a trailing slash. Each case would take `pnpm` from the
package/pnx CHANGED
@@ -8,7 +8,40 @@
8
8
  # itself first. The hop cap matches the kernel's ELOOP limit, so a cycle cannot
9
9
  # hang the script. Directories come from `${self%/*}` and `readlink` runs through
10
10
  # `command -p`, so the caller's `PATH` decides nothing here.
11
+ #
12
+ # Where no default path is compiled in, as on Nix, `command -p` searches PATH
13
+ # instead, so the helpers run with node_modules and relative entries dropped from
14
+ # PATH.
15
+ caller_path_set=${PATH+set}
16
+ caller_path=${PATH-}
17
+ helper_path=
18
+ rest=$caller_path:
19
+ while [ -n "$rest" ]; do
20
+ dir=${rest%%:*}
21
+ rest=${rest#*:}
22
+ case "$dir" in
23
+ */node_modules/*|*/node_modules) ;;
24
+ /*) helper_path=${helper_path:+$helper_path:}$dir ;;
25
+ esac
26
+ done
27
+ # An empty PATH searches the current directory.
28
+ PATH=${helper_path:-/}
11
29
  self=$0
30
+ # MSYS and Cygwin can launch this with a native Windows path, which has no slash
31
+ # for `${self%/*}` to strip. Only a drive letter or a UNC prefix marks one; a
32
+ # backslash anywhere else is an ordinary character in a Unix file name, so the
33
+ # path is left alone. The separators are swapped in the shell rather than through
34
+ # `echo`, which mangles a `\t` or `\b` in a path under dash.
35
+ case $self in
36
+ [A-Za-z]:\\*|\\\\*)
37
+ while :; do
38
+ case $self in
39
+ *\\*) self=${self%%\\*}/${self#*\\} ;;
40
+ *) break ;;
41
+ esac
42
+ done
43
+ ;;
44
+ esac
12
45
  # `${self%/*}` needs a slash to strip. A bare name came from a `PATH` lookup and
13
46
  # stands for a file in the current directory.
14
47
  case $self in
@@ -24,6 +57,7 @@ while [ -L "$self" ] && [ "$hops" -lt 40 ]; do
24
57
  *) self=${self%/*}/$link ;;
25
58
  esac
26
59
  done
60
+ if [ -n "$caller_path_set" ]; then PATH=$caller_path; else unset PATH; fi
27
61
  # The walk has to end at a regular file. Running out of hops leaves $self a
28
62
  # symlink; a chain that changed under us can leave it dangling or a directory, and
29
63
  # a failed readlink leaves a trailing slash. Each case would take `pnpm` from the