question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Usage in monorepo nx workspace

See original GitHub issue

Hi, I am using nx workspace to handle multiple angular projects as well as shared libraries. Let’ s assume a folder structure like this:

|_package.json
|_CHANGELOG.md
|_projectA
  |_package.json
  |__CHANGELOG.md
|_projectB
  |_package.json
  |_CHANGELOG.md

I am trying to figure out a way to use conventional-changelog in my release process. I want to have seperated changelogs for each project and one root changelog. By using conventional commits I would like to somehow define the scope of the commit (e.g. that this feat() only affects projectA and thus, is only mentioned in this specific changelog.

Is this possible or is this a wrong approach in a monorepo?

Help appreciated.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:38
  • Comments:13

github_iconTop GitHub Comments

10reactions
snebjorncommented, Mar 16, 2020

@sidyes I think I’ve found a solution. It’s not ideal, but it’ll do for now.

You put an .versionrc file in each sub folder with the "path": "." config. Then you run standard-version from each sub folder you want to update the changelog for.

Example https://github.com/snebjorn/akita/blob/refactor/nx-workspace/libs/akita-ng-entity-service/

6reactions
snebjorncommented, Dec 3, 2020

I believe so. My initial test worked. But haven’t used it in the wild yet. But wait. There’s more! 🎈 🎉

I managed to improve upon it quite a bit. This combo makes it work from the repo root and without standard-version globally installed!

files in project folder: .yarnrc .versionrc

npm script in root: “release:akita-entity-service”: “yarn --cwd libs/akita-entity-service run standard-version”

Read more comments on GitHub >

github_iconTop Results From Across the Web

Monorepos - Nx
Monorepos. A monorepo is a single git repository that holds the source code for multiple applications and libraries, along with the tooling for...
Read more >
Introduction to Nx Monorepo Workspace — Code Sharing ...
Retrieve environment variables from the system. Sometimes we have to use environment variables in shared services so we also have to decouple them....
Read more >
[Tech Blog] Introduction to NX and Monorepos - AnyMind Group
Nx is a framework that allows you to architect, test, and build your project at any scale with the most popular modern Front-end...
Read more >
Getting Started with Monorepo with Nx Nrwl - Rupesh Tiwari
Nx.Nrwl monorepo framework is an excellent framework to manage any number of JavaScript projects in just one GitHub Repo. With Nx.Nrwl Monorepo ......
Read more >
Nx - The fastest growing monorepo solution in the JS ecosystem
The term "monorepo" is kind of misleading, but in principle it is a single (usually) Git repository hosting multiple projects. Those projects ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found