Skip to content

Conversation

@arcanis
Copy link
Member

@arcanis arcanis commented Sep 22, 2025

What's the problem this PR addresses?

Yarn normalizes all ranges to prefix them by a unique registry string (ie npm:^2.0.0) but other package managers don't understand those explicit ranges (they expect ^2.0.0).

Fixes #6913

How did you fix it?

Removes the protocol from the output before storing it in the package.json when operating on catalog: replacements. This follows the same logic as in yarn add.

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.

@arcanis arcanis merged commit f6aafa0 into master Sep 22, 2025
25 of 26 checks passed
@arcanis arcanis deleted the mael/catalogs-npm-range branch September 22, 2025 16:07
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.

[Bug]: yarn pack with a catalog produces invalid npm aliases

3 participants