libnpmexec 8.1.2 → 8.1.3
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/index.js +6 -2
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -32,7 +32,7 @@ const getManifest = async (spec, flatOptions) => {
|
|
|
32
32
|
|
|
33
33
|
// Returns the required manifest if the spec is missing from the tree
|
|
34
34
|
// Returns the found node if it is in the tree
|
|
35
|
-
const missingFromTree = async ({ spec, tree, flatOptions, isNpxTree }) => {
|
|
35
|
+
const missingFromTree = async ({ spec, tree, flatOptions, isNpxTree, shallow }) => {
|
|
36
36
|
// If asking for a spec by name only (spec.raw === spec.name):
|
|
37
37
|
// - In local or global mode go with anything in the tree that matches
|
|
38
38
|
// - If looking in the npx cache check if a newer version is available
|
|
@@ -41,6 +41,10 @@ const missingFromTree = async ({ spec, tree, flatOptions, isNpxTree }) => {
|
|
|
41
41
|
// registry spec that is not a specific tag.
|
|
42
42
|
const nodesBySpec = tree.inventory.query('packageName', spec.name)
|
|
43
43
|
for (const node of nodesBySpec) {
|
|
44
|
+
// continue if node is not a top level node
|
|
45
|
+
if (shallow && node.depth) {
|
|
46
|
+
continue
|
|
47
|
+
}
|
|
44
48
|
if (spec.rawSpec === '*') {
|
|
45
49
|
return { node }
|
|
46
50
|
}
|
|
@@ -202,7 +206,7 @@ const exec = async (opts) => {
|
|
|
202
206
|
const globalArb = new Arborist({ ...flatOptions, path: globalPath, global: true })
|
|
203
207
|
const globalTree = await globalArb.loadActual()
|
|
204
208
|
const { manifest: globalManifest } =
|
|
205
|
-
await missingFromTree({ spec, tree: globalTree, flatOptions })
|
|
209
|
+
await missingFromTree({ spec, tree: globalTree, flatOptions, shallow: true })
|
|
206
210
|
if (!globalManifest && await fileExists(`${globalBin}/${args[0]}`)) {
|
|
207
211
|
binPaths.push(globalBin)
|
|
208
212
|
return await run()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "libnpmexec",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.3",
|
|
4
4
|
"files": [
|
|
5
5
|
"bin/",
|
|
6
6
|
"lib/"
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"tap": "^16.3.8"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@npmcli/arborist": "^7.5.
|
|
62
|
+
"@npmcli/arborist": "^7.5.4",
|
|
63
63
|
"@npmcli/run-script": "^8.1.0",
|
|
64
64
|
"ci-info": "^4.0.0",
|
|
65
65
|
"npm-package-arg": "^11.0.2",
|