@pnpm/exe 12.7.0 → 12.8.1

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.
@@ -7,6 +7,24 @@
7
7
  # path instead. A dependency's bin cannot stand in for one of them and take over
8
8
  # the shim before it reaches its target. Directories come from `${link%/*}`,
9
9
  # which needs no helper at all.
10
+ #
11
+ # Where no default path is compiled in, as on Nix, `command -p` searches PATH
12
+ # instead, so the helpers run with node_modules and relative entries dropped from
13
+ # PATH.
14
+ caller_path_set=${PATH+set}
15
+ caller_path=${PATH-}
16
+ helper_path=
17
+ rest=$caller_path:
18
+ while [ -n "$rest" ]; do
19
+ dir=${rest%%:*}
20
+ rest=${rest#*:}
21
+ case "$dir" in
22
+ */node_modules/*|*/node_modules) ;;
23
+ /*) helper_path=${helper_path:+$helper_path:}$dir ;;
24
+ esac
25
+ done
26
+ # An empty PATH searches the current directory.
27
+ PATH=${helper_path:-/}
10
28
  link="$0"
11
29
  # `${link%/*}` needs a separator to strip. A bare name came from a PATH lookup
12
30
  # and stands for a file in the current directory.
@@ -53,6 +71,7 @@ case `command -p uname -a` in
53
71
  fi
54
72
  ;;
55
73
  esac
74
+ if [ -n "$caller_path_set" ]; then PATH=$caller_path; else unset PATH; fi
56
75
 
57
76
  basedir_abs=$(CDPATH= cd -P -- "$basedir" && pwd -P) || exit $?
58
77
  if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
@@ -7,6 +7,24 @@
7
7
  # path instead. A dependency's bin cannot stand in for one of them and take over
8
8
  # the shim before it reaches its target. Directories come from `${link%/*}`,
9
9
  # which needs no helper at all.
10
+ #
11
+ # Where no default path is compiled in, as on Nix, `command -p` searches PATH
12
+ # instead, so the helpers run with node_modules and relative entries dropped from
13
+ # PATH.
14
+ caller_path_set=${PATH+set}
15
+ caller_path=${PATH-}
16
+ helper_path=
17
+ rest=$caller_path:
18
+ while [ -n "$rest" ]; do
19
+ dir=${rest%%:*}
20
+ rest=${rest#*:}
21
+ case "$dir" in
22
+ */node_modules/*|*/node_modules) ;;
23
+ /*) helper_path=${helper_path:+$helper_path:}$dir ;;
24
+ esac
25
+ done
26
+ # An empty PATH searches the current directory.
27
+ PATH=${helper_path:-/}
10
28
  link="$0"
11
29
  # `${link%/*}` needs a separator to strip. A bare name came from a PATH lookup
12
30
  # and stands for a file in the current directory.
@@ -53,6 +71,7 @@ case `command -p uname -a` in
53
71
  fi
54
72
  ;;
55
73
  esac
74
+ if [ -n "$caller_path_set" ]; then PATH=$caller_path; else unset PATH; fi
56
75
 
57
76
  basedir_abs=$(CDPATH= cd -P -- "$basedir" && pwd -P) || exit $?
58
77
  if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
@@ -7,6 +7,24 @@
7
7
  # path instead. A dependency's bin cannot stand in for one of them and take over
8
8
  # the shim before it reaches its target. Directories come from `${link%/*}`,
9
9
  # which needs no helper at all.
10
+ #
11
+ # Where no default path is compiled in, as on Nix, `command -p` searches PATH
12
+ # instead, so the helpers run with node_modules and relative entries dropped from
13
+ # PATH.
14
+ caller_path_set=${PATH+set}
15
+ caller_path=${PATH-}
16
+ helper_path=
17
+ rest=$caller_path:
18
+ while [ -n "$rest" ]; do
19
+ dir=${rest%%:*}
20
+ rest=${rest#*:}
21
+ case "$dir" in
22
+ */node_modules/*|*/node_modules) ;;
23
+ /*) helper_path=${helper_path:+$helper_path:}$dir ;;
24
+ esac
25
+ done
26
+ # An empty PATH searches the current directory.
27
+ PATH=${helper_path:-/}
10
28
  link="$0"
11
29
  # `${link%/*}` needs a separator to strip. A bare name came from a PATH lookup
12
30
  # and stands for a file in the current directory.
@@ -53,6 +71,7 @@ case `command -p uname -a` in
53
71
  fi
54
72
  ;;
55
73
  esac
74
+ if [ -n "$caller_path_set" ]; then PATH=$caller_path; else unset PATH; fi
56
75
 
57
76
  basedir_abs=$(CDPATH= cd -P -- "$basedir" && pwd -P) || exit $?
58
77
  if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
@@ -7,6 +7,24 @@
7
7
  # path instead. A dependency's bin cannot stand in for one of them and take over
8
8
  # the shim before it reaches its target. Directories come from `${link%/*}`,
9
9
  # which needs no helper at all.
10
+ #
11
+ # Where no default path is compiled in, as on Nix, `command -p` searches PATH
12
+ # instead, so the helpers run with node_modules and relative entries dropped from
13
+ # PATH.
14
+ caller_path_set=${PATH+set}
15
+ caller_path=${PATH-}
16
+ helper_path=
17
+ rest=$caller_path:
18
+ while [ -n "$rest" ]; do
19
+ dir=${rest%%:*}
20
+ rest=${rest#*:}
21
+ case "$dir" in
22
+ */node_modules/*|*/node_modules) ;;
23
+ /*) helper_path=${helper_path:+$helper_path:}$dir ;;
24
+ esac
25
+ done
26
+ # An empty PATH searches the current directory.
27
+ PATH=${helper_path:-/}
10
28
  link="$0"
11
29
  # `${link%/*}` needs a separator to strip. A bare name came from a PATH lookup
12
30
  # and stands for a file in the current directory.
@@ -53,6 +71,7 @@ case `command -p uname -a` in
53
71
  fi
54
72
  ;;
55
73
  esac
74
+ if [ -n "$caller_path_set" ]; then PATH=$caller_path; else unset PATH; fi
56
75
 
57
76
  basedir_abs=$(CDPATH= cd -P -- "$basedir" && pwd -P) || exit $?
58
77
  if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
@@ -7,6 +7,24 @@
7
7
  # path instead. A dependency's bin cannot stand in for one of them and take over
8
8
  # the shim before it reaches its target. Directories come from `${link%/*}`,
9
9
  # which needs no helper at all.
10
+ #
11
+ # Where no default path is compiled in, as on Nix, `command -p` searches PATH
12
+ # instead, so the helpers run with node_modules and relative entries dropped from
13
+ # PATH.
14
+ caller_path_set=${PATH+set}
15
+ caller_path=${PATH-}
16
+ helper_path=
17
+ rest=$caller_path:
18
+ while [ -n "$rest" ]; do
19
+ dir=${rest%%:*}
20
+ rest=${rest#*:}
21
+ case "$dir" in
22
+ */node_modules/*|*/node_modules) ;;
23
+ /*) helper_path=${helper_path:+$helper_path:}$dir ;;
24
+ esac
25
+ done
26
+ # An empty PATH searches the current directory.
27
+ PATH=${helper_path:-/}
10
28
  link="$0"
11
29
  # `${link%/*}` needs a separator to strip. A bare name came from a PATH lookup
12
30
  # and stands for a file in the current directory.
@@ -53,6 +71,7 @@ case `command -p uname -a` in
53
71
  fi
54
72
  ;;
55
73
  esac
74
+ if [ -n "$caller_path_set" ]; then PATH=$caller_path; else unset PATH; fi
56
75
 
57
76
  basedir_abs=$(CDPATH= cd -P -- "$basedir" && pwd -P) || exit $?
58
77
  if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
@@ -1,9 +1,9 @@
1
1
  {
2
- "lastValidatedTimestamp": 1790330643831,
2
+ "lastValidatedTimestamp": 1790613358937,
3
3
  "projects": {
4
4
  "/home/runner/_work/pnpm/pnpm/pnpm/npm/pnpm/temp-deploy": {
5
5
  "name": "pacquet",
6
- "version": "12.7.0"
6
+ "version": "12.8.1"
7
7
  }
8
8
  },
9
9
  "pnpmfiles": [],
@@ -34,14 +34,11 @@
34
34
  "@openpgp/web-stream-tools": "0.3.1",
35
35
  "@pnpm/byline": "^1.0.0",
36
36
  "@pnpm/colorize-semver-diff": "^2.0.0",
37
- "@pnpm/config.env-replace": "^4.1.0",
38
37
  "@pnpm/exec": "^4.0.0",
39
- "@pnpm/log.group": "4.0.1",
40
38
  "@pnpm/logger": "^1100.0.0",
41
39
  "@pnpm/meta-updater": "2.0.6",
42
40
  "@pnpm/nopt": "^0.3.1",
43
41
  "@pnpm/npm-package-arg": "^2.0.0",
44
- "@pnpm/os.env.path-extender": "^3.0.1",
45
42
  "@pnpm/patch-package": "0.0.1",
46
43
  "@pnpm/semver-diff": "^2.0.0",
47
44
  "@pnpm/tabtab": "^0.5.4",
@@ -86,6 +83,7 @@
86
83
  "@types/which": "^3.0.4",
87
84
  "@types/write-file-atomic": "^4.0.3",
88
85
  "@types/yarnpkg__lockfile": "^1.1.9",
86
+ "@types/yauzl": "^3.4.0",
89
87
  "@types/zkochan__table": "npm:@types/table@6.3.2",
90
88
  "@typescript-eslint/utils": "^8.70.1",
91
89
  "@typescript/native-preview": "7.0.0-dev.20260707.2",
@@ -100,6 +98,7 @@
100
98
  "@zkochan/rimraf": "^4.0.0",
101
99
  "@zkochan/table": "^2.0.1",
102
100
  "adm-zip": "^0.6.1",
101
+ "agentkeepalive": "^4.6.0",
103
102
  "amaro": "^1.2.1",
104
103
  "ansi-diff": "^1.2.0",
105
104
  "archy": "^1.0.0",
@@ -150,6 +149,8 @@
150
149
  "graceful-fs": "^4.2.11",
151
150
  "graph-cycles": "3.0.0",
152
151
  "hosted-git-info": "npm:@pnpm/hosted-git-info@1.0.0",
152
+ "http-proxy-agent": "^7.0.2",
153
+ "https-proxy-agent": "^7.0.6",
153
154
  "https-proxy-server-express": "0.1.2",
154
155
  "human-id": "^4.2.1",
155
156
  "husky": "^9.1.7",
@@ -157,7 +158,7 @@
157
158
  "ini": "6.0.0",
158
159
  "is-gzip": "2.0.0",
159
160
  "is-inner-link": "^5.0.0",
160
- "is-subdir": "^2.0.0",
161
+ "is-subdir": "^2.0.1",
161
162
  "is-windows": "^1.0.2",
162
163
  "isexe": "4.0.0",
163
164
  "jest": "30.4.2",
@@ -201,10 +202,11 @@
201
202
  "path-name": "^1.0.0",
202
203
  "path-temp": "^3.0.0",
203
204
  "pidtree": "^1.0.0",
204
- "preferred-pm": "^5.0.0",
205
+ "preferred-pm": "^5.0.1",
205
206
  "pretty-bytes": "^7.1.3",
206
207
  "pretty-ms": "^9.3.1",
207
208
  "promise-share": "^2.0.1",
209
+ "proxy": "^4.1.0",
208
210
  "proxyquire": "^2.1.3",
209
211
  "ps-list": "^9.0.0",
210
212
  "qrcode-terminal": "^0.12.0",
@@ -231,6 +233,7 @@
231
233
  "shx": "^0.4.0",
232
234
  "signal-exit": "^4.1.0",
233
235
  "socks": "^2.8.10",
236
+ "socks-proxy-agent": "^8.0.5",
234
237
  "sort-keys": "^6.0.1",
235
238
  "spdx-expression-parse": "5.0.0",
236
239
  "split-cmd": "^1.1.0",
@@ -266,7 +269,8 @@
266
269
  "write-package": "7.2.0",
267
270
  "write-yaml-file": "^6.0.0",
268
271
  "yaml": "^2.9.1",
269
- "yaml-tag": "1.1.0"
272
+ "yaml-tag": "1.1.0",
273
+ "yauzl": "^3.4.0"
270
274
  }
271
275
  },
272
276
  "dedupeDirectDeps": false,
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/install.js CHANGED
@@ -5,7 +5,10 @@
5
5
  // stay shebang-less because pnpm 11 records its interpreter before installing
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
- // regenerate them against `pnpm.exe`. When lifecycle scripts are blocked
8
+ // regenerate them against `pnpm.exe`. A global install uses `npm rebuild
9
+ // --global`. A project install passes the project prefix, because the
10
+ // script's working directory is the installed package. Any other install,
11
+ // such as `npm exec`, keeps its shims. When lifecycle scripts are blocked
9
12
  // (`--ignore-scripts`, pnpm/Bun default), the placeholder remains and runs pnpm
10
13
  // through Node.js wherever a shell reaches it (see the `pnpm` file).
11
14
  //
@@ -125,7 +128,6 @@ function relinkNpmWindowsShims () {
125
128
  const npmExecPath = process.env.npm_execpath
126
129
  if (
127
130
  process.platform !== 'win32' ||
128
- process.env.npm_config_global !== 'true' ||
129
131
  npmExecPath == null ||
130
132
  path.basename(npmExecPath).toLowerCase() !== 'npm-cli.js'
131
133
  ) {
@@ -136,13 +138,21 @@ function relinkNpmWindowsShims () {
136
138
  if (typeof packageName !== 'string') {
137
139
  fail('Could not determine the pnpm wrapper package name when regenerating npm shims.')
138
140
  }
139
- const result = spawnSync(process.execPath, [
141
+ const args = [
140
142
  npmExecPath,
141
143
  'rebuild',
142
- '--global',
143
144
  '--ignore-scripts',
144
- packageName,
145
- ], { stdio: 'inherit' })
145
+ ]
146
+ if (process.env.npm_config_global === 'true' || process.env.npm_config_location === 'global') {
147
+ args.push('--global', packageName)
148
+ } else {
149
+ const prefix = findNpmProjectPrefix()
150
+ if (prefix == null) {
151
+ return
152
+ }
153
+ args.push('--prefix', prefix, packageName)
154
+ }
155
+ const result = spawnSync(process.execPath, args, { stdio: 'inherit' })
146
156
  if (result.error != null) {
147
157
  fail(`Could not regenerate the npm shims for pnpm: ${result.error.message}`)
148
158
  }
@@ -151,6 +161,36 @@ function relinkNpmWindowsShims () {
151
161
  }
152
162
  }
153
163
 
164
+ /**
165
+ * The resolved path of the npm project whose `node_modules` holds this
166
+ * wrapper. Returns `null` when npm names no project, when its `node_modules`
167
+ * cannot be resolved, or when it does not contain the wrapper. `npm exec`
168
+ * installs into its own cache while the prefix still names the caller's
169
+ * project, and rebuilding there would touch an unrelated project.
170
+ *
171
+ * @returns {string | null}
172
+ */
173
+ function findNpmProjectPrefix () {
174
+ const prefix = process.env.npm_config_local_prefix
175
+ if (typeof prefix !== 'string' || prefix === '') {
176
+ return null
177
+ }
178
+ let realPrefix
179
+ let realModulesDir
180
+ try {
181
+ realPrefix = fs.realpathSync(prefix)
182
+ realModulesDir = fs.realpathSync(path.join(realPrefix, 'node_modules'))
183
+ } catch {
184
+ return null
185
+ }
186
+ // `wrapperDir` comes from the module URL, which Node resolves through symlinks.
187
+ const relative = path.relative(realModulesDir, wrapperDir)
188
+ if (relative === '' || relative.split(path.sep)[0] === '..' || path.isAbsolute(relative)) {
189
+ return null
190
+ }
191
+ return realPrefix
192
+ }
193
+
154
194
  function removeFileIfPossible (filePath) {
155
195
  try {
156
196
  fs.rmSync(filePath, { force: true })
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "./dist/node_modules/node-gyp/gyp/gyp"
10
10
  ]
11
11
  },
12
- "version": "12.7.0",
12
+ "version": "12.8.1",
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.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"
49
+ "@pnpm/exe.win32-x64": "12.8.1",
50
+ "@pnpm/exe.win32-arm64": "12.8.1",
51
+ "@pnpm/exe.darwin-x64": "12.8.1",
52
+ "@pnpm/exe.darwin-arm64": "12.8.1",
53
+ "@pnpm/exe.linux-x64": "12.8.1",
54
+ "@pnpm/exe.linux-arm64": "12.8.1",
55
+ "@pnpm/exe.linux-riscv64": "12.8.1",
56
+ "@pnpm/exe.linux-ppc64": "12.8.1",
57
+ "@pnpm/exe.linux-s390x": "12.8.1",
58
+ "@pnpm/exe.linux-x64-musl": "12.8.1",
59
+ "@pnpm/exe.linux-arm64-musl": "12.8.1",
60
+ "@pnpm/exe.freebsd-x64": "12.8.1",
61
+ "@pnpm/exe.android-arm64": "12.8.1",
62
+ "@pnpm/exe.android-x64": "12.8.1"
63
63
  },
64
64
  "scripts": {
65
65
  "preinstall": "node install.js",