conventional-changelog / standard-version

:trophy: Automate versioning and CHANGELOG generation, with semver.org and conventionalcommits.org
ISC License
7.69k stars 794 forks source link

[feat] standard-version --paths [".", "../other/folder"] #574

Open snebjorn opened 4 years ago

snebjorn commented 4 years ago

Support multiple paths just as packageFiles and bumpFiles.

// .versionrc
{
  "paths": [
      // current folder
      ".",
      // but also this sibling folder
      "../other/folder"
   ]
}
bmayen commented 4 years ago

There is a strong use case for this in monorepos, which may have a structure such as: lib1/ lib2/ ../common

where common folder contains code shared by both libs. If code in common changes, its commits should be inspected for bumping dependent libs.

bmayen commented 4 years ago

Looked into this a bit more and see that a single string path is expected by all of the dependent conventional-changelog libs as well. Could add a PR for standard-version that calls out to conventional-recommended-bump and conventional-changelog once for each item in path array, but the "correct" fix would be to add support for path array within each dependent lib.

ianldgs commented 3 years ago

Maybe another option would be to have a path argument on the standard-version command. That way, there's no need to update the .versionrc each time you add a new package.