@npmcli/arborist
Advanced tools
Comparing version 5.4.0 to 5.5.0
@@ -118,2 +118,3 @@ // mix-in implementing the loadActual method | ||
ignoreMissing = false, | ||
forceActual = false, | ||
} = options | ||
@@ -145,22 +146,26 @@ this[_filter] = filter | ||
// Note: hidden lockfile will be rejected if it's not the latest thing | ||
// in the folder, or if any of the entries in the hidden lockfile are | ||
// missing. | ||
const meta = await Shrinkwrap.load({ | ||
path: this[_actualTree].path, | ||
hiddenLockfile: true, | ||
resolveOptions: this.options, | ||
}) | ||
if (meta.loadedFromDisk) { | ||
this[_actualTree].meta = meta | ||
return this[_loadActualVirtually]({ root }) | ||
} else { | ||
// if forceActual is set, don't even try the hidden lockfile | ||
if (!forceActual) { | ||
// Note: hidden lockfile will be rejected if it's not the latest thing | ||
// in the folder, or if any of the entries in the hidden lockfile are | ||
// missing. | ||
const meta = await Shrinkwrap.load({ | ||
path: this[_actualTree].path, | ||
lockfileVersion: this.options.lockfileVersion, | ||
hiddenLockfile: true, | ||
resolveOptions: this.options, | ||
}) | ||
this[_actualTree].meta = meta | ||
return this[_loadActualActually]({ root, ignoreMissing }) | ||
if (meta.loadedFromDisk) { | ||
this[_actualTree].meta = meta | ||
return this[_loadActualVirtually]({ root }) | ||
} | ||
} | ||
const meta = await Shrinkwrap.load({ | ||
path: this[_actualTree].path, | ||
lockfileVersion: this.options.lockfileVersion, | ||
resolveOptions: this.options, | ||
}) | ||
this[_actualTree].meta = meta | ||
return this[_loadActualActually]({ root, ignoreMissing }) | ||
} | ||
@@ -167,0 +172,0 @@ |
{ | ||
"name": "@npmcli/arborist", | ||
"version": "5.4.0", | ||
"version": "5.5.0", | ||
"description": "Manage node_modules trees", | ||
@@ -24,3 +24,3 @@ "dependencies": { | ||
"mkdirp-infer-owner": "^2.0.0", | ||
"nopt": "^5.0.0", | ||
"nopt": "^6.0.0", | ||
"npm-install-checks": "^5.0.0", | ||
@@ -27,0 +27,0 @@ "npm-package-arg": "^9.0.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
435705
11554
- Removednopt@5.0.0(transitive)
Updatednopt@^6.0.0