Skip to content

Make semantic-release plugin that support yarn berry publish command #25

@latipun7

Description

@latipun7

Problem

semantic-release don't use yarn command when publishing so when using yarn workspace protocol, it didn't replace the protocol when published to npm.

{
  "dependencies": {
    "foo": "workspace:*",
    "bar": "workspace:^1.2.3",
    "baz": "workspace:path/to/baz"
  }
}

Try to solve semantic-release/npm#382

Possible Solution

Based on @semantic-release/npm
The gist is:

  • Detect the project if it's using yarn 2. All yarn 2 project always has .yarnrc.yml file in the root project, or the yarn.lock file always contain __metadata while yarn 1 not.
  • If the project using yarn 2, use yarn publishing command (yarn npm publish)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions