libnpmexec 10.2.7 → 10.2.9

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/index.js +5 -1
  2. package/package.json +2 -2
package/lib/index.js CHANGED
@@ -87,8 +87,10 @@ const missingFromTree = async ({ spec, tree, flatOptions, isNpxTree, shallow })
87
87
  }
88
88
 
89
89
  // see if the package.json at `path` has an entry that matches `cmd`
90
+ // the path is a known-local directory, not a user-supplied dep, so
91
+ // allow-directory must not gate this introspection
90
92
  const hasPkgBin = (path, cmd, flatOptions) =>
91
- pacote.manifest(path, flatOptions)
93
+ pacote.manifest(path, { ...flatOptions, allowDirectory: 'all' })
92
94
  .then(manifest => manifest?.bin?.[cmd]).catch(() => null)
93
95
 
94
96
  const exec = async (opts) => {
@@ -147,6 +149,8 @@ const exec = async (opts) => {
147
149
  // we have to install the local package into the npx cache so that its
148
150
  // bin links get set up
149
151
  flatOptions.installLinks = false
152
+ // self-execution of a local bin, not a directory dep install
153
+ flatOptions.allowDirectory = 'all'
150
154
  // args[0] will exist when the package is installed
151
155
  packages.push(p)
152
156
  yes = true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libnpmexec",
3
- "version": "10.2.7",
3
+ "version": "10.2.9",
4
4
  "files": [
5
5
  "bin/",
6
6
  "lib/"
@@ -61,7 +61,7 @@
61
61
  },
62
62
  "dependencies": {
63
63
  "@gar/promise-retry": "^1.0.0",
64
- "@npmcli/arborist": "^9.5.0",
64
+ "@npmcli/arborist": "^9.7.0",
65
65
  "@npmcli/package-json": "^7.0.0",
66
66
  "@npmcli/run-script": "^10.0.0",
67
67
  "ci-info": "^4.0.0",