n8n/packages
Matsuuu b21ef9f5bc
ci: Resolve the npm-install graph without downloading it
The scratch step installed ~2500 packages to read their package.json files.
`npm install --package-lock-only` reports the tree npm would install without
fetching a tarball, and the lockfile's `packages` keys are the paths npm
materializes — one key is one physical copy, the same ground truth the on-disk
walk reads.

`copiesFromLockfile` maps that to the shape `analyze()` already takes. Two
details the on-disk walk got for free:

- An alias (`"zod-v3": "npm:zod@^3"`) is a real second copy of zod. npm records
  `name` on the entry when it differs from the directory, so the copy is keyed
  on the manifest name.
- A lockfile lists every platform's build of an optional native dependency,
  where an install unpacks only the matching one. Entries whose `os`/`cpu` rule
  out this machine are dropped, or the report invents copies that never
  coexist.

An unreadable or v1 lockfile throws, matching `collectCopies`: callers must
read that as "the check did not run", never as "no duplicates found".

Verified equivalent through the CLI on a 17-package closure (413 resolved
packages): the duplicate report is byte-identical to the real install's — 15
groups, same copy counts, same versions.

`collectCopies` stays; `verify-closure` still walks a built closure on disk.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-20 10:38:00 +03:00
..
@n8n chore: Bundle/2.x (#36558) 2026-08-19 07:57:44 +03:00
cli chore: Bundle/2.x (#36558) 2026-08-19 07:57:44 +03:00
core chore: Bundle/2.x (#36558) 2026-08-19 07:57:44 +03:00
extensions/insights 🚀 Release 2.34.0 (#35487) 2026-08-04 07:14:55 +00:00
frontend chore: Bundle/2.x (#36558) 2026-08-19 07:57:44 +03:00
modules refactor(editor): Extract instance-registry into a frontend module package (no-changelog) (#36325) 2026-08-18 12:00:24 +00:00
node-dev chore: Set up repository for TypeScript 7 migration (#33890) 2026-07-09 13:21:16 +03:00
nodes-base chore: Bundle/2.x (#36558) 2026-08-19 07:57:44 +03:00
testing ci: Resolve the npm-install graph without downloading it 2026-08-20 10:38:00 +03:00
workflow chore: Bundle/2.x (#36558) 2026-08-19 07:57:44 +03:00