> 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.*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://engineering.exile.watch/march-2024/lerna-the-hidden-powerhouse-of-exile.watch/4.-versioning-publishing-and-configuring-lerna.json-for-commit-conventions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
