JavaScript and TypeScript#
What licenseal reads in an npm project. The rules that hold for every ecosystem are under How a scan works.
- Registry: npm
- Manifests:
package.json(dependencies,devDependencies,peerDependencies,optionalDependencies) - Lockfiles:
package-lock.json(v1/v2/v3),pnpm-lock.yaml,yarn.lock,bun.lock
What is read#
peerDependenciesandoptionalDependenciesare read as production, likedependencies.- A package installed under an npm alias is reported under its real name.
- A package that another
package.jsonin the tree defines (a monorepo or pnpm workspace member) is not reported; a stderr line says how many were excluded.
Dev dependencies#
devDependencies are dev dependencies.
Off-registry dependencies#
These are reported as off-registry dependencies, in package.json and in every lockfile format:
- a git URL;
- a hosting shorthand (
github:user/repo, a bareuser/repo); - a tarball URL;
- a
file:/link:/portal:or bare path (../pkg,C:\pkg,pkg-1.0.0.tgz) the scan does not read.
One exception: a lockfile's resolved tarball URL in the layout registries serve (<host>/<name>/-/<file>.tgz, on any host) is a package of another registry, looked up on registry.npmjs.org.
Not evaluated#
engines.overrides, Yarnresolutions, and pnpmoverridesinpackage.jsonare not read: see What is not read.
See also#
- Dependency resolution and Versions and estimates, which apply to every ecosystem
- What is scanned, for which npm lockfile is read when a directory holds several
- Alternate registries, for a package from a private npm registry
- Network egress, for the hosts contacted and what each is asked