> For the complete documentation index, see [llms.txt](https://engineering.exile.watch/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://engineering.exile.watch/march-2024/lerna-the-hidden-powerhouse-of-exile.watch/4.-versioning-publishing-and-configuring-lerna.json-for-commit-conventions.md).

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

<figure><img src="/files/6T3mkUF582HmwgPcv48x" alt="" width="256"><figcaption><p>exile.watch logo</p></figcaption></figure>

*This page is part of* [Lerna - the hidden powerhouse of exile.watch](/march-2024/lerna-the-hidden-powerhouse-of-exile.watch.md#the-toolkit-i-needed-to-make-it-all-happen) *list - 4/7*

***

[Lerna](https://lerna.js.org/) simplifies life with its [all-in-one versioning and publishing capabilities](https://lerna.js.org/docs/features/version-and-publish), perfect for streamlining our release process.

***

Initially, our `lerna.json` looked something like this:

```jsonp
// Initial lerna.json setup
{
  "$schema": "node_modules/lerna/schemas/lerna-schema.json",
  "version": "independent",
  "packages": [
    "packages/*"
  ]
}
```

Given that [exile.watch](https://exile.watch/) is [open source](/march-2024/to-open-source-or-to-not-open-source.md), it was crucial to implement certain standards.&#x20;

A key requirement was enforcing commit linting. More on commit message guidelines at exile.watch [here](https://docs.exile.watch/development/commit-message-guidelines).

Moreover, with [GitHub serving as our NPM registry](/march-2024/lerna-the-hidden-powerhouse-of-exile.watch/3.-module-registry-a-place-where-packages-get-to-chill.md), 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:

```jsonp
// 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.*
