Skip to content

[CLI]: yarn changeset publish is not attempting to publish with yarn  #1411

@christianlundberg

Description

@christianlundberg

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions