npm packages¶
npm: <name>@<version> hashes the dist.integrity of that version.
For npm, PyPI, crates, gems and Maven, an exact version binds that release.
Anything else (a range, latest, a tag) binds the whole release list, so any
new release runs the test again. Aval never picks a version from a range.
scope:
resolve:
- npm: prettier@3.3.3 # exact: binds 3.3.3
- npm: typescript@latest # floating: binds every release and tag
- npm: "@types/node@22.x" # floating
- Exact means
x.y.z, with an optional-preand no operator. A name without a version meanslatest. A spec with+buildis never found (the registry strips it) and fails. - Fails for any spec npm installs from elsewhere: an alias (
npm:other),github:,org/repo,git+https:, a tarball URL,file:or a path (any spec with:,/,#or\, starting with.or~/, or ending in.tgz,.tar.gzor.tar). Usegitorurl, or pin. - The name follows npm's legacy rules, which npm still installs
(
JSONStream): at most 214 characters, an optional lowercase@scope/, then[A-Za-z0-9-~][A-Za-z0-9-._~]*. A name ending in.tgz,.tar.gzor.tarfails: npm reads it as a local file. - Floating: every version with its
dist.integrityand deprecation, and every dist-tag. A publish, an unpublish, a deprecation or a moved tag changes the id. - Registry
$npm_config_registry; token from the//host/:_authToken=line of~/.npmrc(or$npm_config_userconfig),${VAR}expanded. As in npm,npm_config_*variables are read in any letter case, with_equal to-after the first character. A project.npmrcand the global npmrc are not read. ~/.npmrcis read as npm reads it (ini: quotes removed,;and#comments, keys under a[section]ignored). A line Aval cannot read askey=valuefails the fingerprint, and no token is sent. Settings that point the package at another registry fail too (details).
Pin instead for your project's own dependencies: commit
package-lock.json (or yarn.lock, pnpm-lock.yaml, bun.lock) and add
it to scope.dependencies. Resolve is for a tool the test installs on its
own, such as npx prettier@3.3.3. Only the package is bound, not the
dependencies npm picks for it.
scope.resolve never clears a scanner finding: a move
changes the fingerprint, but the reference still blocks reuse. Pin it in
place, or accept it with
scope.allowMutable.