Repository navigation
fix(scripts): verify installed versions against bun.lock before generating notices - #60
Merged
Merged
Conversation
…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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The notices generator reads versions off the on-disk
node_modulestree, which is local state. With a stale or partial install it resolves different versions than the lockfile pins, sonotices:checkfails on a repo that is actually correct — and blames the notices rather than the install.Cross-checks every resolved package against
bun.lockbefore 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-levelzod→ 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; afterbun installit reports up to date and leaves the working tree clean.(The "check mutates tracked files" half of the issue is already fixed on main —
--checkcompares in memory and writes nothing.)