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)
Problem
semantic-releasedon't useyarncommand when publishing so when using yarn workspace protocol, it didn't replace the protocol when published tonpm.{ "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/npmThe gist is:
.yarnrc.ymlfile in the root project, or theyarn.lockfile always contain__metadatawhile yarn 1 not.yarn npm publish)