-
Notifications
You must be signed in to change notification settings - Fork 762
Description
Problem
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