@pnpm/exec.commands 1100.1.11 → 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.
Files changed (2) hide show
  1. package/lib/dlx.js +21 -1
  2. package/package.json +19 -19
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
- const manifest = await readProjectManifestOnly(pkgDir, opts);
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.11",
3
+ "version": "1100.1.12",
4
4
  "description": "Commands for running scripts",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -39,29 +39,29 @@
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/catalogs.resolver": "1100.0.0",
43
+ "@pnpm/building.commands": "1100.0.22",
42
44
  "@pnpm/cli.command": "1100.0.1",
43
45
  "@pnpm/cli.common-cli-options-help": "1100.0.1",
44
- "@pnpm/building.commands": "1100.0.21",
45
- "@pnpm/cli.utils": "1101.0.6",
46
- "@pnpm/config.reader": "1101.3.3",
46
+ "@pnpm/cli.utils": "1101.0.7",
47
+ "@pnpm/config.reader": "1101.4.0",
47
48
  "@pnpm/config.version-policy": "1100.1.1",
48
- "@pnpm/catalogs.resolver": "1100.0.0",
49
+ "@pnpm/core-loggers": "1100.1.1",
49
50
  "@pnpm/crypto.hash": "1100.0.1",
50
- "@pnpm/engine.runtime.commands": "1100.0.16",
51
+ "@pnpm/deps.status": "1100.0.18",
52
+ "@pnpm/engine.runtime.commands": "1100.0.17",
51
53
  "@pnpm/error": "1100.0.0",
52
- "@pnpm/exec.lifecycle": "1100.0.12",
53
54
  "@pnpm/exec.pnpm-cli-runner": "1100.0.1",
54
- "@pnpm/installing.commands": "1100.4.2",
55
- "@pnpm/core-loggers": "1100.1.1",
56
- "@pnpm/shell.path": "1100.0.1",
55
+ "@pnpm/exec.lifecycle": "1100.0.13",
56
+ "@pnpm/installing.client": "1100.2.2",
57
+ "@pnpm/installing.commands": "1100.5.0",
57
58
  "@pnpm/pkg-manifest.reader": "1100.0.4",
58
59
  "@pnpm/resolving.parse-wanted-dependency": "1100.0.1",
59
- "@pnpm/installing.client": "1100.2.1",
60
+ "@pnpm/shell.path": "1100.0.1",
60
61
  "@pnpm/store.path": "1100.0.1",
61
- "@pnpm/deps.status": "1100.0.17",
62
- "@pnpm/workspace.injected-deps-syncer": "1100.0.13",
63
62
  "@pnpm/types": "1101.1.1",
64
- "@pnpm/workspace.project-manifest-reader": "1100.0.7",
63
+ "@pnpm/workspace.project-manifest-reader": "1100.0.8",
64
+ "@pnpm/workspace.injected-deps-syncer": "1100.0.14",
65
65
  "@pnpm/workspace.projects-sorter": "1100.0.3"
66
66
  },
67
67
  "peerDependencies": {
@@ -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/exec.commands": "1100.1.11",
79
- "@pnpm/engine.runtime.system-node-version": "1100.1.1",
78
+ "@pnpm/exec.commands": "1100.1.12",
79
+ "@pnpm/logger": "1100.0.0",
80
+ "@pnpm/prepare": "1100.0.10",
80
81
  "@pnpm/test-ipc-server": "1100.0.0",
81
- "@pnpm/workspace.projects-filter": "1100.0.14",
82
+ "@pnpm/engine.runtime.system-node-version": "1100.1.1",
82
83
  "@pnpm/testing.command-defaults": "1100.0.1",
83
- "@pnpm/prepare": "1100.0.10",
84
- "@pnpm/logger": "1100.0.0"
84
+ "@pnpm/workspace.projects-filter": "1100.0.15"
85
85
  },
86
86
  "engines": {
87
87
  "node": ">=22.13"