feat(javascript): Add dependency parsing#4304
Merged
spiffcs merged 7 commits intoanchore:mainfrom Nov 6, 2025
Merged
Conversation
Signed-off-by: Tim Olshansky <456103+timols@users.noreply.github.com>
Signed-off-by: Tim Olshansky <456103+timols@users.noreply.github.com>
Signed-off-by: Tim Olshansky <456103+timols@users.noreply.github.com>
Signed-off-by: Tim Olshansky <456103+timols@users.noreply.github.com>
Signed-off-by: Tim Olshansky <456103+timols@users.noreply.github.com>
4 tasks
wagoodman
reviewed
Oct 29, 2025
internal/packagemetadata/names.go
Outdated
| jsonNames(pkg.NpmPackage{}, "javascript-npm-package", "NpmPackageJsonMetadata"), | ||
| jsonNames(pkg.NpmPackageLockEntry{}, "javascript-npm-package-lock-entry", "NpmPackageLockJsonMetadata"), | ||
| jsonNames(pkg.YarnLockEntry{}, "javascript-yarn-lock-entry", "YarnLockJsonMetadata"), | ||
| jsonNames(pkg.PnpmLockEntry{}, "javascript-pnpm-lock-entry", "PnpmLockJsonMetadata"), |
Contributor
There was a problem hiding this comment.
Suggested change
| jsonNames(pkg.PnpmLockEntry{}, "javascript-pnpm-lock-entry", "PnpmLockJsonMetadata"), | |
| jsonNames(pkg.PnpmLockEntry{}, "javascript-pnpm-lock-entry"), |
new entries here don't require mappings to legacy values
wagoodman
approved these changes
Oct 29, 2025
Contributor
wagoodman
left a comment
There was a problem hiding this comment.
There is one small change needed (+ regen the schema) but other than that this looks great!
Signed-off-by: Tim Olshansky <456103+timols@users.noreply.github.com>
a61c26c to
3f00a23
Compare
Contributor
Author
|
@wagoodman I made the changes - thanks! 🙏 |
Contributor
Author
|
@wagoodman anything holding this back from being merged? |
Contributor
|
@timols merged TYVM |
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.
Description
This PR adds dependency parsing for lockfiles in the javascript ecosystem: npm package-lock.json files (v2 and v3), yarn.lock files and pnpm-lock.yaml files. This tackles part of #572 and #3109 for JS.
I tried to avoid doing any larger re-factors, trying to stick to what seemed to be patterns for both the python dependency parsing and golang so as to keep this small.
Type of change
Checklist: