Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect extracted requirement when parsing yarn.lock #3931

Closed
JonoYang opened this issue Sep 25, 2024 · 1 comment · Fixed by #3943
Closed

Incorrect extracted requirement when parsing yarn.lock #3931

JonoYang opened this issue Sep 25, 2024 · 1 comment · Fixed by #3943
Assignees

Comments

@JonoYang
Copy link
Member

JonoYang commented Sep 25, 2024

I have a yarn.lock file with the dependency "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0" and we are not parsing it correctly. The extracted_requirement returned from this is npm:wrap-ansi@^7.0.0, where ^7.0.0 should be returned.

"@isaacs/cliui@^8.0.2":
  version "8.0.2"
  resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550"
  integrity sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==
  dependencies:
    string-width "^5.1.2"
    string-width-cjs "npm:string-width@^4.2.0"
    strip-ansi "^7.0.1"
    strip-ansi-cjs "npm:strip-ansi@^6.0.1"
    wrap-ansi "^8.1.0"
    wrap-ansi-cjs "npm:wrap-ansi@^7.0.0"
@JonoYang JonoYang self-assigned this Sep 25, 2024
JonoYang added a commit that referenced this issue Sep 25, 2024
@JonoYang
Copy link
Member Author

JonoYang commented Oct 2, 2024

We've come across package-lock.json and yarn.lock where the dependency is listed like this:

			"dependencies": {
				"@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.7",
                         ...

https://github.com/yellbuy/go-cloud-framework-vue/blob/09435aad9633f7fe7961e4cbb6c5b28e144c65ce/package-lock.json.bak#L1783

This is an alias (https://docs.npmjs.com/cli/v10/using-npm/package-spec#aliases) where the stuff on the right hand side (npm:@sxzz/popperjs-es@^2.11.7) is the package being used, but it is being refered to as @popperjs/core in the code.

JonoYang added a commit that referenced this issue Oct 3, 2024
JonoYang added a commit that referenced this issue Oct 3, 2024
JonoYang added a commit that referenced this issue Oct 8, 2024
JonoYang added a commit that referenced this issue Oct 8, 2024
JonoYang added a commit that referenced this issue Oct 8, 2024
JonoYang added a commit that referenced this issue Oct 8, 2024
JonoYang added a commit that referenced this issue Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant