You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[CLI]: yarn changeset publish is not attempting to publish with yarn #1411
I'm working on a yarn monorepo in which the packages must be published to a private registry. Initially when running yarn changeset publish, I noticed that it was ignoring the npmPublishRegistry field in my .yarnrc.yml. I got around the issue by adding the registry to publishConfig property of all the package.jsons and logging in with npm, but after successfully publishing the packages, I ran into major issue. Yarn replaces any references to the workspace protocol within the package.json dependencies with the correct version, but since the CLI seems to always publish with npm, this replacement never ocurrs, and thus a broken package.json is published, which cannot be installed with npm.
I haven't done a deep dive into the source code, but unless I'm misunderstanding something getPublishTool only returns either npm or pnpm.
Proposed solution
getPublishTool should also support yarn
Reacted by Bruno Sampaio, Ilya Kibardin, Kevin van Zonneveld, João Glória and Yash Oswal
This issue just caused us an incident in production due to incorrect resolutions resulting in duplicate internal packages. Is a fix being added soon or do we need to come up with a custom solution?
@Andarist are you able to help us here by any chance? Are you guys looking into this issue? If not, could you give me any guidance on how to contribute a fix? Or do you have any guidance on how we can go around this problem for now?
@Andarist I created a PR but can't assign reviewers. Could you have a look at it or ask someone to review it? I tested it locally and it works. workspace:^ was replaced by the expected versions.
Activity
bensampaio commentedon Aug 29, 2024
Any updates on this issue?
This issue just caused us an incident in production due to incorrect resolutions resulting in duplicate internal packages. Is a fix being added soon or do we need to come up with a custom solution?
bensampaio commentedon Aug 30, 2024
@Andarist are you able to help us here by any chance? Are you guys looking into this issue? If not, could you give me any guidance on how to contribute a fix? Or do you have any guidance on how we can go around this problem for now?
bensampaio commentedon Aug 30, 2024
@Andarist I created a PR but can't assign reviewers. Could you have a look at it or ask someone to review it? I tested it locally and it works.
workspace:^was replaced by the expected versions.#1449