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: slug string conflict with scope #6115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xsbchen
Copy link

@xsbchen xsbchen commented Feb 2, 2024

What's the problem this PR addresses?

we have two packages: @myscope/user-email and @myscope-user/email, yarn install will show a error: Registry failed to return reference xxx, because yarn caches the results returned by the registry, the keys used in the cache are converted by the slugifyIdent method.In this case, the results after the conversion of these two packages are @myscope-user-email.

How did you fix it?

change the delimiter between scope and name from - to _, refer to https://docs.npmjs.com/cli/v10/using-npm/scope.

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@xsbchen
Copy link
Author

xsbchen commented Feb 2, 2024

hi @arcanis, we are planning to bump yarn to v4 in my team, but we encountered this problem, please review this PR.
Note: It is a break change, I'm not very sure about this.

Copy link
Member

@arcanis arcanis left a comment

Choose a reason for hiding this comment

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

It's unclear to me what this is fixing. The slugs are irrelevant to the registry, and your message doesn't explain the commands you run, the registry you use, or the full error message.

@xsbchen
Copy link
Author

xsbchen commented Mar 22, 2024

@arcanis

It's unclear to me what this is fixing. The slugs are irrelevant to the registry, and your message doesn't explain the commands you run, the registry you use, or the full error message.

@arcanis I updated the description:

we have two packages: @myscope/user-email and @myscope-user/email, yarn install will show a error: Registry failed to return reference xxx, because yarn caches the results returned by the registry, the keys used in the cache are converted by the slugifyIdent method.In this case, the results after the conversion of these two packages are @myscope-user-email.

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.

None yet

2 participants