Does Nx provide a way to…

1 minute read

Does Nx provide a way to version and publish publishable packages in a samelike way as lerna?


I’m not sure what Lerna does, but Nx doesn’t focus on versioning/publishing packages. Since the main way of sharing code is using it within the same monorepo.

Nx has no way of automatically bumping version numbers right now, but people can write scripts/schematics to do that. Maybe ’s semantic-release-plus does this? I haven’t taken a look at it yet.

currently nx offers a subject of features that lerna does. In 8.11(or 12) nx release support for buildable libraries which provides one feature of lerna and as Isaac mentioned library does versioning for you via ng release I believe. He will have to clear it up as I havent used it before. I know it is posted in the npm packages channel.

Ok, Tnx!

I’ll have a look at that :slightly_smiling_face:

You are welcome!

I’m working on adding an example repo for semantic-release-plus I have it working on my company’s repo. I’m the owner of semantic-release-plus

  • semantic-release-plus does let you auto generate the next version number based on your commit history of individual projects. It does not support lerna style fixed/locked. It supports the Independent mode where each publishable package maintains it’s own version.

It also does all the releasing steps based on the same plugins supported by semantic-release (npm, github, …) all the plugins should work that work with semantic-release

Plugins that I am actively using that I can confirm work: '@semantic-release/commit-analyzer', '@semantic-release/release-notes-generator', '@semantic-release/changelog', '@semantic-release/git', '@semantic-release/npm', 'semantic-release-docker'.

Plus a number of custom plugins to do things like replace-in-file, generate json with version and build information, publish zip to artifactory maven repo.

tnx, I’ll try to implement it in the following days. The things I read, are the tings I have alreay done with lerna in the past.

To enable the independent mode, do you need to work with the commitPaths then?


If you are not in a rush I can probably get a demo repo setup this today or tomorrow

commitPaths should be the folders of the dependent projects that you want to cause a release when you change there as well.