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

fix(core): update yarn-parser to handle yarn v4 syntax #29067

Merged
merged 2 commits into from
Dec 20, 2024

Conversation

a88zach
Copy link
Contributor

@a88zach a88zach commented Nov 25, 2024

Update the yarn-parser so that yarn.lock file generation works with yarn v4

Current Behavior

yarn.lock is not correctly created when using yarn v4

"":
  version: 1.22.8
  resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin<compat/resolve>::version=1.22.8&hash=c3c19d"
  dependencies:
    is-core-module: "npm:^2.13.0"
    path-parse: "npm:^1.0.7"
    supports-preserve-symlinks-flag: "npm:^1.0.0"
  bin:
    resolve: bin/resolve
  checksum: 0446f024439cd2e50c6c8fa8ba77eaa8370b4180f401a96abf3d1ebc770ac51c1955e12764cde449fde3fff480a61f84388e3505ecdbab778f4bef5f8212c729
  languageName: node
  linkType: hard

Expected Behavior

yarn.lock should be created correctly with no missing keys

Related Issue(s)

Fixes #19881

@a88zach a88zach requested review from meeroslav and a team as code owners November 25, 2024 19:08
@a88zach a88zach requested a review from AgentEnder November 25, 2024 19:08
Copy link

vercel bot commented Nov 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Nov 25, 2024 7:11pm

normalizedKey = key
.slice(0, key.indexOf('#'))
.replace(`@patch:${packageName}@`, '@npm:');
.replace(regEx, '@npm:$2');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The entries for yarn 3 follow this syntax:
resolve@patch:[email protected]#~builtin<compat/resolve>

The entries for yarn 4 follow this syntax:
resolve@patch:resolve@npm%3A1.22.8#optional!builtin<compat/resolve>

@a88zach
Copy link
Contributor Author

a88zach commented Dec 17, 2024

@leosvelperez any thoughts on this one?

@AgentEnder AgentEnder merged commit efa5ba2 into nrwl:master Dec 20, 2024
6 checks passed
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

yarn.lock not generated correctly with yarn v4
3 participants