pnpm 10.4.1 → 10.5.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.
Files changed (81) hide show
  1. package/dist/node_modules/.modules.yaml +10 -12
  2. package/dist/node_modules/.pnpm/lock.yaml +4 -4
  3. package/dist/node_modules/.pnpm-workspace-state.json +1 -1
  4. package/dist/node_modules/cross-spawn/node_modules/isexe/package.json +31 -0
  5. package/dist/node_modules/cross-spawn/node_modules/which/package.json +43 -0
  6. package/dist/node_modules/foreground-child/dist/commonjs/all-signals.d.ts.map +1 -1
  7. package/dist/node_modules/foreground-child/dist/commonjs/index.d.ts.map +1 -1
  8. package/dist/node_modules/foreground-child/dist/commonjs/index.js +2 -2
  9. package/dist/node_modules/foreground-child/dist/commonjs/index.js.map +1 -1
  10. package/dist/node_modules/foreground-child/dist/commonjs/proxy-signals.d.ts.map +1 -1
  11. package/dist/node_modules/foreground-child/dist/commonjs/watchdog.d.ts.map +1 -1
  12. package/dist/node_modules/foreground-child/dist/esm/all-signals.d.ts.map +1 -1
  13. package/dist/node_modules/foreground-child/dist/esm/index.d.ts.map +1 -1
  14. package/dist/node_modules/foreground-child/dist/esm/proxy-signals.d.ts.map +1 -1
  15. package/dist/node_modules/foreground-child/dist/esm/watchdog.d.ts.map +1 -1
  16. package/dist/node_modules/foreground-child/package.json +6 -11
  17. package/dist/node_modules/isexe/LICENSE +1 -1
  18. package/dist/node_modules/isexe/package.json +79 -14
  19. package/dist/node_modules/tar/node_modules/yallist/package.json +68 -0
  20. package/dist/node_modules/which/package.json +29 -20
  21. package/dist/node_modules/yallist/package.json +12 -51
  22. package/dist/pnpm.cjs +3685 -6028
  23. package/dist/worker.js +380 -751
  24. package/package.json +1 -1
  25. package/dist/node_modules/minipass-flush/node_modules/yallist/package.json +0 -29
  26. package/dist/node_modules/minipass-pipeline/node_modules/yallist/iterator.js +0 -8
  27. package/dist/node_modules/minipass-pipeline/node_modules/yallist/package.json +0 -29
  28. package/dist/node_modules/minipass-pipeline/node_modules/yallist/yallist.js +0 -426
  29. package/dist/node_modules/minipass-sized/node_modules/yallist/iterator.js +0 -8
  30. package/dist/node_modules/minipass-sized/node_modules/yallist/package.json +0 -29
  31. package/dist/node_modules/minipass-sized/node_modules/yallist/yallist.js +0 -426
  32. package/dist/node_modules/node-gyp/node_modules/isexe/LICENSE +0 -15
  33. package/dist/node_modules/node-gyp/node_modules/isexe/package.json +0 -96
  34. package/dist/node_modules/node-gyp/node_modules/which/LICENSE +0 -15
  35. package/dist/node_modules/node-gyp/node_modules/which/package.json +0 -52
  36. /package/dist/node_modules/{minipass-flush/node_modules/yallist → cross-spawn/node_modules/isexe}/LICENSE +0 -0
  37. /package/dist/node_modules/{isexe → cross-spawn/node_modules/isexe}/index.js +0 -0
  38. /package/dist/node_modules/{isexe → cross-spawn/node_modules/isexe}/mode.js +0 -0
  39. /package/dist/node_modules/{isexe → cross-spawn/node_modules/isexe}/windows.js +0 -0
  40. /package/dist/node_modules/{minipass-pipeline/node_modules/yallist → cross-spawn/node_modules/which}/LICENSE +0 -0
  41. /package/dist/node_modules/{which → cross-spawn/node_modules/which}/bin/node-which +0 -0
  42. /package/dist/node_modules/{which → cross-spawn/node_modules/which}/which.js +0 -0
  43. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/cjs/index.d.ts.map +0 -0
  44. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/cjs/index.js +0 -0
  45. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/cjs/index.js.map +0 -0
  46. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/cjs/options.d.ts.map +0 -0
  47. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/cjs/options.js +0 -0
  48. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/cjs/options.js.map +0 -0
  49. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/cjs/package.json +0 -0
  50. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/cjs/posix.d.ts.map +0 -0
  51. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/cjs/posix.js +0 -0
  52. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/cjs/posix.js.map +0 -0
  53. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/cjs/win32.d.ts.map +0 -0
  54. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/cjs/win32.js +0 -0
  55. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/cjs/win32.js.map +0 -0
  56. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/mjs/index.d.ts.map +0 -0
  57. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/mjs/index.js +0 -0
  58. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/mjs/index.js.map +0 -0
  59. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/mjs/options.d.ts.map +0 -0
  60. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/mjs/options.js +0 -0
  61. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/mjs/options.js.map +0 -0
  62. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/mjs/package.json +0 -0
  63. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/mjs/posix.d.ts.map +0 -0
  64. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/mjs/posix.js +0 -0
  65. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/mjs/posix.js.map +0 -0
  66. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/mjs/win32.d.ts.map +0 -0
  67. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/mjs/win32.js +0 -0
  68. /package/dist/node_modules/{node-gyp/node_modules/isexe → isexe}/dist/mjs/win32.js.map +0 -0
  69. /package/dist/node_modules/{yallist → tar/node_modules/yallist}/dist/commonjs/index.d.ts.map +0 -0
  70. /package/dist/node_modules/{yallist → tar/node_modules/yallist}/dist/commonjs/index.js +0 -0
  71. /package/dist/node_modules/{yallist → tar/node_modules/yallist}/dist/commonjs/index.js.map +0 -0
  72. /package/dist/node_modules/{yallist → tar/node_modules/yallist}/dist/commonjs/package.json +0 -0
  73. /package/dist/node_modules/{yallist → tar/node_modules/yallist}/dist/esm/index.d.ts.map +0 -0
  74. /package/dist/node_modules/{yallist → tar/node_modules/yallist}/dist/esm/index.js +0 -0
  75. /package/dist/node_modules/{yallist → tar/node_modules/yallist}/dist/esm/index.js.map +0 -0
  76. /package/dist/node_modules/{yallist → tar/node_modules/yallist}/dist/esm/package.json +0 -0
  77. /package/dist/node_modules/{node-gyp/node_modules/which → which}/bin/which.js +0 -0
  78. /package/dist/node_modules/{node-gyp/node_modules/which → which}/lib/index.js +0 -0
  79. /package/dist/node_modules/{minipass-sized/node_modules/yallist → yallist}/LICENSE +0 -0
  80. /package/dist/node_modules/{minipass-flush/node_modules/yallist → yallist}/iterator.js +0 -0
  81. /package/dist/node_modules/{minipass-flush/node_modules/yallist → yallist}/yallist.js +0 -0
@@ -16,8 +16,8 @@ hoistedLocations:
16
16
  agent-base@7.1.3:
17
17
  - node_modules/agent-base
18
18
  ansi-regex@5.0.1:
19
- - node_modules/strip-ansi-cjs/node_modules/ansi-regex
20
19
  - node_modules/string-width-cjs/node_modules/ansi-regex
20
+ - node_modules/strip-ansi-cjs/node_modules/ansi-regex
21
21
  - node_modules/wrap-ansi-cjs/node_modules/ansi-regex
22
22
  ansi-regex@6.1.0:
23
23
  - node_modules/ansi-regex
@@ -56,7 +56,7 @@ hoistedLocations:
56
56
  - node_modules/err-code
57
57
  exponential-backoff@3.1.2:
58
58
  - node_modules/exponential-backoff
59
- foreground-child@3.3.0:
59
+ foreground-child@3.3.1:
60
60
  - node_modules/foreground-child
61
61
  fs-minipass@3.0.3:
62
62
  - node_modules/fs-minipass
@@ -79,9 +79,9 @@ hoistedLocations:
79
79
  is-fullwidth-code-point@3.0.0:
80
80
  - node_modules/is-fullwidth-code-point
81
81
  isexe@2.0.0:
82
- - node_modules/isexe
82
+ - node_modules/cross-spawn/node_modules/isexe
83
83
  isexe@3.1.1:
84
- - node_modules/node-gyp/node_modules/isexe
84
+ - node_modules/isexe
85
85
  jackspeak@3.4.3:
86
86
  - node_modules/jackspeak
87
87
  jsbn@1.1.0:
@@ -176,19 +176,17 @@ hoistedLocations:
176
176
  v8-compile-cache@2.4.0:
177
177
  - node_modules/v8-compile-cache
178
178
  which@2.0.2:
179
- - node_modules/which
179
+ - node_modules/cross-spawn/node_modules/which
180
180
  which@5.0.0:
181
- - node_modules/node-gyp/node_modules/which
181
+ - node_modules/which
182
182
  wrap-ansi@7.0.0:
183
183
  - node_modules/wrap-ansi-cjs
184
184
  wrap-ansi@8.1.0:
185
185
  - node_modules/wrap-ansi
186
186
  yallist@4.0.0:
187
- - node_modules/minipass-flush/node_modules/yallist
188
- - node_modules/minipass-pipeline/node_modules/yallist
189
- - node_modules/minipass-sized/node_modules/yallist
190
- yallist@5.0.0:
191
187
  - node_modules/yallist
188
+ yallist@5.0.0:
189
+ - node_modules/tar/node_modules/yallist
192
190
  included:
193
191
  dependencies: true
194
192
  devDependencies: true
@@ -196,9 +194,9 @@ included:
196
194
  injectedDeps: {}
197
195
  layoutVersion: 5
198
196
  nodeLinker: hoisted
199
- packageManager: pnpm@10.2.0
197
+ packageManager: pnpm@10.4.1
200
198
  pendingBuilds: []
201
- prunedAt: Sun, 16 Feb 2025 21:54:46 GMT
199
+ prunedAt: Tue, 25 Feb 2025 12:11:26 GMT
202
200
  publicHoistPattern: []
203
201
  registries:
204
202
  default: https://registry.npmjs.org/
@@ -147,8 +147,8 @@ packages:
147
147
  exponential-backoff@3.1.2:
148
148
  resolution: {integrity: sha512-8QxYTVXUkuy7fIIoitQkPwGonB8F3Zj8eEO8Sqg9Zv/bkI7RJAzowee4gr81Hak/dUTpA2Z7VfQgoijjPNlUZA==}
149
149
 
150
- foreground-child@3.3.0:
151
- resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==}
150
+ foreground-child@3.3.1:
151
+ resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==}
152
152
  engines: {node: '>=14'}
153
153
 
154
154
  fs-minipass@3.0.3:
@@ -519,7 +519,7 @@ snapshots:
519
519
  exponential-backoff@3.1.2:
520
520
  optional: true
521
521
 
522
- foreground-child@3.3.0:
522
+ foreground-child@3.3.1:
523
523
  dependencies:
524
524
  cross-spawn: 7.0.6
525
525
  signal-exit: 4.1.0
@@ -532,7 +532,7 @@ snapshots:
532
532
 
533
533
  glob@10.4.5:
534
534
  dependencies:
535
- foreground-child: 3.3.0
535
+ foreground-child: 3.3.1
536
536
  jackspeak: 3.4.3
537
537
  minimatch: 9.0.5
538
538
  minipass: 7.1.2
@@ -1,5 +1,5 @@
1
1
  {
2
- "lastValidatedTimestamp": 1739742886344,
2
+ "lastValidatedTimestamp": 1740485486062,
3
3
  "projects": {},
4
4
  "pnpmfileExists": false,
5
5
  "settings": {
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "isexe",
3
+ "version": "2.0.0",
4
+ "description": "Minimal module to check if a file is executable.",
5
+ "main": "index.js",
6
+ "directories": {
7
+ "test": "test"
8
+ },
9
+ "devDependencies": {
10
+ "mkdirp": "^0.5.1",
11
+ "rimraf": "^2.5.0",
12
+ "tap": "^10.3.0"
13
+ },
14
+ "scripts": {
15
+ "test": "tap test/*.js --100",
16
+ "preversion": "npm test",
17
+ "postversion": "npm publish",
18
+ "postpublish": "git push origin --all; git push origin --tags"
19
+ },
20
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
21
+ "license": "ISC",
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/isaacs/isexe.git"
25
+ },
26
+ "keywords": [],
27
+ "bugs": {
28
+ "url": "https://github.com/isaacs/isexe/issues"
29
+ },
30
+ "homepage": "https://github.com/isaacs/isexe#readme"
31
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
3
+ "name": "which",
4
+ "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.",
5
+ "version": "2.0.2",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git://github.com/isaacs/node-which.git"
9
+ },
10
+ "main": "which.js",
11
+ "bin": {
12
+ "node-which": "./bin/node-which"
13
+ },
14
+ "license": "ISC",
15
+ "dependencies": {
16
+ "isexe": "^2.0.0"
17
+ },
18
+ "devDependencies": {
19
+ "mkdirp": "^0.5.0",
20
+ "rimraf": "^2.6.2",
21
+ "tap": "^14.6.9"
22
+ },
23
+ "scripts": {
24
+ "test": "tap",
25
+ "preversion": "npm test",
26
+ "postversion": "npm publish",
27
+ "prepublish": "npm run changelog",
28
+ "prechangelog": "bash gen-changelog.sh",
29
+ "changelog": "git add CHANGELOG.md",
30
+ "postchangelog": "git commit -m 'update changelog - '${npm_package_version}",
31
+ "postpublish": "git push origin --follow-tags"
32
+ },
33
+ "files": [
34
+ "which.js",
35
+ "bin/node-which"
36
+ ],
37
+ "tap": {
38
+ "check-coverage": true
39
+ },
40
+ "engines": {
41
+ "node": ">= 8"
42
+ }
43
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"all-signals.d.ts","sourceRoot":"","sources":["../../src/all-signals.ts"],"names":[],"mappings":";AACA,eAAO,MAAM,UAAU,kBASA,CAAA"}
1
+ {"version":3,"file":"all-signals.d.ts","sourceRoot":"","sources":["../../src/all-signals.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,UAAU,EAShB,MAAM,CAAC,OAAO,EAAE,CAAA"}
@@ -1 +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G,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC,EAC9C,OAAO,CAAC,EAAE,OAAO,GAChB,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AACxC,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,MAAM,EAAE,EACf,OAAO,CAAC,EAAE,OAAO,GAChB,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AACxC,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,YAAY,EACxB,OAAO,CAAC,EAAE,OAAO,GAChB,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AACxC,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,MAAM,EAAE,EACf,SAAS,CAAC,EAAE,YAAY,EACxB,OAAO,CAAC,EAAE,OAAO,GAChB,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA"}
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.foregroundChild = exports.normalizeFgArgs = void 0;
6
+ exports.normalizeFgArgs = void 0;
7
+ exports.foregroundChild = foregroundChild;
7
8
  const child_process_1 = require("child_process");
8
9
  const cross_spawn_1 = __importDefault(require("cross-spawn"));
9
10
  const signal_exit_1 = require("signal-exit");
@@ -118,6 +119,5 @@ function foregroundChild(...fgArgs) {
118
119
  }
119
120
  return child;
120
121
  }
121
- exports.foregroundChild = foregroundChild;
122
122
  const isPromise = (o) => !!o && typeof o === 'object' && typeof o.then === 'function';
123
123
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/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QAEF,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE;YAC5C,KAAK,CAAC,IAAI,CACR,OAAuB,EACvB,UAAoC,CACrC,CAAA;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,OAAO,KAAK,CAAA;AACd,CAAC;AAzFD,0CAyFC;AAED,MAAM,SAAS,GAAG,CAAC,CAAM,EAAqB,EAAE,CAC9C,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,CAAC,CAAC,IAAI,KAAK,UAAU,CAAA","sourcesContent":["import {\n ChildProcessByStdio,\n SendHandle,\n Serializable,\n spawn as nodeSpawn,\n SpawnOptions,\n ChildProcess,\n} from 'child_process'\nimport crossSpawn from 'cross-spawn'\nimport { onExit } from 'signal-exit'\nimport { proxySignals } from './proxy-signals.js'\nimport { watchdog } from './watchdog.js'\n\n/* c8 ignore start */\nconst spawn = process?.platform === 'win32' ? crossSpawn : nodeSpawn\n/* c8 ignore stop */\n\n/**\n * The signature for the cleanup method.\n *\n * Arguments indicate the exit status of the child process.\n *\n * If a Promise is returned, then the process is not terminated\n * until it resolves, and the resolution value is treated as the\n * exit status (if a number) or signal exit (if a signal string).\n *\n * If `undefined` is returned, then no change is made, and the parent\n * exits in the same way that the child exited.\n *\n * If boolean `false` is returned, then the parent's exit is canceled.\n *\n * If a number is returned, then the parent process exits with the number\n * as its exitCode.\n *\n * If a signal string is returned, then the parent process is killed with\n * the same signal that caused the child to exit.\n */\nexport type Cleanup = (\n code: number | null,\n signal: null | NodeJS.Signals,\n processInfo: {\n watchdogPid?: ChildProcess['pid']\n },\n) =>\n | void\n | undefined\n | number\n | NodeJS.Signals\n | false\n | Promise<void | undefined | number | NodeJS.Signals | false>\n\nexport type FgArgs =\n | [program: string | [cmd: string, ...args: string[]], cleanup?: Cleanup]\n | [\n program: [cmd: string, ...args: string[]],\n opts?: SpawnOptions,\n cleanup?: Cleanup,\n ]\n | [program: string, cleanup?: Cleanup]\n | [program: string, opts?: SpawnOptions, cleanup?: Cleanup]\n | [program: string, args?: string[], cleanup?: Cleanup]\n | [\n program: string,\n args?: string[],\n opts?: SpawnOptions,\n cleanup?: Cleanup,\n ]\n\n/**\n * Normalizes the arguments passed to `foregroundChild`.\n *\n * Exposed for testing.\n *\n * @internal\n */\nexport const normalizeFgArgs = (\n fgArgs: FgArgs,\n): [\n program: string,\n args: string[],\n spawnOpts: SpawnOptions,\n cleanup: Cleanup,\n] => {\n let [program, args = [], spawnOpts = {}, cleanup = () => {}] = fgArgs\n if (typeof args === 'function') {\n cleanup = args\n spawnOpts = {}\n args = []\n } else if (!!args && typeof args === 'object' && !Array.isArray(args)) {\n if (typeof spawnOpts === 'function') cleanup = spawnOpts\n spawnOpts = args\n args = []\n } else if (typeof spawnOpts === 'function') {\n cleanup = spawnOpts\n spawnOpts = {}\n }\n if (Array.isArray(program)) {\n const [pp, ...pa] = program\n program = pp\n args = pa\n }\n return [program, args, { ...spawnOpts }, cleanup]\n}\n\n/**\n * Spawn the specified program as a \"foreground\" process, or at least as\n * close as is possible given node's lack of exec-without-fork.\n *\n * Cleanup method may be used to modify or ignore the result of the child's\n * exit code or signal. If cleanup returns undefined (or a Promise that\n * resolves to undefined), then the parent will exit in the same way that\n * the child did.\n *\n * Return boolean `false` to prevent the parent's exit entirely.\n */\nexport function foregroundChild(\n cmd: string | [cmd: string, ...args: string[]],\n cleanup?: Cleanup,\n): ChildProcessByStdio<null, null, null>\nexport function foregroundChild(\n program: string,\n args?: string[],\n cleanup?: Cleanup,\n): ChildProcessByStdio<null, null, null>\nexport function foregroundChild(\n program: string,\n spawnOpts?: SpawnOptions,\n cleanup?: Cleanup,\n): ChildProcessByStdio<null, null, null>\nexport function foregroundChild(\n program: string,\n args?: string[],\n spawnOpts?: SpawnOptions,\n cleanup?: Cleanup,\n): ChildProcessByStdio<null, null, null>\nexport function foregroundChild(\n ...fgArgs: FgArgs\n): ChildProcessByStdio<null, null, null> {\n const [program, args, spawnOpts, cleanup] = normalizeFgArgs(fgArgs)\n\n spawnOpts.stdio = [0, 1, 2]\n if (process.send) {\n spawnOpts.stdio.push('ipc')\n }\n\n const child = spawn(program, args, spawnOpts) as ChildProcessByStdio<\n null,\n null,\n null\n >\n\n const childHangup = () => {\n try {\n child.kill('SIGHUP')\n\n /* c8 ignore start */\n } catch (_) {\n // SIGHUP is weird on windows\n child.kill('SIGTERM')\n }\n /* c8 ignore stop */\n }\n const removeOnExit = onExit(childHangup)\n\n proxySignals(child)\n const dog = watchdog(child)\n\n let done = false\n child.on('close', async (code, signal) => {\n /* c8 ignore start */\n if (done) return\n /* c8 ignore stop */\n done = true\n const result = cleanup(code, signal, {\n watchdogPid: dog.pid,\n })\n const res = isPromise(result) ? await result : result\n removeOnExit()\n\n if (res === false) return\n else if (typeof res === 'string') {\n signal = res\n code = null\n } else if (typeof res === 'number') {\n code = res\n signal = null\n }\n\n if (signal) {\n // If there is nothing else keeping the event loop alive,\n // then there's a race between a graceful exit and getting\n // the signal to this process. Put this timeout here to\n // make sure we're still alive to get the signal, and thus\n // exit with the intended signal code.\n /* istanbul ignore next */\n setTimeout(() => {}, 2000)\n try {\n process.kill(process.pid, signal)\n /* c8 ignore start */\n } catch (_) {\n process.kill(process.pid, 'SIGTERM')\n }\n /* c8 ignore stop */\n } else {\n process.exit(code || 0)\n }\n })\n\n if (process.send) {\n process.removeAllListeners('message')\n\n child.on('message', (message, sendHandle) => {\n process.send?.(message, sendHandle)\n })\n\n process.on('message', (message, sendHandle) => {\n child.send(\n message as Serializable,\n sendHandle as SendHandle | undefined,\n )\n })\n }\n\n return child\n}\n\nconst isPromise = (o: any): o is Promise<any> =>\n !!o && typeof o === 'object' && typeof o.then === 'function'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAuIA,0CAyFC;AAhOD,iDAOsB;AACtB,8DAAoC;AACpC,6CAAoC;AACpC,yDAAiD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C,KAAK,CAAC,IAAI,CACR,OAAuB,EACvB,UAAoC,CACrC,CAAA;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,OAAO,KAAK,CAAA;AACd,CAAC;AAED,MAAM,SAAS,GAAG,CAAC,CAAM,EAAqB,EAAE,CAC9C,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,CAAC,CAAC,IAAI,KAAK,UAAU,CAAA","sourcesContent":["import {\n ChildProcessByStdio,\n SendHandle,\n Serializable,\n spawn as nodeSpawn,\n SpawnOptions,\n ChildProcess,\n} from 'child_process'\nimport crossSpawn from 'cross-spawn'\nimport { onExit } from 'signal-exit'\nimport { proxySignals } from './proxy-signals.js'\nimport { watchdog } from './watchdog.js'\n\n/* c8 ignore start */\nconst spawn = process?.platform === 'win32' ? crossSpawn : nodeSpawn\n/* c8 ignore stop */\n\n/**\n * The signature for the cleanup method.\n *\n * Arguments indicate the exit status of the child process.\n *\n * If a Promise is returned, then the process is not terminated\n * until it resolves, and the resolution value is treated as the\n * exit status (if a number) or signal exit (if a signal string).\n *\n * If `undefined` is returned, then no change is made, and the parent\n * exits in the same way that the child exited.\n *\n * If boolean `false` is returned, then the parent's exit is canceled.\n *\n * If a number is returned, then the parent process exits with the number\n * as its exitCode.\n *\n * If a signal string is returned, then the parent process is killed with\n * the same signal that caused the child to exit.\n */\nexport type Cleanup = (\n code: number | null,\n signal: null | NodeJS.Signals,\n processInfo: {\n watchdogPid?: ChildProcess['pid']\n },\n) =>\n | void\n | undefined\n | number\n | NodeJS.Signals\n | false\n | Promise<void | undefined | number | NodeJS.Signals | false>\n\nexport type FgArgs =\n | [program: string | [cmd: string, ...args: string[]], cleanup?: Cleanup]\n | [\n program: [cmd: string, ...args: string[]],\n opts?: SpawnOptions,\n cleanup?: Cleanup,\n ]\n | [program: string, cleanup?: Cleanup]\n | [program: string, opts?: SpawnOptions, cleanup?: Cleanup]\n | [program: string, args?: string[], cleanup?: Cleanup]\n | [\n program: string,\n args?: string[],\n opts?: SpawnOptions,\n cleanup?: Cleanup,\n ]\n\n/**\n * Normalizes the arguments passed to `foregroundChild`.\n *\n * Exposed for testing.\n *\n * @internal\n */\nexport const normalizeFgArgs = (\n fgArgs: FgArgs,\n): [\n program: string,\n args: string[],\n spawnOpts: SpawnOptions,\n cleanup: Cleanup,\n] => {\n let [program, args = [], spawnOpts = {}, cleanup = () => {}] = fgArgs\n if (typeof args === 'function') {\n cleanup = args\n spawnOpts = {}\n args = []\n } else if (!!args && typeof args === 'object' && !Array.isArray(args)) {\n if (typeof spawnOpts === 'function') cleanup = spawnOpts\n spawnOpts = args\n args = []\n } else if (typeof spawnOpts === 'function') {\n cleanup = spawnOpts\n spawnOpts = {}\n }\n if (Array.isArray(program)) {\n const [pp, ...pa] = program\n program = pp\n args = pa\n }\n return [program, args, { ...spawnOpts }, cleanup]\n}\n\n/**\n * Spawn the specified program as a \"foreground\" process, or at least as\n * close as is possible given node's lack of exec-without-fork.\n *\n * Cleanup method may be used to modify or ignore the result of the child's\n * exit code or signal. If cleanup returns undefined (or a Promise that\n * resolves to undefined), then the parent will exit in the same way that\n * the child did.\n *\n * Return boolean `false` to prevent the parent's exit entirely.\n */\nexport function foregroundChild(\n cmd: string | [cmd: string, ...args: string[]],\n cleanup?: Cleanup,\n): ChildProcessByStdio<null, null, null>\nexport function foregroundChild(\n program: string,\n args?: string[],\n cleanup?: Cleanup,\n): ChildProcessByStdio<null, null, null>\nexport function foregroundChild(\n program: string,\n spawnOpts?: SpawnOptions,\n cleanup?: Cleanup,\n): ChildProcessByStdio<null, null, null>\nexport function foregroundChild(\n program: string,\n args?: string[],\n spawnOpts?: SpawnOptions,\n cleanup?: Cleanup,\n): ChildProcessByStdio<null, null, null>\nexport function foregroundChild(\n ...fgArgs: FgArgs\n): ChildProcessByStdio<null, null, null> {\n const [program, args, spawnOpts, cleanup] = normalizeFgArgs(fgArgs)\n\n spawnOpts.stdio = [0, 1, 2]\n if (process.send) {\n spawnOpts.stdio.push('ipc')\n }\n\n const child = spawn(program, args, spawnOpts) as ChildProcessByStdio<\n null,\n null,\n null\n >\n\n const childHangup = () => {\n try {\n child.kill('SIGHUP')\n\n /* c8 ignore start */\n } catch (_) {\n // SIGHUP is weird on windows\n child.kill('SIGTERM')\n }\n /* c8 ignore stop */\n }\n const removeOnExit = onExit(childHangup)\n\n proxySignals(child)\n const dog = watchdog(child)\n\n let done = false\n child.on('close', async (code, signal) => {\n /* c8 ignore start */\n if (done) return\n /* c8 ignore stop */\n done = true\n const result = cleanup(code, signal, {\n watchdogPid: dog.pid,\n })\n const res = isPromise(result) ? await result : result\n removeOnExit()\n\n if (res === false) return\n else if (typeof res === 'string') {\n signal = res\n code = null\n } else if (typeof res === 'number') {\n code = res\n signal = null\n }\n\n if (signal) {\n // If there is nothing else keeping the event loop alive,\n // then there's a race between a graceful exit and getting\n // the signal to this process. Put this timeout here to\n // make sure we're still alive to get the signal, and thus\n // exit with the intended signal code.\n /* istanbul ignore next */\n setTimeout(() => {}, 2000)\n try {\n process.kill(process.pid, signal)\n /* c8 ignore start */\n } catch (_) {\n process.kill(process.pid, 'SIGTERM')\n }\n /* c8 ignore stop */\n } else {\n process.exit(code || 0)\n }\n })\n\n if (process.send) {\n process.removeAllListeners('message')\n\n child.on('message', (message, sendHandle) => {\n process.send?.(message, sendHandle)\n })\n\n process.on('message', (message, sendHandle) => {\n child.send(\n message as Serializable,\n sendHandle as SendHandle | undefined,\n )\n })\n }\n\n return child\n}\n\nconst isPromise = (o: any): o is Promise<any> =>\n !!o && typeof o === 'object' && typeof o.then === 'function'\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"proxy-signals.d.ts","sourceRoot":"","sources":["../../src/proxy-signals.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAA;AAGjD;;GAEG;AACH,eAAO,MAAM,YAAY,UAAW,YAAY,eA4B/C,CAAA"}
1
+ {"version":3,"file":"proxy-signals.d.ts","sourceRoot":"","sources":["../../src/proxy-signals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAA;AAGjD;;GAEG;AACH,eAAO,MAAM,YAAY,UAAW,YAAY,eA4B/C,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"watchdog.d.ts","sourceRoot":"","sources":["../../src/watchdog.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,YAAY,EAAS,MAAM,eAAe,CAAA;AAyBnD;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,UAAW,YAAY,iBAc3C,CAAA"}
1
+ {"version":3,"file":"watchdog.d.ts","sourceRoot":"","sources":["../../src/watchdog.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAS,MAAM,eAAe,CAAA;AAyBnD;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,UAAW,YAAY,iBAc3C,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"all-signals.d.ts","sourceRoot":"","sources":["../../src/all-signals.ts"],"names":[],"mappings":";AACA,eAAO,MAAM,UAAU,kBASA,CAAA"}
1
+ {"version":3,"file":"all-signals.d.ts","sourceRoot":"","sources":["../../src/all-signals.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,UAAU,EAShB,MAAM,CAAC,OAAO,EAAE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;AAAA,OAAO,EACL,mBAAmB,EAInB,YAAY,EACZ,YAAY,EACb,MAAM,eAAe,CAAA;AAUtB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,OAAO,GAAG,CACpB,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,MAAM,EAAE,IAAI,GAAG,MAAM,CAAC,OAAO,EAC7B,WAAW,EAAE;IACX,WAAW,CAAC,EAAE,YAAY,CAAC,KAAK,CAAC,CAAA;CAClC,KAEC,IAAI,GACJ,SA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AAY,EACxB,OAAO,CAAC,EAAE,OAAO,GAChB,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AACxC,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,MAAM,EAAE,EACf,SAAS,CAAC,EAAE,YAAY,EACxB,OAAO,CAAC,EAAE,OAAO,GAChB,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"proxy-signals.d.ts","sourceRoot":"","sources":["../../src/proxy-signals.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAA;AAGjD;;GAEG;AACH,eAAO,MAAM,YAAY,UAAW,YAAY,eA4B/C,CAAA"}
1
+ {"version":3,"file":"proxy-signals.d.ts","sourceRoot":"","sources":["../../src/proxy-signals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAA;AAGjD;;GAEG;AACH,eAAO,MAAM,YAAY,UAAW,YAAY,eA4B/C,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"watchdog.d.ts","sourceRoot":"","sources":["../../src/watchdog.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,YAAY,EAAS,MAAM,eAAe,CAAA;AAyBnD;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,UAAW,YAAY,iBAc3C,CAAA"}
1
+ {"version":3,"file":"watchdog.d.ts","sourceRoot":"","sources":["../../src/watchdog.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAS,MAAM,eAAe,CAAA;AAyBnD;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,UAAW,YAAY,iBAc3C,CAAA"}
@@ -1,30 +1,26 @@
1
1
  {
2
2
  "name": "foreground-child",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
4
4
  "description": "Run a child as if it's the foreground process. Give it stdio. Exit when it exits.",
5
5
  "main": "./dist/commonjs/index.js",
6
6
  "types": "./dist/commonjs/index.d.ts",
7
7
  "exports": {
8
8
  "./watchdog": {
9
9
  "import": {
10
- "source": "./src/watchdog.ts",
11
10
  "types": "./dist/esm/watchdog.d.ts",
12
11
  "default": "./dist/esm/watchdog.js"
13
12
  },
14
13
  "require": {
15
- "source": "./src/watchdog.ts",
16
14
  "types": "./dist/commonjs/watchdog.d.ts",
17
15
  "default": "./dist/commonjs/watchdog.js"
18
16
  }
19
17
  },
20
18
  "./proxy-signals": {
21
19
  "import": {
22
- "source": "./src/proxy-signals.ts",
23
20
  "types": "./dist/esm/proxy-signals.d.ts",
24
21
  "default": "./dist/esm/proxy-signals.js"
25
22
  },
26
23
  "require": {
27
- "source": "./src/proxy-signals.ts",
28
24
  "types": "./dist/commonjs/proxy-signals.d.ts",
29
25
  "default": "./dist/commonjs/proxy-signals.js"
30
26
  }
@@ -32,12 +28,10 @@
32
28
  "./package.json": "./package.json",
33
29
  ".": {
34
30
  "import": {
35
- "source": "./src/index.ts",
36
31
  "types": "./dist/esm/index.d.ts",
37
32
  "default": "./dist/esm/index.js"
38
33
  },
39
34
  "require": {
40
- "source": "./src/index.ts",
41
35
  "types": "./dist/commonjs/index.d.ts",
42
36
  "default": "./dist/commonjs/index.js"
43
37
  }
@@ -50,7 +44,7 @@
50
44
  "node": ">=14"
51
45
  },
52
46
  "dependencies": {
53
- "cross-spawn": "^7.0.0",
47
+ "cross-spawn": "^7.0.6",
54
48
  "signal-exit": "^4.0.1"
55
49
  },
56
50
  "scripts": {
@@ -91,8 +85,8 @@
91
85
  "@types/node": "^18.15.11",
92
86
  "@types/tap": "^15.0.8",
93
87
  "prettier": "^3.3.2",
94
- "tap": "^19.2.5",
95
- "tshy": "^1.15.1",
88
+ "tap": "^21.1.0",
89
+ "tshy": "^3.0.2",
96
90
  "typedoc": "^0.24.2",
97
91
  "typescript": "^5.0.2"
98
92
  },
@@ -107,5 +101,6 @@
107
101
  ".": "./src/index.ts"
108
102
  }
109
103
  },
110
- "type": "module"
104
+ "type": "module",
105
+ "module": "./dist/esm/index.js"
111
106
  }
@@ -1,6 +1,6 @@
1
1
  The ISC License
2
2
 
3
- Copyright (c) Isaac Z. Schlueter and Contributors
3
+ Copyright (c) 2016-2022 Isaac Z. Schlueter and Contributors
4
4
 
5
5
  Permission to use, copy, modify, and/or distribute this software for any
6
6
  purpose with or without fee is hereby granted, provided that the above
@@ -1,31 +1,96 @@
1
1
  {
2
2
  "name": "isexe",
3
- "version": "2.0.0",
3
+ "version": "3.1.1",
4
4
  "description": "Minimal module to check if a file is executable.",
5
- "main": "index.js",
6
- "directories": {
7
- "test": "test"
5
+ "main": "./dist/cjs/index.js",
6
+ "module": "./dist/mjs/index.js",
7
+ "types": "./dist/cjs/index.js",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "exports": {
12
+ ".": {
13
+ "import": {
14
+ "types": "./dist/mjs/index.d.ts",
15
+ "default": "./dist/mjs/index.js"
16
+ },
17
+ "require": {
18
+ "types": "./dist/cjs/index.d.ts",
19
+ "default": "./dist/cjs/index.js"
20
+ }
21
+ },
22
+ "./posix": {
23
+ "import": {
24
+ "types": "./dist/mjs/posix.d.ts",
25
+ "default": "./dist/mjs/posix.js"
26
+ },
27
+ "require": {
28
+ "types": "./dist/cjs/posix.d.ts",
29
+ "default": "./dist/cjs/posix.js"
30
+ }
31
+ },
32
+ "./win32": {
33
+ "import": {
34
+ "types": "./dist/mjs/win32.d.ts",
35
+ "default": "./dist/mjs/win32.js"
36
+ },
37
+ "require": {
38
+ "types": "./dist/cjs/win32.d.ts",
39
+ "default": "./dist/cjs/win32.js"
40
+ }
41
+ },
42
+ "./package.json": "./package.json"
8
43
  },
9
44
  "devDependencies": {
45
+ "@types/node": "^20.4.5",
46
+ "@types/tap": "^15.0.8",
47
+ "c8": "^8.0.1",
10
48
  "mkdirp": "^0.5.1",
49
+ "prettier": "^2.8.8",
11
50
  "rimraf": "^2.5.0",
12
- "tap": "^10.3.0"
51
+ "sync-content": "^1.0.2",
52
+ "tap": "^16.3.8",
53
+ "ts-node": "^10.9.1",
54
+ "typedoc": "^0.24.8",
55
+ "typescript": "^5.1.6"
13
56
  },
14
57
  "scripts": {
15
- "test": "tap test/*.js --100",
16
58
  "preversion": "npm test",
17
59
  "postversion": "npm publish",
18
- "postpublish": "git push origin --all; git push origin --tags"
60
+ "prepublishOnly": "git push origin --follow-tags",
61
+ "prepare": "tsc -p tsconfig/cjs.json && tsc -p tsconfig/esm.json && bash ./scripts/fixup.sh",
62
+ "pretest": "npm run prepare",
63
+ "presnap": "npm run prepare",
64
+ "test": "c8 tap",
65
+ "snap": "c8 tap",
66
+ "format": "prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache",
67
+ "typedoc": "typedoc --tsconfig tsconfig/esm.json ./src/*.ts"
19
68
  },
20
69
  "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
21
70
  "license": "ISC",
22
- "repository": {
23
- "type": "git",
24
- "url": "git+https://github.com/isaacs/isexe.git"
71
+ "tap": {
72
+ "coverage": false,
73
+ "node-arg": [
74
+ "--enable-source-maps",
75
+ "--no-warnings",
76
+ "--loader",
77
+ "ts-node/esm"
78
+ ],
79
+ "ts": false
25
80
  },
26
- "keywords": [],
27
- "bugs": {
28
- "url": "https://github.com/isaacs/isexe/issues"
81
+ "prettier": {
82
+ "semi": false,
83
+ "printWidth": 75,
84
+ "tabWidth": 2,
85
+ "useTabs": false,
86
+ "singleQuote": true,
87
+ "jsxSingleQuote": false,
88
+ "bracketSameLine": true,
89
+ "arrowParens": "avoid",
90
+ "endOfLine": "lf"
29
91
  },
30
- "homepage": "https://github.com/isaacs/isexe#readme"
92
+ "repository": "https://github.com/isaacs/isexe",
93
+ "engines": {
94
+ "node": ">=16"
95
+ }
31
96
  }
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "yallist",
3
+ "version": "5.0.0",
4
+ "description": "Yet Another Linked List",
5
+ "files": [
6
+ "dist"
7
+ ],
8
+ "devDependencies": {
9
+ "prettier": "^3.2.5",
10
+ "tap": "^18.7.2",
11
+ "tshy": "^1.13.1",
12
+ "typedoc": "^0.25.13"
13
+ },
14
+ "scripts": {
15
+ "preversion": "npm test",
16
+ "postversion": "npm publish",
17
+ "prepublishOnly": "git push origin --follow-tags",
18
+ "prepare": "tshy",
19
+ "pretest": "npm run prepare",
20
+ "presnap": "npm run prepare",
21
+ "test": "tap",
22
+ "snap": "tap",
23
+ "format": "prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache",
24
+ "typedoc": "typedoc"
25
+ },
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/isaacs/yallist.git"
29
+ },
30
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
31
+ "license": "BlueOak-1.0.0",
32
+ "tshy": {
33
+ "exports": {
34
+ "./package.json": "./package.json",
35
+ ".": "./src/index.ts"
36
+ }
37
+ },
38
+ "exports": {
39
+ "./package.json": "./package.json",
40
+ ".": {
41
+ "import": {
42
+ "types": "./dist/esm/index.d.ts",
43
+ "default": "./dist/esm/index.js"
44
+ },
45
+ "require": {
46
+ "types": "./dist/commonjs/index.d.ts",
47
+ "default": "./dist/commonjs/index.js"
48
+ }
49
+ }
50
+ },
51
+ "main": "./dist/commonjs/index.js",
52
+ "types": "./dist/commonjs/index.d.ts",
53
+ "type": "module",
54
+ "prettier": {
55
+ "semi": false,
56
+ "printWidth": 70,
57
+ "tabWidth": 2,
58
+ "useTabs": false,
59
+ "singleQuote": true,
60
+ "jsxSingleQuote": false,
61
+ "bracketSameLine": true,
62
+ "arrowParens": "avoid",
63
+ "endOfLine": "lf"
64
+ },
65
+ "engines": {
66
+ "node": ">=18"
67
+ }
68
+ }
@@ -1,43 +1,52 @@
1
1
  {
2
- "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
2
+ "author": "GitHub Inc.",
3
3
  "name": "which",
4
4
  "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.",
5
- "version": "2.0.2",
5
+ "version": "5.0.0",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "git://github.com/isaacs/node-which.git"
8
+ "url": "git+https://github.com/npm/node-which.git"
9
9
  },
10
- "main": "which.js",
10
+ "main": "lib/index.js",
11
11
  "bin": {
12
- "node-which": "./bin/node-which"
12
+ "node-which": "./bin/which.js"
13
13
  },
14
14
  "license": "ISC",
15
15
  "dependencies": {
16
- "isexe": "^2.0.0"
16
+ "isexe": "^3.1.1"
17
17
  },
18
18
  "devDependencies": {
19
- "mkdirp": "^0.5.0",
20
- "rimraf": "^2.6.2",
21
- "tap": "^14.6.9"
19
+ "@npmcli/eslint-config": "^5.0.0",
20
+ "@npmcli/template-oss": "4.23.3",
21
+ "tap": "^16.3.0"
22
22
  },
23
23
  "scripts": {
24
24
  "test": "tap",
25
- "preversion": "npm test",
26
- "postversion": "npm publish",
27
- "prepublish": "npm run changelog",
28
- "prechangelog": "bash gen-changelog.sh",
29
- "changelog": "git add CHANGELOG.md",
30
- "postchangelog": "git commit -m 'update changelog - '${npm_package_version}",
31
- "postpublish": "git push origin --follow-tags"
25
+ "lint": "npm run eslint",
26
+ "postlint": "template-oss-check",
27
+ "template-oss-apply": "template-oss-apply --force",
28
+ "lintfix": "npm run eslint -- --fix",
29
+ "snap": "tap",
30
+ "posttest": "npm run lint",
31
+ "eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
32
32
  },
33
33
  "files": [
34
- "which.js",
35
- "bin/node-which"
34
+ "bin/",
35
+ "lib/"
36
36
  ],
37
37
  "tap": {
38
- "check-coverage": true
38
+ "check-coverage": true,
39
+ "nyc-arg": [
40
+ "--exclude",
41
+ "tap-snapshots/**"
42
+ ]
39
43
  },
40
44
  "engines": {
41
- "node": ">= 8"
45
+ "node": "^18.17.0 || >=20.5.0"
46
+ },
47
+ "templateOSS": {
48
+ "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
49
+ "version": "4.23.3",
50
+ "publish": "true"
42
51
  }
43
52
  }