Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@alfredodeza
Copy link
Contributor

Parses yarn.lock files while dedupping (per file only).

Closes #8

@alfredodeza alfredodeza requested review from luhring and wagoodman July 28, 2020 19:21
"github.com/anchore/syft/syft/pkg"
)

var composedNameExp = regexp.MustCompile("^\"(@{1}[^@]+)")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, non-blocking: There might be a simplification here... I think you may be able to get the composed & single into a single regex, matching on the first capture group: "^\"(@{0,1}[^@]+)" (not 100% certain though)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried fiddling around with the regex to match both (and I tried again with your suggestion) but couldn't get it to work for both. We can always come back to this one and improve it if we have a nicer regex to work with

Copy link
Contributor

@wagoodman wagoodman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good as is, added an optional regex to try, but consider it non-blocking

@alfredodeza alfredodeza merged commit bc69382 into master Jul 29, 2020
@alfredodeza alfredodeza deleted the issue-8 branch July 29, 2020 15:20
GijsCalis pushed a commit to GijsCalis/syft that referenced this pull request Feb 19, 2024
adds the yarn.lock cataloger
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.

Add yarn Cataloger

3 participants