Skip to content

feat: detect and scan npm-shrinkwrap.json with precedence over package-lock.json#356

Merged
sonukapoor merged 1 commit into
mainfrom
feature/issue-348-npm-shrinkwrap
May 17, 2026
Merged

feat: detect and scan npm-shrinkwrap.json with precedence over package-lock.json#356
sonukapoor merged 1 commit into
mainfrom
feature/issue-348-npm-shrinkwrap

Conversation

@sonukapoor
Copy link
Copy Markdown
Collaborator

Adds support for npm-shrinkwrap.json, matching npm's own resolution order where shrinkwrap takes precedence over package-lock.json.

The shrinkwrap file uses the identical format as package-lock.json, so it reuses the existing loadFromPackageLock parser. A new "npm-shrinkwrap" source label is added to ScanSource throughout the type system, including the exhaustive LOCKFILE_NAMES record in sarif.ts.

Closes #348

@sonukapoor sonukapoor force-pushed the feature/issue-348-npm-shrinkwrap branch from b19f922 to 5f07903 Compare May 17, 2026 15:11
@sonukapoor sonukapoor merged commit ace91ca into main May 17, 2026
6 checks passed
@sonukapoor sonukapoor deleted the feature/issue-348-npm-shrinkwrap branch May 17, 2026 15:12
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.

[Feature] Doesn't detect npm-shrinkwrap.json

1 participant