PATH:
usr
/
lib
/
node_modules
/
npm
/
lib
/
utils
// compares the inventory of package items in the tree // that is about to be installed (idealTree) with the inventory // of items stored in the package-lock file (virtualTree) // // Returns empty array if no errors found or an array populated // with an entry for each validation error found. function validateLockfile (virtualTree, idealTree) { const errors = [] // loops through the inventory of packages resulted by ideal tree, // for each package compares the versions with the version stored in the // package-lock and adds an error to the list in case of mismatches for (const [key, entry] of idealTree.entries()) { const lock = virtualTree.get(key) if (!lock) { errors.push(`Missing: ${entry.name}@${entry.version} from lock file`) continue } if (entry.version !== lock.version) { errors.push(`Invalid: lock file's ${lock.name}@${lock.version} does ` + `not satisfy ${entry.name}@${entry.version}`) } } return errors } module.exports = validateLockfile
[-] verify-signatures.js
[edit]
[-] format.js
[edit]
[-] completion.fish
[edit]
[-] validate-lockfile.js
[edit]
[-] display.js
[edit]
[-] installed-shallow.js
[edit]
[-] format-search-stream.js
[edit]
[-] tar.js
[edit]
[-] sbom-spdx.js
[edit]
[-] update-workspaces.js
[edit]
[-] explain-dep.js
[edit]
[-] npm-usage.js
[edit]
[-] log-file.js
[edit]
[-] sbom-cyclonedx.js
[edit]
[-] open-url.js
[edit]
[-] get-workspaces.js
[edit]
[-] format-bytes.js
[edit]
[-] did-you-mean.js
[edit]
[-] audit-error.js
[edit]
[-] get-identity.js
[edit]
[-] output-error.js
[edit]
[-] error-message.js
[edit]
[-] reify-finish.js
[edit]
[-] queryable.js
[edit]
[+]
..
[-] timers.js
[edit]
[-] auth.js
[edit]
[-] cmd-list.js
[edit]
[-] explain-eresolve.js
[edit]
[-] reify-output.js
[edit]
[-] installed-deep.js
[edit]
[-] ping.js
[edit]
[-] completion.sh
[edit]
[-] read-user-info.js
[edit]
[-] is-windows.js
[edit]