@pnpm/exec.commands 1100.3.3 → 1100.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5194 -0
- package/lib/dlx.js +3 -2
- package/lib/exec.js +4 -3
- package/lib/trackedExeca.d.ts +7 -0
- package/lib/trackedExeca.js +13 -0
- package/package.json +35 -35
package/lib/dlx.js
CHANGED
|
@@ -16,11 +16,11 @@ import { logger } from '@pnpm/logger';
|
|
|
16
16
|
import { readPackageJsonFromDir } from '@pnpm/pkg-manifest.reader';
|
|
17
17
|
import { parseWantedDependency } from '@pnpm/resolving.parse-wanted-dependency';
|
|
18
18
|
import { lexCompare } from '@pnpm/util.lex-comparator';
|
|
19
|
-
import { safeExeca as execa } from 'execa';
|
|
20
19
|
import { pick } from 'ramda';
|
|
21
20
|
import { renderHelp } from 'render-help';
|
|
22
21
|
import { symlinkDir } from 'symlink-dir';
|
|
23
22
|
import { makeEnv } from './makeEnv.js';
|
|
23
|
+
import { trackedExeca } from './trackedExeca.js';
|
|
24
24
|
export const skipPackageManagerCheck = true;
|
|
25
25
|
export const commandNames = ['dlx'];
|
|
26
26
|
/**
|
|
@@ -217,12 +217,13 @@ export async function handler(opts, [command, ...args], commands) {
|
|
|
217
217
|
? command
|
|
218
218
|
: await getBinName(cachedDir, opts);
|
|
219
219
|
try {
|
|
220
|
-
|
|
220
|
+
const child = trackedExeca(binName, args, {
|
|
221
221
|
cwd: process.cwd(),
|
|
222
222
|
env,
|
|
223
223
|
stdio: 'inherit',
|
|
224
224
|
shell: opts.shellMode ?? false,
|
|
225
225
|
});
|
|
226
|
+
await child;
|
|
226
227
|
}
|
|
227
228
|
catch (err) {
|
|
228
229
|
if (util.types.isNativeError(err) && 'exitCode' in err && err.exitCode != null) {
|
package/lib/exec.js
CHANGED
|
@@ -9,7 +9,6 @@ import { logger } from '@pnpm/logger';
|
|
|
9
9
|
import { prependDirsToPath } from '@pnpm/shell.path';
|
|
10
10
|
import { tryReadProjectManifest } from '@pnpm/workspace.project-manifest-reader';
|
|
11
11
|
import { sortFilteredProjects } from '@pnpm/workspace.projects-sorter';
|
|
12
|
-
import { safeExeca as execa } from 'execa';
|
|
13
12
|
import pLimit from 'p-limit';
|
|
14
13
|
import { pick } from 'ramda';
|
|
15
14
|
import { renderHelp } from 'render-help';
|
|
@@ -20,6 +19,7 @@ import { existsInDir } from './existsInDir.js';
|
|
|
20
19
|
import { makeEnv } from './makeEnv.js';
|
|
21
20
|
import { PARALLEL_OPTION_HELP, REPORT_SUMMARY_OPTION_HELP, RESUME_FROM_OPTION_HELP, shorthands as runShorthands, } from './run.js';
|
|
22
21
|
import { runDepsStatusCheck } from './runDepsStatusCheck.js';
|
|
22
|
+
import { trackedExeca } from './trackedExeca.js';
|
|
23
23
|
export const shorthands = {
|
|
24
24
|
parallel: runShorthands.parallel,
|
|
25
25
|
c: '--shell-mode',
|
|
@@ -195,7 +195,7 @@ export async function handler(opts, params) {
|
|
|
195
195
|
const [cmd, ...args] = params;
|
|
196
196
|
if (reporterShowPrefix) {
|
|
197
197
|
const manifest = await readProjectManifestOnly(prefix);
|
|
198
|
-
const child =
|
|
198
|
+
const child = trackedExeca(cmd, args, {
|
|
199
199
|
cwd: prefix,
|
|
200
200
|
env,
|
|
201
201
|
stdio: 'pipe',
|
|
@@ -230,12 +230,13 @@ export async function handler(opts, params) {
|
|
|
230
230
|
await child;
|
|
231
231
|
}
|
|
232
232
|
else {
|
|
233
|
-
|
|
233
|
+
const child = trackedExeca(cmd, args, {
|
|
234
234
|
cwd: prefix,
|
|
235
235
|
env,
|
|
236
236
|
stdio: 'inherit',
|
|
237
237
|
shell: opts.shellMode ?? false,
|
|
238
238
|
});
|
|
239
|
+
await child;
|
|
239
240
|
}
|
|
240
241
|
result[prefix].status = 'passed';
|
|
241
242
|
result[prefix].duration = getExecutionDuration(startTime);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { safeExeca } from 'execa';
|
|
2
|
+
/**
|
|
3
|
+
* `safeExeca`, but the spawned subprocess is registered with the child-process
|
|
4
|
+
* tracker so its process tree can be terminated if pnpm exits on an error while
|
|
5
|
+
* the command is still running. See `trackChildProcess`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const trackedExeca: typeof safeExeca;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { trackChildProcess } from '@pnpm/exec.lifecycle';
|
|
2
|
+
import { safeExeca } from 'execa';
|
|
3
|
+
/**
|
|
4
|
+
* `safeExeca`, but the spawned subprocess is registered with the child-process
|
|
5
|
+
* tracker so its process tree can be terminated if pnpm exits on an error while
|
|
6
|
+
* the command is still running. See `trackChildProcess`.
|
|
7
|
+
*/
|
|
8
|
+
export const trackedExeca = ((...args) => {
|
|
9
|
+
const child = safeExeca(...args);
|
|
10
|
+
trackChildProcess(child);
|
|
11
|
+
return child;
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=trackedExeca.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/exec.commands",
|
|
3
|
-
"version": "1100.3.
|
|
3
|
+
"version": "1100.3.5",
|
|
4
4
|
"description": "Commands for running scripts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -29,8 +29,33 @@
|
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@inquirer/prompts": "^8.4.3",
|
|
32
|
+
"@pnpm/bins.resolver": "1100.0.9",
|
|
33
|
+
"@pnpm/building.commands": "1100.1.11",
|
|
34
|
+
"@pnpm/catalogs.resolver": "1100.0.0",
|
|
35
|
+
"@pnpm/cli.command": "1100.0.1",
|
|
36
|
+
"@pnpm/cli.common-cli-options-help": "1100.0.2",
|
|
37
|
+
"@pnpm/cli.utils": "1101.0.14",
|
|
38
|
+
"@pnpm/config.reader": "1101.12.0",
|
|
39
|
+
"@pnpm/config.version-policy": "1100.1.7",
|
|
40
|
+
"@pnpm/core-loggers": "1100.2.2",
|
|
41
|
+
"@pnpm/crypto.hash": "1100.0.1",
|
|
42
|
+
"@pnpm/deps.status": "1100.1.7",
|
|
43
|
+
"@pnpm/engine.runtime.commands": "1100.1.11",
|
|
44
|
+
"@pnpm/error": "1100.0.1",
|
|
45
|
+
"@pnpm/exec.lifecycle": "1100.1.3",
|
|
46
|
+
"@pnpm/exec.pnpm-cli-runner": "1100.0.1",
|
|
47
|
+
"@pnpm/installing.client": "1100.2.14",
|
|
48
|
+
"@pnpm/installing.commands": "1100.10.5",
|
|
32
49
|
"@pnpm/log.group": "4.0.1",
|
|
50
|
+
"@pnpm/pkg-manifest.reader": "1100.0.10",
|
|
51
|
+
"@pnpm/resolving.parse-wanted-dependency": "1100.0.1",
|
|
52
|
+
"@pnpm/shell.path": "1100.0.1",
|
|
53
|
+
"@pnpm/store.path": "1100.0.2",
|
|
54
|
+
"@pnpm/types": "1101.4.0",
|
|
33
55
|
"@pnpm/util.lex-comparator": "^4.0.1",
|
|
56
|
+
"@pnpm/workspace.injected-deps-syncer": "1100.0.23",
|
|
57
|
+
"@pnpm/workspace.project-manifest-reader": "1100.0.15",
|
|
58
|
+
"@pnpm/workspace.projects-sorter": "1100.0.9",
|
|
34
59
|
"@zkochan/rimraf": "^4.0.0",
|
|
35
60
|
"didyoumean2": "^7.0.4",
|
|
36
61
|
"execa": "npm:safe-execa@0.3.0",
|
|
@@ -40,50 +65,25 @@
|
|
|
40
65
|
"render-help": "^2.0.0",
|
|
41
66
|
"symlink-dir": "^10.0.1",
|
|
42
67
|
"which": "npm:@pnpm/which@^3.0.1",
|
|
43
|
-
"write-json-file": "^7.0.0"
|
|
44
|
-
"@pnpm/bins.resolver": "1100.0.8",
|
|
45
|
-
"@pnpm/building.commands": "1100.1.9",
|
|
46
|
-
"@pnpm/catalogs.resolver": "1100.0.0",
|
|
47
|
-
"@pnpm/cli.command": "1100.0.1",
|
|
48
|
-
"@pnpm/cli.common-cli-options-help": "1100.0.2",
|
|
49
|
-
"@pnpm/cli.utils": "1101.0.13",
|
|
50
|
-
"@pnpm/config.reader": "1101.11.1",
|
|
51
|
-
"@pnpm/config.version-policy": "1100.1.6",
|
|
52
|
-
"@pnpm/core-loggers": "1100.2.1",
|
|
53
|
-
"@pnpm/crypto.hash": "1100.0.1",
|
|
54
|
-
"@pnpm/deps.status": "1100.1.5",
|
|
55
|
-
"@pnpm/engine.runtime.commands": "1100.1.9",
|
|
56
|
-
"@pnpm/error": "1100.0.1",
|
|
57
|
-
"@pnpm/exec.lifecycle": "1100.1.2",
|
|
58
|
-
"@pnpm/installing.client": "1100.2.12",
|
|
59
|
-
"@pnpm/exec.pnpm-cli-runner": "1100.0.1",
|
|
60
|
-
"@pnpm/installing.commands": "1100.10.3",
|
|
61
|
-
"@pnpm/pkg-manifest.reader": "1100.0.9",
|
|
62
|
-
"@pnpm/store.path": "1100.0.2",
|
|
63
|
-
"@pnpm/types": "1101.3.2",
|
|
64
|
-
"@pnpm/workspace.projects-sorter": "1100.0.8",
|
|
65
|
-
"@pnpm/shell.path": "1100.0.1",
|
|
66
|
-
"@pnpm/workspace.injected-deps-syncer": "1100.0.22",
|
|
67
|
-
"@pnpm/workspace.project-manifest-reader": "1100.0.14",
|
|
68
|
-
"@pnpm/resolving.parse-wanted-dependency": "1100.0.1"
|
|
68
|
+
"write-json-file": "^7.0.0"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
71
|
"@pnpm/logger": "^1100.0.0"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@jest/globals": "30.4.1",
|
|
75
|
+
"@pnpm/engine.runtime.system-version": "1100.0.4",
|
|
76
|
+
"@pnpm/exec.commands": "1100.3.5",
|
|
77
|
+
"@pnpm/logger": "1100.0.0",
|
|
78
|
+
"@pnpm/prepare": "1100.0.19",
|
|
79
|
+
"@pnpm/test-ipc-server": "1100.0.0",
|
|
80
|
+
"@pnpm/testing.command-defaults": "1100.0.9",
|
|
81
|
+
"@pnpm/workspace.projects-filter": "1100.0.27",
|
|
75
82
|
"@types/is-windows": "^1.0.2",
|
|
76
83
|
"@types/ramda": "0.31.1",
|
|
77
84
|
"@types/which": "^3.0.4",
|
|
78
85
|
"is-windows": "^1.0.2",
|
|
79
|
-
"write-yaml-file": "^6.0.0"
|
|
80
|
-
"@pnpm/engine.runtime.system-version": "1100.0.3",
|
|
81
|
-
"@pnpm/exec.commands": "1100.3.3",
|
|
82
|
-
"@pnpm/logger": "1100.0.0",
|
|
83
|
-
"@pnpm/prepare": "1100.0.18",
|
|
84
|
-
"@pnpm/test-ipc-server": "1100.0.0",
|
|
85
|
-
"@pnpm/testing.command-defaults": "1100.0.8",
|
|
86
|
-
"@pnpm/workspace.projects-filter": "1100.0.25"
|
|
86
|
+
"write-yaml-file": "^6.0.0"
|
|
87
87
|
},
|
|
88
88
|
"engines": {
|
|
89
89
|
"node": ">=22.13"
|