exile.watch engineering
  • exile.watch engineering blog
  • April 2024
    • Why doesn't Dependabot update package.json?
  • March 2024
    • The savior amidst the chaos of dependency updates - Dependabot
    • Why project's local setup instructions are not part of README?
    • Leveraging Lefthook to enforce commit guidelines at exile.watch
    • The package manager of exile.watch
    • Lerna - the hidden powerhouse of exile.watch
      • 1. Separate repository and monorepo tool
      • 2. A module bundler - the fun begins
      • 3. Module registry (a place where packages get to chill)
      • 4. Versioning, Publishing, and Configuring lerna.json for Commit Conventions
      • 5. Some automation magic using the (Lerna) CLI
      • 6. How does one test lerna packages at exile.watch: locally and in the real world
    • To open source or to not open source
    • exile.watch architecture
Powered by GitBook
On this page

Was this helpful?

  1. March 2024
  2. Lerna - the hidden powerhouse of exile.watch

4. Versioning, Publishing, and Configuring lerna.json for Commit Conventions

2 min read

Previous3. Module registry (a place where packages get to chill)Next5. Some automation magic using the (Lerna) CLI

Last updated 1 year ago

Was this helpful?

This page is part of list - 4/7


simplifies life with its , perfect for streamlining our release process.


Initially, our lerna.json looked something like this:

// Initial lerna.json setup
{
  "$schema": "node_modules/lerna/schemas/lerna-schema.json",
  "version": "independent",
  "packages": [
    "packages/*"
  ]
}
// Enhanced lerna.json for commit conventions and GitHub NPM registry integration
{
  "$schema": "node_modules/lerna/schemas/lerna-schema.json",
  "version": "independent",
  "command": {
    "version": {
      "conventionalCommits": true,
      "createRelease": "github",
      "message": "chore(release): publish [skip ci]",
      "commitHooks": false
    }
  },
  "packages": [
    "packages/*"
  ]
}

This tailored setup ensures our project adheres to best practices in version management and commit hygiene, all while leveraging GitHub’s infrastructure for package distribution.


Having set up versioning and publishing with Lerna, let’s dive into automating these processes with the Lerna CLI to streamline our workflow.

Given that is , it was crucial to implement certain standards.

A key requirement was enforcing commit linting. More on commit message guidelines at exile.watch .

Moreover, with , it was essential for Lerna to recognize this setup. Thus, I enhanced our lerna.json to adhere to commit conventions and integrate with the GitHub NPM registry, as shown below:

exile.watch
open source
here
GitHub serving as our NPM registry
Lerna
all-in-one versioning and publishing capabilities
The toolkit I needed to make it all happen
exile.watch logo