Skip to content

Conversation

@igneel64
Copy link
Contributor

Lerna repository management

This PR introduces a way to manage changes, deployments and tasks across the repository packages.

Main setup includes:

  1. Lerna
  2. NPM workspaces link
  3. Commitlint setup for conventional commits. (enforced with Husky precommit hook)
  4. Automatic changelog generation for each package.
  5. Automatic version bump based on conventional commits methodology using npm run bump.

The smarts - conventional-commits

Conventional commits format, which might seem 'detail' for some, is what allows all the smart versioning, changelog generation and more.
E.g. for the automatic versioning to understand a breaking change, the commit introducing the breaking change should have a format like:
feat(clerk-sdk-node)!: Supposedly breaking

^^ Notice the exclamation mark. In the conventional-commits format, this means breaking change.

or a fix type commit signals a patch version change.

How to check it out for yourself

  1. Pull the branch
  2. npm install
  3. Runnpm run bump and accept the defaults (This is because we have not generated any changelog yet.)
  4. Try making changes in the packages, commit stuff with the conventional-commits and then run npm run bump .

What you expect to see:

  1. Only the packages affected by the latest commits (after the previous bump) are detected to be bumped.
  2. The bump is recognised automatically based on the conventional commits methodology.
  3. Changelog entries are added for each package and the type of change is described. (Again depending on the conventional commits methodology)

Next steps - decisions

  1. Centralised changelog or per package.
  2. Harness the power of conventional commits. E.g. add issue link etc.
  3. Add turborepo for task performance optimisation.

@SokratisVidros
Copy link
Contributor

Let's do a separate changelog for now. Can we do that with the current tooling?

@igneel64
Copy link
Contributor Author

@SokratisVidros Yes this is the default!

@igneel64 igneel64 merged commit badd656 into main Jan 14, 2022
@SokratisVidros SokratisVidros deleted the lerna branch February 3, 2022 12:53
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants