{"id":18548943,"url":"https://github.com/traa/lerna","last_synced_at":"2025-05-15T08:14:45.877Z","repository":{"id":145454943,"uuid":"89677881","full_name":"traa/lerna","owner":"traa","description":null,"archived":false,"fork":false,"pushed_at":"2017-04-28T07:12:03.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-17T09:45:08.369Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/traa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-28T07:04:14.000Z","updated_at":"2017-04-28T07:12:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"f2d3e691-d3b2-48be-9f65-9f147d877c02","html_url":"https://github.com/traa/lerna","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traa%2Flerna","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traa%2Flerna/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traa%2Flerna/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traa%2Flerna/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/traa","download_url":"https://codeload.github.com/traa/lerna/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254301620,"owners_count":22047907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T20:36:13.121Z","updated_at":"2025-05-15T08:14:45.845Z","avatar_url":"https://github.com/traa.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Lerna\" src=\"https://i.imgur.com/yT7Skxn.png\" width=\"480\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  A tool for managing JavaScript projects with multiple packages.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://travis-ci.org/kittens/lerna\"\u003e\u003cimg alt=\"Travis Status\" src=\"https://img.shields.io/travis/kittens/lerna/master.svg?style=flat\u0026label=travis\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## About\n\nWhile developing [Babel](https://github.com/babel/babel) I followed a\n[monorepo](https://github.com/babel/babel/blob/master/doc/design/monorepo.md) approach\nwhere the entire project was split into individual packages but everything lived in the same\nrepo. This was great. It allowed super easy modularisation which meant the core was easier\nto approach and meant others could use the useful parts of Babel in their own projects.\n\nThis tool was abstracted out of that and deals with bootstrapping packages by linking\nthem together as well as publishing them to npm. You can see the\n[Babel repo](https://github.com/babel/babel/tree/master/packages) for an example of a\nlarge Lerna project.\n\n## Usage\n\n```sh\n$ npm install -g lerna\n$ lerna bootstrap\n```\n\nThis will create a dummy `VERSION` file as well as a `packages` folder.\n\n### Bootstrap\n\n```sh\n$ lerna bootstrap\n```\n\n1. Link together all packages that depend on each other.\n2. `npm install` all other dependencies of each package.\n\n### Updated\n\n```sh\n$ lerna updated\n```\n\n1. Check which `packages` have changed since the last release, and log it.\n\n### Publishing\n\n```sh\n$ lerna publish\n```\n\n1. Publish each module in `packages` that has been updated since the last version to npm with the tag `prerelease`.\n2. Once all packages have been published, remove the `prerelease` tags and add the tags `latest` and `stable`.\n\n\u003e If you need to publish prerelease versions, set an env variable. `NPM_DIST_TAG=next lerna publish`.\n\u003e This will add the tag you specify instead of `latest` and `stable`.\n\n## How it works\n\nLerna projects operate on a single version line. The version is kept in the file `VERSION`\nat the root of your project. When you run `lerna publish`, if a module has been updated\nsince the last time a release was made, it will be updated to the new version you're\nreleasing. This means that you only publish a new version of a package when you need to.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftraa%2Flerna","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftraa%2Flerna","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftraa%2Flerna/lists"}