Skip to content

fix(scripts): verify installed versions against bun.lock before generating notices - #60

Merged
nc9 merged 5 commits into
mainfrom
fix/1410-notices-hermetic
Aug 1, 2026
Merged

nc9 merged 5 commits into
mainfrom
fix/1410-notices-hermetic

Conversation

@nc9

@nc9 nc9 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

The notices generator reads versions off the on-disk node_modules tree, which is local state. With a stale or partial install it resolves different versions than the lockfile pins, so notices:check fails on a repo that is actually correct — and blames the notices rather than the install.

Cross-checks every resolved package against bun.lock before generating, and fails with the real cause (Run bun install). Versions are collected as a set per name: the lockfile legitimately records nested resolutions under path keys (@squirrelscan/config/zod → zod@3, top-level zod → zod@4), so a duplicated dependency must not read as a mismatch.

Verified both ways locally: with a stale tree it reports exactly the drifted packages (tldts, smol-toml) and exits 1; after bun install it reports up to date and leaves the working tree clean.

(The "check mutates tracked files" half of the issue is already fixed on main — --check compares in memory and writes nothing.)

nc9 added 5 commits August 1, 2026 23:16
…ating notices

The generator reads versions off node_modules, which is local state: a
partial or stale install resolves different versions than the lockfile
pins, so --check failed on a correct repo and the message pointed at the
notices rather than the install (#1410).

Cross-check every resolved package against bun.lock first and fail with the
actual cause. Versions are collected as a SET per name because the lockfile
legitimately records nested resolutions under path keys
(@squirrelscan/config/zod), so a duplicated dependency is not a mismatch.

Signed-off-by: Nik Cubrilovic <[email protected]>
…etic

* origin/main:
  fix(cli): retry transient failures in the pre-flight reachability probe (#58)
@nc9
nc9 merged commit 1cfb6b9 into main Aug 1, 2026
13 checks passed
@nc9
nc9 deleted the fix/1410-notices-hermetic branch August 1, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant