standard-version icon indicating copy to clipboard operation
standard-version copied to clipboard

document lerna as monorepo option

Open blackxored opened this issue 7 years ago • 12 comments
trafficstars

I've read a lot of threads without a conclusive answer. Is there monorepo support in standard-version or planned?

  • Multiple changelog generator including a root changelog.
  • Multiple package version bumps at once.
  • etc

blackxored avatar Nov 27 '17 14:11 blackxored

lerna is already using conventional-changelog. I guess we should document it.

stevemao avatar Nov 28 '17 01:11 stevemao

@stevemao @blackxored; following up from @stevemao's comment. I helped add similar functionality to lerna, to the functionality in standard-version.

I think we'd be smart to reference lerna in our README for standard-version.

bcoe avatar Nov 29 '17 06:11 bcoe

Yes, I found lerna's --conventional-commits eventually. However, I think this package has a couple of more options. Lerna won't still give me a combined changelog at the root, unfortunately.

blackxored avatar Nov 29 '17 19:11 blackxored

What's the state of this issue?

I don't understand if I should use lerna's option to create a conventional-changelog or use this package instead.

pantoninho avatar Apr 04 '18 16:04 pantoninho

@pantoninho I am using the one provided by lerna. At the moment with conventional-changelog/standard-version you can't have independent versions and generated CHANGELOG.md with the correct meta-info on them, because it bumps all the packages with the same version without respect the independent option.

For the first creation of the each CHANGELOG.md I use this independent changelog generation tip

And after it, having in your lerna.json file:

"command": {
    "version": {
       "message": "chore(release): publish",
       "conventionalCommits": true,
       "yes": true
    }
  }

you can simple call npx lerna version which will update your CHANGELOG.md files, will bump your package versions respecting them with the conventional commit preset chosen and will respect the independent versioning for each package.

inakiarroyo avatar Sep 06 '19 13:09 inakiarroyo

What if we are not using lerna? Is there still a way to use this with a monorepo?

coder2000 avatar Sep 22 '19 01:09 coder2000

Yes, I'm curious how I can use standard-version in a mono-repo (configured using yarn workspaces, not lerna) consisting of multiple npm packages.

Like is there a way to tell standard-version to only look at git commits that affected files under a certain path when building the change log and bumping the package version?

codeandcats avatar Oct 13 '19 10:10 codeandcats

Did anyone make some progress on this?

snebjorn avatar Mar 14 '20 14:03 snebjorn

@snebjorn @codeandcats @bcoe I have a MR opened https://github.com/conventional-changelog/standard-version/pull/503 which enables that

micaelmbagira avatar Apr 22 '20 20:04 micaelmbagira

Yes, I'm curious how I can use standard-version in a mono-repo (configured using yarn workspaces, not lerna) consisting of multiple npm packages.

Like is there a way to tell standard-version to only look at git commits that affected files under a certain path when building the change log and bumping the package version?

Is it possible now in 2021 to maintain monorepo with independent versions without lerna? Or do you have some plans for it?

If above comment is possible, then what would be the steps to implement it, a example would be appreciated.

devjayantmalik avatar Jun 22 '21 11:06 devjayantmalik

@micaelmbagira nice work on the PR, but how can we put together this with standard-version so we can drop lerna completely?

phun-ky avatar Feb 18 '22 18:02 phun-ky

How can I add docs, perf, test and other features to conventional changelog? They are currently just simply being ignored.

ipleten avatar Mar 28 '23 03:03 ipleten