@pnpm/exe 12.8.0 → 12.8.2

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.
@@ -43,6 +43,8 @@ while [ -L "$link" ] && [ "$hops" -lt 40 ]; do
43
43
  done
44
44
  basedir=$(command -p printf '%s\n' "$link" | command -p sed -e 's,\\,/,g')
45
45
  basedir="${basedir%/*}"
46
+ basedir_abs=$(CDPATH= cd -P -- "$basedir" && pwd -P) || exit $?
47
+ basedir="$basedir_abs"
46
48
  basedir_win="$basedir"
47
49
  exe=""
48
50
  msys=""
@@ -73,11 +75,12 @@ case `command -p uname -a` in
73
75
  esac
74
76
  if [ -n "$caller_path_set" ]; then PATH=$caller_path; else unset PATH; fi
75
77
 
76
- basedir_abs=$(CDPATH= cd -P -- "$basedir" && pwd -P) || exit $?
77
78
  if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
78
79
  exec "$basedir/node.exe" "$basedir_win/../get-pnpm/bin/get-pnpm.js" "$@"
79
80
  elif [ -x "$basedir/node" ]; then
80
81
  exec "$basedir/node" "$basedir_abs/../get-pnpm/bin/get-pnpm.js" "$@"
82
+ elif [ -n "$msys" ] && command -v node >/dev/null 2>&1; then
83
+ exec node "$basedir_win/../get-pnpm/bin/get-pnpm.js" "$@"
81
84
  elif command -v node >/dev/null 2>&1; then
82
85
  exec node "$basedir_abs/../get-pnpm/bin/get-pnpm.js" "$@"
83
86
  elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
@@ -43,6 +43,8 @@ while [ -L "$link" ] && [ "$hops" -lt 40 ]; do
43
43
  done
44
44
  basedir=$(command -p printf '%s\n' "$link" | command -p sed -e 's,\\,/,g')
45
45
  basedir="${basedir%/*}"
46
+ basedir_abs=$(CDPATH= cd -P -- "$basedir" && pwd -P) || exit $?
47
+ basedir="$basedir_abs"
46
48
  basedir_win="$basedir"
47
49
  exe=""
48
50
  msys=""
@@ -73,11 +75,12 @@ case `command -p uname -a` in
73
75
  esac
74
76
  if [ -n "$caller_path_set" ]; then PATH=$caller_path; else unset PATH; fi
75
77
 
76
- basedir_abs=$(CDPATH= cd -P -- "$basedir" && pwd -P) || exit $?
77
78
  if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
78
79
  exec "$basedir/node.exe" "$basedir_win/../node-gyp/bin/node-gyp.js" "$@"
79
80
  elif [ -x "$basedir/node" ]; then
80
81
  exec "$basedir/node" "$basedir_abs/../node-gyp/bin/node-gyp.js" "$@"
82
+ elif [ -n "$msys" ] && command -v node >/dev/null 2>&1; then
83
+ exec node "$basedir_win/../node-gyp/bin/node-gyp.js" "$@"
81
84
  elif command -v node >/dev/null 2>&1; then
82
85
  exec node "$basedir_abs/../node-gyp/bin/node-gyp.js" "$@"
83
86
  elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
@@ -43,6 +43,8 @@ while [ -L "$link" ] && [ "$hops" -lt 40 ]; do
43
43
  done
44
44
  basedir=$(command -p printf '%s\n' "$link" | command -p sed -e 's,\\,/,g')
45
45
  basedir="${basedir%/*}"
46
+ basedir_abs=$(CDPATH= cd -P -- "$basedir" && pwd -P) || exit $?
47
+ basedir="$basedir_abs"
46
48
  basedir_win="$basedir"
47
49
  exe=""
48
50
  msys=""
@@ -73,11 +75,12 @@ case `command -p uname -a` in
73
75
  esac
74
76
  if [ -n "$caller_path_set" ]; then PATH=$caller_path; else unset PATH; fi
75
77
 
76
- basedir_abs=$(CDPATH= cd -P -- "$basedir" && pwd -P) || exit $?
77
78
  if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
78
79
  exec "$basedir/node.exe" "$basedir_win/../which/bin/which.js" "$@"
79
80
  elif [ -x "$basedir/node" ]; then
80
81
  exec "$basedir/node" "$basedir_abs/../which/bin/which.js" "$@"
82
+ elif [ -n "$msys" ] && command -v node >/dev/null 2>&1; then
83
+ exec node "$basedir_win/../which/bin/which.js" "$@"
81
84
  elif command -v node >/dev/null 2>&1; then
82
85
  exec node "$basedir_abs/../which/bin/which.js" "$@"
83
86
  elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
@@ -43,6 +43,8 @@ while [ -L "$link" ] && [ "$hops" -lt 40 ]; do
43
43
  done
44
44
  basedir=$(command -p printf '%s\n' "$link" | command -p sed -e 's,\\,/,g')
45
45
  basedir="${basedir%/*}"
46
+ basedir_abs=$(CDPATH= cd -P -- "$basedir" && pwd -P) || exit $?
47
+ basedir="$basedir_abs"
46
48
  basedir_win="$basedir"
47
49
  exe=""
48
50
  msys=""
@@ -73,11 +75,12 @@ case `command -p uname -a` in
73
75
  esac
74
76
  if [ -n "$caller_path_set" ]; then PATH=$caller_path; else unset PATH; fi
75
77
 
76
- basedir_abs=$(CDPATH= cd -P -- "$basedir" && pwd -P) || exit $?
77
78
  if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
78
79
  exec "$basedir/node.exe" "$basedir_win/../nopt/bin/nopt.js" "$@"
79
80
  elif [ -x "$basedir/node" ]; then
80
81
  exec "$basedir/node" "$basedir_abs/../nopt/bin/nopt.js" "$@"
82
+ elif [ -n "$msys" ] && command -v node >/dev/null 2>&1; then
83
+ exec node "$basedir_win/../nopt/bin/nopt.js" "$@"
81
84
  elif command -v node >/dev/null 2>&1; then
82
85
  exec node "$basedir_abs/../nopt/bin/nopt.js" "$@"
83
86
  elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
@@ -43,6 +43,8 @@ while [ -L "$link" ] && [ "$hops" -lt 40 ]; do
43
43
  done
44
44
  basedir=$(command -p printf '%s\n' "$link" | command -p sed -e 's,\\,/,g')
45
45
  basedir="${basedir%/*}"
46
+ basedir_abs=$(CDPATH= cd -P -- "$basedir" && pwd -P) || exit $?
47
+ basedir="$basedir_abs"
46
48
  basedir_win="$basedir"
47
49
  exe=""
48
50
  msys=""
@@ -73,11 +75,12 @@ case `command -p uname -a` in
73
75
  esac
74
76
  if [ -n "$caller_path_set" ]; then PATH=$caller_path; else unset PATH; fi
75
77
 
76
- basedir_abs=$(CDPATH= cd -P -- "$basedir" && pwd -P) || exit $?
77
78
  if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
78
79
  exec "$basedir/node.exe" "$basedir_win/../semver/bin/semver.js" "$@"
79
80
  elif [ -x "$basedir/node" ]; then
80
81
  exec "$basedir/node" "$basedir_abs/../semver/bin/semver.js" "$@"
82
+ elif [ -n "$msys" ] && command -v node >/dev/null 2>&1; then
83
+ exec node "$basedir_win/../semver/bin/semver.js" "$@"
81
84
  elif command -v node >/dev/null 2>&1; then
82
85
  exec node "$basedir_abs/../semver/bin/semver.js" "$@"
83
86
  elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
@@ -1,9 +1,10 @@
1
1
  {
2
- "lastValidatedTimestamp": 1790578965103,
2
+ "lastValidatedTimestamp": 1790728888790,
3
3
  "projects": {
4
4
  "/home/runner/_work/pnpm/pnpm/pnpm/npm/pnpm/temp-deploy": {
5
5
  "name": "pacquet",
6
- "version": "12.8.0"
6
+ "version": "12.8.2",
7
+ "hasModulesDir": true
7
8
  }
8
9
  },
9
10
  "pnpmfiles": [],
@@ -87,6 +88,7 @@
87
88
  "@types/zkochan__table": "npm:@types/table@6.3.2",
88
89
  "@typescript-eslint/utils": "^8.70.1",
89
90
  "@typescript/native-preview": "7.0.0-dev.20260707.2",
91
+ "@webcontainer/api": "^1.6.4",
90
92
  "@yarnpkg/core": "4.9.1",
91
93
  "@yarnpkg/extensions": "2.0.7",
92
94
  "@yarnpkg/fslib": "^3.1.5",
@@ -112,7 +114,7 @@
112
114
  "camelcase-keys": "^10.0.3",
113
115
  "can-link": "^3.0.0",
114
116
  "can-write-to-dir": "^2.0.0",
115
- "chalk": "^6.0.0",
117
+ "chalk": "^6.0.1",
116
118
  "ci-info": "^4.4.0",
117
119
  "cli-truncate": "^6.1.1",
118
120
  "cmd-extension": "^2.0.0",
@@ -133,7 +135,7 @@
133
135
  "eslint": "^10.11.0",
134
136
  "eslint-plugin-import-x": "^4.17.1",
135
137
  "eslint-plugin-jest": "^29.16.6",
136
- "eslint-plugin-n": "^18.3.0",
138
+ "eslint-plugin-n": "^18.4.0",
137
139
  "eslint-plugin-promise": "^7.3.0",
138
140
  "eslint-plugin-regexp": "^3.1.1",
139
141
  "eslint-plugin-simple-import-sort": "^14.0.0",
@@ -149,8 +151,8 @@
149
151
  "graceful-fs": "^4.2.11",
150
152
  "graph-cycles": "3.0.0",
151
153
  "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",
154
+ "http-proxy-agent": "^9.1.0",
155
+ "https-proxy-agent": "^9.1.0",
154
156
  "https-proxy-server-express": "0.1.2",
155
157
  "human-id": "^4.2.1",
156
158
  "husky": "^9.1.7",
@@ -158,7 +160,7 @@
158
160
  "ini": "6.0.0",
159
161
  "is-gzip": "2.0.0",
160
162
  "is-inner-link": "^5.0.0",
161
- "is-subdir": "^2.0.0",
163
+ "is-subdir": "^2.0.1",
162
164
  "is-windows": "^1.0.2",
163
165
  "isexe": "4.0.0",
164
166
  "jest": "30.4.2",
@@ -189,7 +191,7 @@
189
191
  "npm-registry-fetch": "^19.0.0",
190
192
  "object-hash": "3.0.0",
191
193
  "open": "^11.0.4",
192
- "openpgp": "^6.3.1",
194
+ "openpgp": "^6.3.2",
193
195
  "p-defer": "^4.0.1",
194
196
  "p-every": "^2.0.0",
195
197
  "p-filter": "^4.1.0",
@@ -202,8 +204,9 @@
202
204
  "path-name": "^1.0.0",
203
205
  "path-temp": "^3.0.0",
204
206
  "pidtree": "^1.0.0",
207
+ "playwright-core": "^1.63.0",
205
208
  "preferred-pm": "^5.0.1",
206
- "pretty-bytes": "^7.1.3",
209
+ "pretty-bytes": "^7.2.0",
207
210
  "pretty-ms": "^9.3.1",
208
211
  "promise-share": "^2.0.1",
209
212
  "proxy": "^4.1.0",
@@ -233,7 +236,7 @@
233
236
  "shx": "^0.4.0",
234
237
  "signal-exit": "^4.1.0",
235
238
  "socks": "^2.8.10",
236
- "socks-proxy-agent": "^8.0.5",
239
+ "socks-proxy-agent": "^10.1.0",
237
240
  "sort-keys": "^6.0.1",
238
241
  "spdx-expression-parse": "5.0.0",
239
242
  "split-cmd": "^1.1.0",
@@ -241,7 +244,7 @@
241
244
  "ssri": "13.0.1",
242
245
  "stacktracey": "^2.2.0",
243
246
  "string-length": "^7.0.1",
244
- "string-width": "^8.2.2",
247
+ "string-width": "^8.3.0",
245
248
  "strip-bom": "^5.0.0",
246
249
  "strip-comments-strings": "1.2.0",
247
250
  "symlink-dir": "^10.0.3",
@@ -256,7 +259,7 @@
256
259
  "typescript": "6.0.3",
257
260
  "typescript-eslint": "^8.70.1",
258
261
  "uid-number": "0.0.6",
259
- "undici": "^7.29.0",
262
+ "undici": "^7.29.1",
260
263
  "unified": "^11.0.5",
261
264
  "validate-npm-package-name": "7.0.2",
262
265
  "version-selector-type": "^3.0.0",
@@ -263,11 +263,77 @@ class Request {
263
263
  }
264
264
  }
265
265
 
266
- onUpgrade (statusCode, headers, socket) {
266
+ /**
267
+ * @param {number|null} statusCode
268
+ * @param {Buffer[]|null} headers
269
+ * @param {import('node:stream').Duplex} socket
270
+ * @param {string} [statusText]
271
+ */
272
+ onUpgrade (statusCode, headers, socket, statusText = '') {
273
+ this.onFinally()
274
+
267
275
  assert(!this.aborted)
268
276
  assert(!this.completed)
269
277
 
270
- return this[kHandler].onUpgrade(statusCode, headers, socket)
278
+ if (statusCode !== null) {
279
+ this.#publishUpgradeHeaders(statusCode, headers, statusText)
280
+ }
281
+
282
+ const result = this[kHandler].onUpgrade(statusCode, headers, socket)
283
+
284
+ if (!this.aborted) {
285
+ this.completed = true
286
+ if (statusCode !== null) {
287
+ this.#publishUpgradeTrailers()
288
+ }
289
+ }
290
+
291
+ return result
292
+ }
293
+
294
+ /**
295
+ * @param {number} statusCode
296
+ * @param {import('node:http2').IncomingHttpHeaders} headers
297
+ * @param {(headers: import('node:http2').IncomingHttpHeaders) => Buffer[]} parseHeaders
298
+ * @param {string} [statusText]
299
+ */
300
+ onUpgradeResponse (statusCode, headers, parseHeaders, statusText = '') {
301
+ assert(!this.aborted)
302
+ assert(this.completed)
303
+
304
+ if (channels.headers.hasSubscribers) {
305
+ this.#publishUpgradeHeaders(statusCode, parseHeaders(headers), statusText)
306
+ }
307
+ this.#publishUpgradeTrailers()
308
+ }
309
+
310
+ /**
311
+ * @param {Error} error
312
+ */
313
+ onUpgradeError (error) {
314
+ assert(!this.aborted)
315
+ assert(this.completed)
316
+
317
+ if (channels.error.hasSubscribers) {
318
+ channels.error.publish({ request: this, error })
319
+ }
320
+ }
321
+
322
+ /**
323
+ * @param {number} statusCode
324
+ * @param {Buffer[]} headers
325
+ * @param {string} statusText
326
+ */
327
+ #publishUpgradeHeaders (statusCode, headers, statusText) {
328
+ if (channels.headers.hasSubscribers) {
329
+ channels.headers.publish({ request: this, response: { statusCode, headers, statusText } })
330
+ }
331
+ }
332
+
333
+ #publishUpgradeTrailers () {
334
+ if (channels.trailers.hasSubscribers) {
335
+ channels.trailers.publish({ request: this, trailers: [] })
336
+ }
271
337
  }
272
338
 
273
339
  onComplete (trailers) {
@@ -432,7 +432,7 @@ class Parser {
432
432
  }
433
433
 
434
434
  onUpgrade (head) {
435
- const { upgrade, client, socket, headers, statusCode } = this
435
+ const { upgrade, client, socket, headers, statusCode, statusText } = this
436
436
 
437
437
  assert(upgrade)
438
438
  assert(client[kSocket] === socket)
@@ -467,9 +467,10 @@ class Parser {
467
467
  client.emit('disconnect', client[kUrl], [client], new InformationalError('upgrade'))
468
468
 
469
469
  try {
470
- request.onUpgrade(statusCode, headers, socket)
471
- } catch (err) {
472
- util.destroy(socket, err)
470
+ request.onUpgrade(statusCode, headers, socket, statusText)
471
+ } catch (error) {
472
+ util.errorRequest(client, request, error)
473
+ util.destroy(socket, error)
473
474
  }
474
475
 
475
476
  client[kResume]()
@@ -1050,12 +1051,22 @@ function writeH1 (client, request) {
1050
1051
  const socket = client[kSocket]
1051
1052
  clearIdleSocketValidation(socket)
1052
1053
 
1053
- const abort = (err) => {
1054
- if (request.aborted || request.completed) {
1054
+ /**
1055
+ * @param {Error} [error]
1056
+ */
1057
+ const abort = (error) => {
1058
+ if (request.aborted) {
1059
+ return
1060
+ }
1061
+
1062
+ if (request.completed) {
1063
+ if (request.upgrade || request.method === 'CONNECT') {
1064
+ util.destroy(socket, new InformationalError('aborted'))
1065
+ }
1055
1066
  return
1056
1067
  }
1057
1068
 
1058
- util.errorRequest(client, request, err || new RequestAbortedError())
1069
+ util.errorRequest(client, request, error || new RequestAbortedError())
1059
1070
 
1060
1071
  util.destroy(body)
1061
1072
  util.destroy(socket, new InformationalError('aborted'))
@@ -1,6 +1,7 @@
1
1
  'use strict'
2
2
 
3
3
  const assert = require('node:assert')
4
+ const { errorMonitor } = require('node:events')
4
5
  const { pipeline } = require('node:stream')
5
6
  const util = require('../core/util.js')
6
7
  const {
@@ -77,6 +78,15 @@ function parseH2Headers (headers) {
77
78
  return result
78
79
  }
79
80
 
81
+ /**
82
+ * @param {import('node:http2').IncomingHttpHeaders} headers
83
+ * @returns {Buffer[]}
84
+ */
85
+ function parseH2ResponseHeaders (headers) {
86
+ const { [HTTP2_HEADER_STATUS]: _statusCode, ...realHeaders } = headers
87
+ return parseH2Headers(realHeaders)
88
+ }
89
+
80
90
  async function connectH2 (client, socket) {
81
91
  client[kSocket] = socket
82
92
 
@@ -297,22 +307,32 @@ function writeH2 (client, request) {
297
307
  headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname}${port ? `:${port}` : ''}`
298
308
  headers[HTTP2_HEADER_METHOD] = method
299
309
 
300
- const abort = (err) => {
301
- if (request.aborted || request.completed) {
310
+ /**
311
+ * @param {Error} [error]
312
+ */
313
+ const abort = (error) => {
314
+ if (request.aborted) {
315
+ return
316
+ }
317
+
318
+ if (request.completed) {
319
+ if (method === 'CONNECT' && stream != null) {
320
+ util.destroy(stream, error || new RequestAbortedError())
321
+ }
302
322
  return
303
323
  }
304
324
 
305
- err = err || new RequestAbortedError()
325
+ error = error || new RequestAbortedError()
306
326
 
307
- util.errorRequest(client, request, err)
327
+ util.errorRequest(client, request, error)
308
328
 
309
329
  if (stream != null) {
310
- util.destroy(stream, err)
330
+ util.destroy(stream, error)
311
331
  }
312
332
 
313
333
  // We do not destroy the socket as we can continue using the session
314
334
  // the stream get's destroyed and the session remains to create new streams
315
- util.destroy(body, err)
335
+ util.destroy(body, error)
316
336
  client[kQueue][client[kRunningIdx]++] = null
317
337
  client[kResume]()
318
338
  }
@@ -331,25 +351,57 @@ function writeH2 (client, request) {
331
351
 
332
352
  if (method === 'CONNECT') {
333
353
  session.ref()
334
- // We are already connected, streams are pending, first request
335
- // will create a new stream. We trigger a request to create the stream and wait until
336
- // `ready` event is triggered
337
354
  // We disabled endStream to allow the user to write to the stream
338
355
  stream = session.request(headers, { endStream: false, signal })
356
+ let upgradeResponseFinished = false
357
+
358
+ /**
359
+ * @param {import('node:http2').IncomingHttpHeaders} headers
360
+ */
361
+ const onResponse = (headers) => {
362
+ upgradeResponseFinished = true
363
+ stream.off(errorMonitor, onUpgradeError)
364
+ request.onUpgradeResponse(Number(headers[HTTP2_HEADER_STATUS]), headers, parseH2ResponseHeaders)
365
+ }
339
366
 
340
- if (stream.id && !stream.pending) {
341
- request.onUpgrade(null, null, stream)
342
- ++session[kOpenStreams]
343
- client[kQueue][client[kRunningIdx]++] = null
344
- } else {
345
- stream.once('ready', () => {
367
+ /**
368
+ * @param {Error} error
369
+ */
370
+ const onUpgradeError = (error) => {
371
+ upgradeResponseFinished = true
372
+ stream.off('response', onResponse)
373
+ request.onUpgradeError(error)
374
+ }
375
+
376
+ const onReady = () => {
377
+ try {
346
378
  request.onUpgrade(null, null, stream)
347
- ++session[kOpenStreams]
348
- client[kQueue][client[kRunningIdx]++] = null
349
- })
379
+ } catch (error) {
380
+ stream.off('response', onResponse)
381
+ abort(error)
382
+ return
383
+ }
384
+
385
+ if (request.aborted) {
386
+ return
387
+ }
388
+
389
+ stream.off('error', abort)
390
+ stream.once(errorMonitor, onUpgradeError)
391
+ client[kQueue][client[kRunningIdx]++] = null
350
392
  }
351
393
 
394
+ stream.once('response', onResponse)
395
+ stream.once('error', abort)
396
+ ++session[kOpenStreams]
397
+ onReady()
398
+
352
399
  stream.once('close', () => {
400
+ if (!upgradeResponseFinished && request.completed) {
401
+ stream.off('response', onResponse)
402
+ stream.off(errorMonitor, onUpgradeError)
403
+ request.onUpgradeError(new InformationalError(`HTTP/2: "stream error" received - code ${stream.rstCode}`))
404
+ }
353
405
  session[kOpenStreams] -= 1
354
406
  if (session[kOpenStreams] === 0) session.unref()
355
407
  })
@@ -205,7 +205,10 @@ class RetryHandler {
205
205
  this.retryCount += 1
206
206
 
207
207
  if (statusCode >= 300) {
208
- if (this.retryOpts.statusCodes.includes(statusCode) === false) {
208
+ // Only expose a response if no earlier attempt has reached the caller.
209
+ // Otherwise abort this attempt so the error settles the existing body
210
+ // instead of replacing it with a new response.
211
+ if (!this.headersSent && this.retryOpts.statusCodes.includes(statusCode) === false) {
209
212
  this.headersSent = true
210
213
  this.checkpointResponseEnd(headers, resume)
211
214
  return this.handler.onHeaders(
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "undici",
3
- "version": "6.28.1",
3
+ "version": "6.29.0",
4
4
  "description": "An HTTP/1.1 client, written from scratch for Node.js",
5
5
  "homepage": "https://undici.nodejs.org",
6
6
  "bugs": {
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "./dist/node_modules/node-gyp/gyp/gyp"
10
10
  ]
11
11
  },
12
- "version": "12.8.0",
12
+ "version": "12.8.2",
13
13
  "description": "Fast, disk space efficient package manager",
14
14
  "keywords": [
15
15
  "pnpm",
@@ -17,7 +17,7 @@
17
17
  "rust"
18
18
  ],
19
19
  "license": "MIT",
20
- "homepage": "https://github.com/pnpm/pnpm/tree/main/pnpm",
20
+ "homepage": "https://pnpm.io",
21
21
  "bugs": "https://github.com/pnpm/pnpm/issues",
22
22
  "repository": {
23
23
  "type": "git",
@@ -46,20 +46,20 @@
46
46
  "THIRD-PARTY-NOTICES.md"
47
47
  ],
48
48
  "optionalDependencies": {
49
- "@pnpm/exe.win32-x64": "12.8.0",
50
- "@pnpm/exe.win32-arm64": "12.8.0",
51
- "@pnpm/exe.darwin-x64": "12.8.0",
52
- "@pnpm/exe.darwin-arm64": "12.8.0",
53
- "@pnpm/exe.linux-x64": "12.8.0",
54
- "@pnpm/exe.linux-arm64": "12.8.0",
55
- "@pnpm/exe.linux-riscv64": "12.8.0",
56
- "@pnpm/exe.linux-ppc64": "12.8.0",
57
- "@pnpm/exe.linux-s390x": "12.8.0",
58
- "@pnpm/exe.linux-x64-musl": "12.8.0",
59
- "@pnpm/exe.linux-arm64-musl": "12.8.0",
60
- "@pnpm/exe.freebsd-x64": "12.8.0",
61
- "@pnpm/exe.android-arm64": "12.8.0",
62
- "@pnpm/exe.android-x64": "12.8.0"
49
+ "@pnpm/exe.win32-x64": "12.8.2",
50
+ "@pnpm/exe.win32-arm64": "12.8.2",
51
+ "@pnpm/exe.darwin-x64": "12.8.2",
52
+ "@pnpm/exe.darwin-arm64": "12.8.2",
53
+ "@pnpm/exe.linux-x64": "12.8.2",
54
+ "@pnpm/exe.linux-arm64": "12.8.2",
55
+ "@pnpm/exe.linux-riscv64": "12.8.2",
56
+ "@pnpm/exe.linux-ppc64": "12.8.2",
57
+ "@pnpm/exe.linux-s390x": "12.8.2",
58
+ "@pnpm/exe.linux-x64-musl": "12.8.2",
59
+ "@pnpm/exe.linux-arm64-musl": "12.8.2",
60
+ "@pnpm/exe.freebsd-x64": "12.8.2",
61
+ "@pnpm/exe.android-arm64": "12.8.2",
62
+ "@pnpm/exe.android-x64": "12.8.2"
63
63
  },
64
64
  "scripts": {
65
65
  "preinstall": "node install.js",
package/pn CHANGED
@@ -9,9 +9,8 @@
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
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.
12
+ # A helper the default path lacks, as in a Nix build sandbox, comes from PATH
13
+ # instead, with node_modules and relative entries dropped from it.
15
14
  caller_path_set=${PATH+set}
16
15
  caller_path=${PATH-}
17
16
  helper_path=
@@ -26,6 +25,11 @@ while [ -n "$rest" ]; do
26
25
  done
27
26
  # An empty PATH searches the current directory.
28
27
  PATH=${helper_path:-/}
28
+ # A helper comes from PATH only when the default path lacks it and PATH has it.
29
+ # The bash 3.2 that macOS ships as sh answers `command -p -v` from PATH.
30
+ run_helper() {
31
+ if command -p -v "$1" >/dev/null 2>&1 || ! command -v "$1" >/dev/null 2>&1; then command -p "$@"; else command "$@"; fi
32
+ }
29
33
  self=$0
30
34
  # MSYS and Cygwin can launch this with a native Windows path, which has no slash
31
35
  # for `${self%/*}` to strip. Only a drive letter or a UNC prefix marks one; a
@@ -51,7 +55,7 @@ esac
51
55
  hops=0
52
56
  while [ -L "$self" ] && [ "$hops" -lt 40 ]; do
53
57
  hops=$((hops + 1))
54
- link=$(command -p readlink "$self")
58
+ link=$(run_helper readlink "$self")
55
59
  case $link in
56
60
  /*) self=$link ;;
57
61
  *) self=${self%/*}/$link ;;
package/pnpm CHANGED
@@ -29,9 +29,8 @@ fi
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
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.
32
+ # A helper the default path lacks, as in a Nix build sandbox, comes from PATH
33
+ # instead, with node_modules and relative entries dropped from it.
35
34
  caller_path_set=${PATH+set}
36
35
  caller_path=${PATH-}
37
36
  helper_path=
@@ -46,6 +45,11 @@ while [ -n "$rest" ]; do
46
45
  done
47
46
  # An empty PATH searches the current directory.
48
47
  PATH=${helper_path:-/}
48
+ # A helper comes from PATH only when the default path lacks it and PATH has it.
49
+ # The bash 3.2 that macOS ships as sh answers `command -p -v` from PATH.
50
+ run_helper() {
51
+ if command -p -v "$1" >/dev/null 2>&1 || ! command -v "$1" >/dev/null 2>&1; then command -p "$@"; else command "$@"; fi
52
+ }
49
53
  self=$0
50
54
  # MSYS and Cygwin can launch this with a native Windows path, which has no slash
51
55
  # for `${self%/*}` to strip. Only a drive letter or a UNC prefix marks one; a
@@ -71,7 +75,7 @@ esac
71
75
  hops=0
72
76
  while [ -L "$self" ] && [ "$hops" -lt 40 ]; do
73
77
  hops=$((hops + 1))
74
- link=$(command -p readlink "$self")
78
+ link=$(run_helper readlink "$self")
75
79
  case $link in
76
80
  /*) self=$link ;;
77
81
  *) self=${self%/*}/$link ;;
package/pnpx CHANGED
@@ -9,9 +9,8 @@
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
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.
12
+ # A helper the default path lacks, as in a Nix build sandbox, comes from PATH
13
+ # instead, with node_modules and relative entries dropped from it.
15
14
  caller_path_set=${PATH+set}
16
15
  caller_path=${PATH-}
17
16
  helper_path=
@@ -26,6 +25,11 @@ while [ -n "$rest" ]; do
26
25
  done
27
26
  # An empty PATH searches the current directory.
28
27
  PATH=${helper_path:-/}
28
+ # A helper comes from PATH only when the default path lacks it and PATH has it.
29
+ # The bash 3.2 that macOS ships as sh answers `command -p -v` from PATH.
30
+ run_helper() {
31
+ if command -p -v "$1" >/dev/null 2>&1 || ! command -v "$1" >/dev/null 2>&1; then command -p "$@"; else command "$@"; fi
32
+ }
29
33
  self=$0
30
34
  # MSYS and Cygwin can launch this with a native Windows path, which has no slash
31
35
  # for `${self%/*}` to strip. Only a drive letter or a UNC prefix marks one; a
@@ -51,7 +55,7 @@ esac
51
55
  hops=0
52
56
  while [ -L "$self" ] && [ "$hops" -lt 40 ]; do
53
57
  hops=$((hops + 1))
54
- link=$(command -p readlink "$self")
58
+ link=$(run_helper readlink "$self")
55
59
  case $link in
56
60
  /*) self=$link ;;
57
61
  *) self=${self%/*}/$link ;;
package/pnx CHANGED
@@ -9,9 +9,8 @@
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
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.
12
+ # A helper the default path lacks, as in a Nix build sandbox, comes from PATH
13
+ # instead, with node_modules and relative entries dropped from it.
15
14
  caller_path_set=${PATH+set}
16
15
  caller_path=${PATH-}
17
16
  helper_path=
@@ -26,6 +25,11 @@ while [ -n "$rest" ]; do
26
25
  done
27
26
  # An empty PATH searches the current directory.
28
27
  PATH=${helper_path:-/}
28
+ # A helper comes from PATH only when the default path lacks it and PATH has it.
29
+ # The bash 3.2 that macOS ships as sh answers `command -p -v` from PATH.
30
+ run_helper() {
31
+ if command -p -v "$1" >/dev/null 2>&1 || ! command -v "$1" >/dev/null 2>&1; then command -p "$@"; else command "$@"; fi
32
+ }
29
33
  self=$0
30
34
  # MSYS and Cygwin can launch this with a native Windows path, which has no slash
31
35
  # for `${self%/*}` to strip. Only a drive letter or a UNC prefix marks one; a
@@ -51,7 +55,7 @@ esac
51
55
  hops=0
52
56
  while [ -L "$self" ] && [ "$hops" -lt 40 ]; do
53
57
  hops=$((hops + 1))
54
- link=$(command -p readlink "$self")
58
+ link=$(run_helper readlink "$self")
55
59
  case $link in
56
60
  /*) self=$link ;;
57
61
  *) self=${self%/*}/$link ;;