qiwi / multi-semantic-release

Proof of concept that wraps semantic-release to work with monorepos.
BSD Zero Clause License
86 stars 34 forks source link

Prevent updating dependencies in affected `package.json` #87

Open nfantone opened 1 year ago

nfantone commented 1 year ago

Issue type

Expected behavior

We would like multi-semantic-release to provide the option to avoid updating cross-references between interdependent packages with the next release version. This is particularly useful when using yarn workspace: refs as versions in package.json, which yarn pack already takes care of resolving.

{
  "dependencies": {
    "@myorg/packageA": "workspace:^",
    "@myorg/packageB": "workspace:^",
    "express-winston": "^5.0.0"
  }
}
{
  "dependencies": {
    "@myorg/packageA": "1.2.3",
    "@myorg/packageB": "2.4.1",
    "express-winston": "^5.0.0"
  }
}

Ideally, both @myorg/packageA and @myorg/packageB should continue pointing to workspace:^ after a full release.

Actual behavior

Versions of affected dependents always get overridden by multi-semantic-release removing workspace: references and, ultimately, pushing changes to the repository.