feat: add pre-release-fix regression fixture (#528)#794
Merged
Conversation
sonukapoor
previously approved these changes
Jul 4, 2026
sonukapoor
left a comment
Collaborator
There was a problem hiding this comment.
The test is thorough - it mocks the packument data with both stable and pre-release versions, constructs a realistic advisory with two ranges (one fixed at 4.19.2, one at the pre-release 5.0.0-beta.3), and validates both the resolution logic and the command output. The negative guards across both paths are exactly right. examples/readme.md is updated clearly. Good to go.
Craft a minimal express@4.18.2 lockfile where OSV includes a pre-release fixed hint (5.0.0-beta.3) — scanner must suggest a stable upgrade, never a pre-release target.
Collaborator
Author
|
@sonukapoor Rebased onto latest |
2c1cca5 to
e63575b
Compare
Collaborator
|
Merged - thank you @Ayush7614! |
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.
Summary
examples/pre-release-fix/for discussion Help wanted: edge case lockfile fixtures for regression testing #528 fixture 12express@4.18.2where OSV includes a pre-release fixed hint (5.0.0-beta.3on the 5.x range for GHSA-rv95-896h-c2vc)tests/fixture-scan.test.tswith negative guards for beta/rc/alpha/next/canaryScan output
Produces:
express@4.18.2with stable fixed hint (4.20.0), not5.0.0-beta.3npm install express@4.22.0— stable target, no pre-release in commandTest plan
npm test -- tests/fixture-scan.test.ts -t pre-release-fixnode dist/index.js examples/pre-release-fix --verboseCloses fixture 12 from #528