JavaScript
editpackage.json
NpmPackageJsonDependencyScanner reads package.json files, and reports as Npm:
- the dependency sections (
dependencies,devDependencies, ...); packageManager, under the name it is written with;- npm
overrides, including nested overrides and their.key, Yarnresolutions, and pnpmpnpm.overrides.
The version is the text of the file, such as ^1.2.0. More rules:
- In overrides and resolutions, the package is the last one of the key, without its version selector:
"**/a/@scope/b@^1.0.0": "2.0.0"is reported as@scope/bversion2.0.0. - An alias (
"name": "npm:package@1.0.0") is reported as the aliased package, with the alias name in Dependency.Metadata under thealiaskey. - Protocol and path specifiers (
workspace:,file:,link:, git URLs,github:, tarball URLs,owner/reposhorthands, ...) and override references ($name) are reported with a version location that is not updatable. - The version of
packageManageris not updatable when a Corepack hash (+sha512...) follows it, as the hash would no longer match.
Lock files
NpmLockFileDependencyScanner reads package-lock.json and npm-shrinkwrap.json (lockfile versions 2 and 3). It reports the packages installed in node_modules, with versions that are not updatable, as their integrity hashes would no longer match. The root project, the workspace folders and the links are not reported.
Lockfile version 1 (npm 6 and earlier), pnpm-lock.yaml, yarn.lock and bun.lock are not scanned.
The command-line tool can regenerate package-lock.json after an update: see Lock files.