conventional-changelog / standard-version

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

document lerna as monorepo option #225

Open blackxored opened 6 years ago

blackxored commented 6 years ago

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

stevemao commented 6 years ago

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

bcoe commented 6 years ago

@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.

blackxored commented 6 years ago

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.

pantoninho commented 6 years ago

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.

inakiarroyo commented 4 years ago

@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.

coder2000 commented 4 years ago

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

codeandcats commented 4 years ago

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?

snebjorn commented 4 years ago

Did anyone make some progress on this?

micaelmbagira commented 4 years ago

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

devjayantmalik commented 3 years ago

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.

phun-ky commented 2 years ago

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

ipleten commented 1 year ago

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