commitizen / commitizen/cz-cli

Enable usage in monorepos

Open
#782 3 comments 30 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
17.5k
Forks
566
Avg merge
8h 16m
Merged PRs (30d)
1

Description

In a monorepo setup (like with yarn workspaces) it is not possible to install `commitizen` at the root and then use it in the packages. Being in a folder like `packages/package-1` with its own `package.json` an running `yarn cz` will result in the fallback "just commit" mode, even though it it properly configured in the root. This is because `cz` looks for a configuration in the next available `package.json` or `.czrc`. If it finds any of these files it seems to stop with an error and the defaulting to commit instead of going up the ladder to the next higher `package.json` and finding its configuration.

A workaround is to copy-paste the config in all the `package.json`s but there is no reason for this strange behaviour.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.