@pnpm/exec.commands 1100.1.10 → 1100.1.12
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/lib/dlx.js +21 -1
- package/package.json +17 -17
package/lib/dlx.js
CHANGED
|
@@ -229,7 +229,27 @@ async function getPkgName(pkgDir) {
|
|
|
229
229
|
async function getBinName(cachedDir, opts) {
|
|
230
230
|
const pkgName = await getPkgName(cachedDir);
|
|
231
231
|
const pkgDir = path.join(cachedDir, 'node_modules', pkgName);
|
|
232
|
-
|
|
232
|
+
let manifest;
|
|
233
|
+
try {
|
|
234
|
+
manifest = await readProjectManifestOnly(pkgDir, opts);
|
|
235
|
+
}
|
|
236
|
+
catch (err) {
|
|
237
|
+
// The installed package's `package.json` is unreadable. Observed in the
|
|
238
|
+
// wild for `node@runtime:<version>` whose CAS slot was materialized by
|
|
239
|
+
// a code path that didn't run pnpm's `appendManifest` (or pacquet's
|
|
240
|
+
// equivalent runtime-manifest synthesis), leaving the slot without
|
|
241
|
+
// the `package.json` runtime archives don't ship themselves. Fall back
|
|
242
|
+
// to the scopeless package name — for single-bin packages (the dlx
|
|
243
|
+
// common case) it matches what `manifest.bin` would have named, and
|
|
244
|
+
// the `node_modules/.bin/<name>` symlink the install already wired up
|
|
245
|
+
// from the resolution's bin info is what `execa` resolves against.
|
|
246
|
+
// Multi-bin packages require `--package=<spec> <bin>` to disambiguate,
|
|
247
|
+
// which short-circuits `getBinName` upstream and never enters this path.
|
|
248
|
+
if (util.types.isNativeError(err) && 'code' in err && err.code === 'ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND') {
|
|
249
|
+
return scopeless(pkgName);
|
|
250
|
+
}
|
|
251
|
+
throw err;
|
|
252
|
+
}
|
|
233
253
|
const bins = await getBinsFromPackageManifest(manifest, pkgDir);
|
|
234
254
|
if (bins.length === 0) {
|
|
235
255
|
throw new PnpmError('DLX_NO_BIN', `No binaries found in ${pkgName}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/exec.commands",
|
|
3
|
-
"version": "1100.1.
|
|
3
|
+
"version": "1100.1.12",
|
|
4
4
|
"description": "Commands for running scripts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -39,30 +39,30 @@
|
|
|
39
39
|
"which": "npm:@pnpm/which@^3.0.1",
|
|
40
40
|
"write-json-file": "^7.0.0",
|
|
41
41
|
"@pnpm/bins.resolver": "1100.0.4",
|
|
42
|
-
"@pnpm/building.commands": "1100.0.20",
|
|
43
42
|
"@pnpm/catalogs.resolver": "1100.0.0",
|
|
43
|
+
"@pnpm/building.commands": "1100.0.22",
|
|
44
44
|
"@pnpm/cli.command": "1100.0.1",
|
|
45
|
-
"@pnpm/
|
|
45
|
+
"@pnpm/cli.common-cli-options-help": "1100.0.1",
|
|
46
|
+
"@pnpm/cli.utils": "1101.0.7",
|
|
47
|
+
"@pnpm/config.reader": "1101.4.0",
|
|
46
48
|
"@pnpm/config.version-policy": "1100.1.1",
|
|
47
49
|
"@pnpm/core-loggers": "1100.1.1",
|
|
48
|
-
"@pnpm/cli.common-cli-options-help": "1100.0.1",
|
|
49
50
|
"@pnpm/crypto.hash": "1100.0.1",
|
|
50
|
-
"@pnpm/deps.status": "1100.0.
|
|
51
|
-
"@pnpm/engine.runtime.commands": "1100.0.
|
|
51
|
+
"@pnpm/deps.status": "1100.0.18",
|
|
52
|
+
"@pnpm/engine.runtime.commands": "1100.0.17",
|
|
52
53
|
"@pnpm/error": "1100.0.0",
|
|
53
|
-
"@pnpm/exec.lifecycle": "1100.0.12",
|
|
54
54
|
"@pnpm/exec.pnpm-cli-runner": "1100.0.1",
|
|
55
|
-
"@pnpm/
|
|
55
|
+
"@pnpm/exec.lifecycle": "1100.0.13",
|
|
56
|
+
"@pnpm/installing.client": "1100.2.2",
|
|
57
|
+
"@pnpm/installing.commands": "1100.5.0",
|
|
56
58
|
"@pnpm/pkg-manifest.reader": "1100.0.4",
|
|
57
|
-
"@pnpm/installing.client": "1100.2.1",
|
|
58
59
|
"@pnpm/resolving.parse-wanted-dependency": "1100.0.1",
|
|
59
60
|
"@pnpm/shell.path": "1100.0.1",
|
|
60
|
-
"@pnpm/types": "1101.1.1",
|
|
61
61
|
"@pnpm/store.path": "1100.0.1",
|
|
62
|
-
"@pnpm/
|
|
63
|
-
"@pnpm/workspace.
|
|
64
|
-
"@pnpm/workspace.
|
|
65
|
-
"@pnpm/workspace.
|
|
62
|
+
"@pnpm/types": "1101.1.1",
|
|
63
|
+
"@pnpm/workspace.project-manifest-reader": "1100.0.8",
|
|
64
|
+
"@pnpm/workspace.injected-deps-syncer": "1100.0.14",
|
|
65
|
+
"@pnpm/workspace.projects-sorter": "1100.0.3"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"@pnpm/logger": ">=1001.0.0 <1002.0.0"
|
|
@@ -75,13 +75,13 @@
|
|
|
75
75
|
"@types/which": "^3.0.4",
|
|
76
76
|
"is-windows": "^1.0.2",
|
|
77
77
|
"write-yaml-file": "^6.0.0",
|
|
78
|
-
"@pnpm/
|
|
79
|
-
"@pnpm/exec.commands": "1100.1.10",
|
|
78
|
+
"@pnpm/exec.commands": "1100.1.12",
|
|
80
79
|
"@pnpm/logger": "1100.0.0",
|
|
81
80
|
"@pnpm/prepare": "1100.0.10",
|
|
82
81
|
"@pnpm/test-ipc-server": "1100.0.0",
|
|
82
|
+
"@pnpm/engine.runtime.system-node-version": "1100.1.1",
|
|
83
83
|
"@pnpm/testing.command-defaults": "1100.0.1",
|
|
84
|
-
"@pnpm/workspace.projects-filter": "1100.0.
|
|
84
|
+
"@pnpm/workspace.projects-filter": "1100.0.15"
|
|
85
85
|
},
|
|
86
86
|
"engines": {
|
|
87
87
|
"node": ">=22.13"
|