{"_id":"@atlaskit/lerna","_rev":"6-f675a266eb9e4629d3625abd731ea8b7","name":"@atlaskit/lerna","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"@atlaskit/lerna","version":"2.0.0","author":{"name":"Sebastian McKenzie","email":"sebmck@gmail.com"},"license":"MIT","_id":"@atlaskit/lerna@2.0.0","maintainers":[{"name":"atlaskit","email":"design-platform@atlassian.com"}],"homepage":"https://lernajs.io/","bugs":{"url":"https://github.com/lerna/lerna/issues"},"bin":{"lerna":"./bin/lerna.js"},"dist":{"shasum":"5b96249c152fc4d130a766713ab121c8043237e9","tarball":"https://registry.npmjs.org/@atlaskit/lerna/-/lerna-2.0.0.tgz","integrity":"sha512-byxVfFd5fvC3kOqoJxz0ga2KBa1P3I+GlZxJxhs9KCzgv+MXCFeT4DRRhHHxVYlpEao1t8j3OkgEIHMPDXG9vA==","signatures":[{"sig":"MEQCIDiqCpV37crL8vYU3Fr4aELZTfydH71P91L2lmj+Skm5AiBw9UlT7eYb/9fPj7sYNbGYd/lH2VyBqMKyTcyfGQsCFg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"jest":{"roots":["<rootDir>/src","<rootDir>/test"],"testMatch":["**/test/*.js"],"setupFiles":["<rootDir>/test/helpers/env.js"],"testEnvironment":"node","collectCoverageFrom":["src/**/*.js"],"modulePathIgnorePatterns":["<rootDir>/test/fixtures"]},"main":"lib/index.js","_from":".","files":["bin","lib"],"_shasum":"5b96249c152fc4d130a766713ab121c8043237e9","engines":{"node":">= 4"},"gitHead":"ac005e2a8dbe7d9deed49799a73a2573cbb81801","scripts":{"ci":"npm test -- --coverage --verbose && npm run integration","dev":"babel -w src -d lib","fix":"npm run lint -- --fix","lint":"eslint . --ignore-path .gitignore","test":"jest","build":"babel src -d lib","pretest":"npm run lint -- --cache","prepublish":"npm run build","integration":"jest --config test/config/integration.json","preintegration":"npm pack"},"_npmUser":{"name":"atlaskit","email":"design-platform@atlassian.com"},"deprecated":"This package is no longer used and has been deprecated.","repository":{"url":"git+https://github.com/lerna/lerna.git","type":"git"},"_npmVersion":"4.2.0","description":"Tool for managing JavaScript projects with multiple packages","directories":{},"_nodeVersion":"7.10.0","dependencies":{"glob":"^7.1.2","async":"^1.5.0","chalk":"^1.1.1","execa":"^0.6.3","is-ci":"^1.0.10","yargs":"^8.0.1","dedent":"^0.7.0","globby":"^6.1.0","lodash":"^4.17.4","npmlog":"^4.1.0","rimraf":"^2.6.1","semver":"^5.1.0","find-up":"^2.1.0","cmd-shim":"^2.0.2","fs-extra":"^3.0.1","get-port":"^3.1.0","inquirer":"^3.0.6","read-pkg":"^2.0.0","columnify":"^1.5.4","minimatch":"^3.0.4","p-finally":"^1.0.0","write-pkg":"^3.0.1","temp-write":"^3.3.0","graceful-fs":"^4.1.11","path-exists":"^3.0.0","safe-buffer":"^5.0.1","signal-exit":"^3.0.2","command-join":"^2.0.0","read-cmd-shim":"^1.0.1","load-json-file":"^2.0.0","write-json-file":"^2.1.0","write-file-atomic":"^2.1.0","strong-log-transformer":"^1.0.6","conventional-changelog-cli":"^1.3.1","conventional-recommended-bump":"^1.0.0"},"devDependencies":{"jest":"^19.0.2","tempy":"^0.1.0","touch":"^3.1.0","eslint":"^3.19.0","file-url":"^2.0.2","babel-cli":"^6.24.1","babel-jest":"^19.0.0","babel-eslint":"^7.2.3","replacestream":"^4.0.2","normalize-path":"^2.1.1","babel-preset-env":"^1.4.0","normalize-newline":"^3.0.0","eslint-plugin-node":"^4.2.2","eslint-config-babel":"^6.0.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-flowtype":"^2.33.0","babel-plugin-add-module-exports":"^0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/lerna-2.0.0.tgz_1501045846148_0.40901003358885646","host":"s3://npm-registry-packages"}}},"time":{"created":"2017-07-26T05:10:46.255Z","modified":"2025-01-29T23:27:21.572Z","2.0.0":"2017-07-26T05:10:46.255Z"},"bugs":{"url":"https://github.com/lerna/lerna/issues"},"author":{"name":"Sebastian McKenzie","email":"sebmck@gmail.com"},"license":"MIT","homepage":"https://lernajs.io/","repository":{"url":"git+https://github.com/lerna/lerna.git","type":"git"},"description":"Tool for managing JavaScript projects with multiple packages","maintainers":[{"email":"eng-development-tooling-secrets-and-artifacts@atlassian.com","name":"atlassianartifactteam"}],"readme":"<p align=\"center\">\n  <img alt=\"Lerna\" src=\"https://cloud.githubusercontent.com/assets/952783/15271604/6da94f96-1a06-11e6-8b04-dc3171f79a90.png\" width=\"480\">\n</p>\n\n<p align=\"center\">\n  A tool for managing JavaScript projects with multiple packages.\n</p>\n\n<p align=\"center\">\n  <b>This is just a quick fork to be able to consume <a href=\"https://github.com/lerna/lerna/pull/940\"> this pr</a> without waiting</b>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/lerna\"><img alt=\"NPM Status\" src=\"https://img.shields.io/npm/v/lerna.svg?style=flat\"></a>\n  <a href=\"https://travis-ci.org/lerna/lerna\"><img alt=\"Travis Status\" src=\"https://img.shields.io/travis/lerna/lerna/master.svg?style=flat&label=travis\"></a>\n  <a href=\"https://ci.appveyor.com/project/lerna/lerna/branch/master\"><img alt=\"Appveyor Status\" src=\"https://img.shields.io/appveyor/ci/lerna/lerna/master.svg\"></a>\n  <a href=\"https://slack.lernajs.io/\"><img alt=\"Slack Status\" src=\"https://slack.lernajs.io/badge.svg\"></a>\n</p>\n\n- [About](#about)\n- [Getting Started](#getting-started)\n- [How It Works](#how-it-works)\n- [Troubleshooting](#troubleshooting)\n- [Commands](#commands)\n- [Misc](#misc)\n- [Lerna.json](#lernajson)\n- [Flags](#flags)\n\n## About\n\nSplitting up large codebases into separate independently versioned packages\nis extremely useful for code sharing. However, making changes across many\nrepositories is *messy* and difficult to track, and testing across repositories\ngets complicated really fast.\n\nTo solve these (and many other) problems, some projects will organize their\ncodebases into multi-package repositories (sometimes called [monorepos](https://github.com/babel/babel/blob/master/doc/design/monorepo.md)). Projects like [Babel](https://github.com/babel/babel/tree/master/packages), [React](https://github.com/facebook/react/tree/master/packages), [Angular](https://github.com/angular/angular/tree/master/modules),\n[Ember](https://github.com/emberjs/ember.js/tree/master/packages), [Meteor](https://github.com/meteor/meteor/tree/devel/packages), [Jest](https://github.com/facebook/jest/tree/master/packages), and many others develop all of their packages within a\nsingle repository.\n\n**Lerna is a tool that optimizes the workflow around managing multi-package\nrepositories with git and npm.**\n\nLerna can also reduce the time and space requirements for numerous\ncopies of packages in development and build environments - normally a\ndownside of dividing a project into many separate NPM package. See the\n[hoist documentation](doc/hoist.md) for details.\n\n### What does a Lerna repo look like?\n\nThere's actually very little to it. You have a file system that looks like this:\n\n```\nmy-lerna-repo/\n  package.json\n  packages/\n    package-1/\n      package.json\n    package-2/\n      package.json\n```\n\n### What can Lerna do?\n\nThe two primary commands in Lerna are `lerna bootstrap` and `lerna publish`.\n\n`bootstrap` will link dependencies in the repo together.\n`publish` will help publish any updated packages.\n\n## Getting Started\n\n> The instructions below are for Lerna 2.x.\n> We recommend using it instead of 1.x for a new Lerna project. Check the [wiki](https://github.com/lerna/lerna/wiki/1.x-Docs) if you need to see the 1.x README.\n\nLet's start by installing Lerna globally with [npm](https://www.npmjs.com/).\n\n```sh\n$ npm install --global lerna\n```\n\nNext we'll create a new [git](https://git-scm.com/) repository:\n\n```sh\n$ git init lerna-repo\n$ cd lerna-repo\n```\n\nAnd now let's turn it into a Lerna repo:\n\n```sh\n$ lerna init\n```\n\nYour repository should now look like this:\n\n```\nlerna-repo/\n  packages/\n  package.json\n  lerna.json\n```\n\nThis will create a `lerna.json` configuration file as well as a `packages` folder.\n\n## How It Works\n\nLerna allows you to manage your project using one of two modes: Fixed or Independent.\n\n### Fixed/Locked mode (default)\n\nFixed mode Lerna projects operate on a single version line. The version is kept in the `lerna.json` file at the root of your project under the `version` key. When you run `lerna publish`, if a module has been updated since the last time a release was made, it will be updated to the new version you're releasing. This means that you only publish a new version of a package when you need to.\n\nThis is the mode that [Babel](https://github.com/babel/babel) is currently using. Use this if you want to automatically tie all package versions together. One issue with this approach is that a major change in any package will result in all packages having a new major version.\n\n### Independent mode (`--independent`)\n\nIndependent mode Lerna projects allows maintainers to increment package versions independently of each other. Each time you publish, you will get a prompt for each package that has changed to specify if it's a patch, minor, major or custom change.\n\nIndependent mode allows you to more specifically update versions for each package and makes sense for a group of components. Combining this mode with something like [semantic-release](https://github.com/semantic-release/semantic-release) would make it less painful. (There is work on this already at [atlassian/lerna-semantic-release](https://github.com/atlassian/lerna-semantic-release)).\n\n> The `version` key in `lerna.json` is ignored in independent mode.\n\n## Troubleshooting\n\nIf you encounter any issues while using Lerna please check out our [Troubleshooting](doc/troubleshooting.md)\ndocument where you might find the answer to your problem.\n\n## Frequently asked questions\n\nSee [FAQ.md](FAQ.md).\n\n## Commands\n\n### init\n\n```sh\n$ lerna init\n```\n\nCreate a new Lerna repo or upgrade an existing repo to the current version of Lerna.\n\n> Lerna assumes the repo has already been initialized with `git init`.\n\nWhen run, this command will:\n\n1. Add `lerna` as a [`devDependency`](https://docs.npmjs.com/files/package.json#devdependencies) in `package.json` if it doesn't already exist.\n2. Create a `lerna.json` config file to store the `version` number.\n\nExample output on a new git repo:\n\n```sh\n$ lerna init\nlerna info version v2.0.0\nlerna info Updating package.json\nlerna info Creating lerna.json\nlerna success Initialized Lerna files\n```\n\n#### --independent, -i\n\n```sh\n$ lerna init --independent\n```\n\nThis flag tells Lerna to use independent versioning mode.\n\n#### --exact\n\n```sh\n$ lerna init --exact\n```\n\nBy default, `lerna init` will use a caret range when adding or updating\nthe local version of `lerna`, just like `npm install --save-dev lerna`.\n\nTo retain the `lerna` 1.x behavior of \"exact\" comparison, pass this flag.\nIt will configure `lerna.json` to enforce exact match for all subsequent executions.\n\n```json\n{\n  \"lerna\": \"2.0.0\",\n  \"command\": {\n    \"init\": {\n      \"exact\": true\n    }\n  },\n  \"version\": \"0.0.0\"\n}\n```\n\n### bootstrap\n\n```sh\n$ lerna bootstrap\n```\n\nBootstrap the packages in the current Lerna repo.\nInstalls all of their dependencies and links any cross-dependencies.\n\nWhen run, this command will:\n\n1. `npm install` all external dependencies of each package.\n2. Symlink together all Lerna `packages` that are dependencies of each other.\n3. `npm prepublish` all bootstrapped packages.\n\n`lerna bootstrap` respects the `--ignore`, `--scope` and `--include-filtered-dependencies` flags (see [Flags](#flags)).\n\nPass extra arguments to npm client by placing them after `--`:\n\n```sh\n$ lerna bootstrap -- --production --no-optional\n```\n\nMay also be configured in `lerna.json`:\n\n```js\n{\n  ...\n  \"npmClient\": \"yarn\",\n  \"npmClientArgs\": [\"--production\", \"--no-optional\"]\n}\n```\n\n#### How `bootstrap` works\n\nLet's use `babel` as an example.\n\n- `babel-generator` and `source-map` (among others) are dependencies of `babel-core`.\n-  `babel-core`'s [`package.json`](https://github.com/babel/babel/blob/13c961d29d76ccd38b1fc61333a874072e9a8d6a/packages/babel-core/package.json#L28-L47) lists both these packages as keys in `dependencies`, as shown below.\n\n```js\n// babel-core package.json\n{\n  \"name\": \"babel-core\",\n  ...\n  \"dependencies\": {\n    ...\n    \"babel-generator\": \"^6.9.0\",\n    ...\n    \"source-map\": \"^0.5.0\"\n  }\n}\n```\n\n- Lerna checks if each dependency is also part of the Lerna repo.\n  - In this example, `babel-generator` can be an internal dependency, while `source-map` is always an external dependency.\n  - The version of `babel-generator` in the `package.json` of `babel-core` is satisfied by `packages/babel-generator`, passing for an internal dependency.\n  - `source-map` is `npm install`ed (or `yarn`ed) like normal.\n- `packages/babel-core/node_modules/babel-generator` symlinks to `packages/babel-generator`\n- This allows nested directory imports\n\n**Notes:**\n- When a dependency version in a package is not satisfied by a package of the same name in the repo, it will be `npm install`ed (or `yarn`ed) like normal.\n- Dist-tags, like `latest`, do not satisfy [semver](https://semver.npmjs.com/) ranges.\n- Circular dependencies result in circular symlinks which *may* impact your editor/IDE.\n\n[Webstorm](https://www.jetbrains.com/webstorm/) locks up when circular symlinks are present. To prevent this, add `node_modules` to the list of ignored files and folders in `Preferences | Editor | File Types | Ignored files and folders`.\n\n### publish\n\n```sh\n$ lerna publish\n```\n\nPublish packages in the current Lerna project. When run, this command does the following:\n\nCreates a new release of the packages that have been updated.\nPrompts for a new version.\nCreates a new git commit/tag in the process of publishing to npm.\n\nMore specifically, this command will:\n\n1. Run the equivalent of `lerna updated` to determine which packages need to be published.\n2. If necessary, increment the `version` key in `lerna.json`.\n3. Update the `package.json` of all updated packages to their new versions.\n4. Update all dependencies of the updated packages with the new versions, specified with a [caret (^)](https://docs.npmjs.com/files/package.json#dependencies).\n5. Create a new git commit and tag for the new version.\n6. Publish updated packages to npm.\n\n> Lerna won't publish packages which are marked as private (`\"private\": true` in the `package.json`).\n\n#### --exact\n\n```sh\n$ lerna publish --exact\n```\n\nWhen run with this flag, `publish` will specify updated dependencies in updated packages exactly (with no punctuation), instead of as semver compatible (with a `^`).\n\nFor more information, see the package.json [dependencies](https://docs.npmjs.com/files/package.json#dependencies) documentation.\n\n#### --npm-tag [tagname]\n\n```sh\n$ lerna publish --npm-tag=next\n```\n\nWhen run with this flag, `publish` will publish to npm with the given npm [dist-tag](https://docs.npmjs.com/cli/dist-tag) (defaults to `latest`).\n\nThis option can be used to publish a [`prerelease`](http://carrot.is/coding/npm_prerelease) or `beta` version.\n\n> Note: the `latest` tag is the one that is used when a user runs `npm install my-package`.\n> To install a different tag, a user can run `npm install my-package@prerelease`.\n\n#### --canary, -c\n\n```sh\n$ lerna publish --canary\n$ lerna publish --canary=beta\n```\n\nWhen run with this flag, `publish` publishes packages in a more granular way (per commit). Before publishing to npm, it creates the new `version` tag by taking the current `version`, bumping it to the next *minor* version, adding the provided meta suffix (defaults to `alpha`) and appending the current git sha (ex: `1.0.0` becomes `1.1.0-alpha.81e3b443`).\n\n> The intended use case for this flag is a per commit level release or nightly release.\n\n#### --conventional-commits\n\n```sh\n$ lerna publish --conventional-commits\n```\n\nWhen run with this flag, `publish` will use the [Conventional Commits Specification](https://conventionalcommits.org/) to [determine the version bump](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-recommended-bump) and [generate CHANGELOG](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-cli)\n\n#### --git-remote [remote]\n\n```sh\n$ lerna publish --git-remote upstream\n```\n\nWhen run with this flag, `publish` will push the git changes to the specified remote instead of `origin`.\n\n#### --skip-git\n\n```sh\n$ lerna publish --skip-git\n```\n\nWhen run with this flag, `publish` will publish to npm without running any of the git commands.\n\n> Only publish to npm; skip committing, tagging, and pushing git changes (this only affects publish).\n\n#### --skip-npm\n\n```sh\n$ lerna publish --skip-npm\n```\n\nWhen run with this flag, `publish` will update all `package.json` package\nversions and dependency versions, but it will not actually publish the\npackages to npm.\n\n> This was useful as a workaround for an [npm\nissue](https://github.com/npm/registry/issues/42) which has since been fixed.  When publishing with\nREADME changes, use `--skip-npm` and do the final `npm publish` by hand for\neach package.\n\nThis flag can be combined with `--skip-git` to _just_ update versions and\ndependencies, without committing, tagging, pushing or publishing.\n\n> Only update versions and dependencies; don't actually publish (this only affects publish).\n\n#### --force-publish [packages]\n\n```sh\n$ lerna publish --force-publish=package-2,package-4\n# force publish all packages\n$ lerna publish --force-publish=*\n```\n\nWhen run with this flag, `publish` will force publish the specified packages (comma-separated) or all packages using `*`.\n\n> This will skip the `lerna updated` check for changed packages and forces a package that didn't have a `git diff` change to be updated.\n\n#### --yes\n\n```sh\n$ lerna publish --canary --yes\n# skips `Are you sure you want to publish the above changes?`\n```\n\nWhen run with this flag, `publish` will skip all confirmation prompts.\nUseful in [Continuous integration (CI)](https://en.wikipedia.org/wiki/Continuous_integration) to automatically answer the publish confirmation prompt.\n\n#### --cd-version\n\n```sh\n$ lerna publish --cd-version (patch | major | minor)\n# uses the next semantic version(s) value and this skips `Select a new version for...` prompt\n```\n\nWhen run with this flag, `publish` will skip the version selection prompt (in independent mode) and use the next specified semantic version.\nYou must still use the `--yes` flag to avoid all prompts. This is useful when build systems need\nto publish without command prompts. Works in both normal and independent modes.\n\n#### --repo-version\n\n```sh\n$ lerna publish --repo-version 1.0.1\n# applies version and skips `Select a new version for...` prompt\n```\n\nWhen run with this flag, `publish` will skip the version selection prompt and use the specified version.\nUseful for bypassing the user input prompt if you already know which version to publish.\n\n#### --message, -m [msg]\n\n```sh\n$ lerna publish -m \"chore: Publish %s\"\n# commit message = \"chore: Publish v1.0.0\"\n\n$ lerna publish -m \"chore: Publish\" --independent\n# commit message = \"chore: Publish\n#\n# - package-1@3.0.1\n# - package-2@1.5.4\"\n```\n\nWhen run with this flag, `publish` will use the provided message when committing the version updates\nfor publication. Useful for integrating lerna into projects that expect commit messages to adhere\nto certain guidelines, such as projects which use [commitizen](https://github.com/commitizen/cz-cli) and/or [semantic-release](https://github.com/semantic-release/semantic-release).\n\nIf the message contains `%s`, it will be replaced with the new global version version number prefixed with a \"v\".\nNote that this only applies when using the default \"fixed\" versioning mode, as there is no \"global\" version when using `--independent`.\n\n### updated\n\n```sh\n$ lerna updated\n```\n\nCheck which `packages` have changed since the last release (the last git tag).\n\nLerna determines the last git tag created and runs `git diff --name-only v6.8.1` to get all files changed since that tag. It then returns an array of packages that have an updated file.\n\n\n**Note that configuration for the `publish` command _also_ affects the\n`updated` command.  For example `config.publish.ignore`**\n\n#### --json\n\n```sh\n$ lerna updated --json\n```\n\nWhen run with this flag, `updated` will return an array of objects in the following format:\n\n```json\n[\n  {\n    \"name\": \"package\",\n    \"version\": \"1.0.0\",\n    \"private\": false\n  }\n]\n```\n\n### clean\n\n```sh\n$ lerna clean\n```\n\nRemove the `node_modules` directory from all packages.\n\n`lerna clean` respects the `--ignore`, `--scope`, and `--yes` flags (see [Flags](#flags)).\n\n### diff\n\n```sh\n$ lerna diff [package?]\n\n$ lerna diff\n# diff a specific package\n$ lerna diff package-name\n```\n\nDiff all packages or a single package since the last release.\n\n> Similar to `lerna updated`. This command runs `git diff`.\n\n### ls\n\n```sh\n$ lerna ls\n```\n\nList all of the public packages in the current Lerna repo.\n\n`lerna ls` respects the `--ignore` and `--scope` flags (see [Flags](#flags)).\n\n#### --json\n\n```sh\n$ lerna ls --json\n```\n\nWhen run with this flag, `ls` will return an array of objects in the following format:\n\n```json\n[\n  {\n    \"name\": \"package\",\n    \"version\": \"1.0.0\",\n    \"private\": false\n  }\n]\n```\n\n### run\n\n```sh\n$ lerna run <script> -- [..args] # runs npm run my-script in all packages that have it\n$ lerna run test\n$ lerna run build\n\n# watch all packages and transpile on change, streaming prefixed output\n$ lerna run --parallel watch\n```\n\nRun an [npm script](https://docs.npmjs.com/misc/scripts) in each package that contains that script. A double-dash (`--`) is necessary to pass dashed arguments to the script execution.\n\n`lerna run` respects the `--concurrency`, `--scope`, `--ignore`, `--stream`, and `--parallel` flags (see [Flags](#flags)).\n\n```sh\n$ lerna run --scope my-component test\n```\n\n> Note: It is advised to constrain the scope of this command (and `lerna exec`,\n> below) when using the `--parallel` flag, as spawning dozens of subprocesses\n> may be harmful to your shell's equanimity (or maximum file descriptor limit,\n> for example). YMMV\n\n### exec\n\n```sh\n$ lerna exec -- <command> [..args] # runs the command in all packages\n$ lerna exec -- rm -rf ./node_modules\n$ lerna exec -- protractor conf.js\n```\n\nRun an arbitrary command in each package.\nA double-dash (`--`) is necessary to pass dashed flags to the spawned command, but is not necessary when all the arguments are positional.\n\n`lerna exec` respects the `--concurrency`, `--scope`, `--ignore`, and `--parallel` flags (see [Flags](#flags)).\n\n```sh\n$ lerna exec --scope my-component -- ls -la\n```\n\nTo spawn long-running processes, pass the `--parallel` flag:\n```sh\n# transpile all modules as they change in every package\n$ lerna exec --parallel -- babel src -d lib -w\n```\n\nYou may also get the name of the current package through the environment variable `LERNA_PACKAGE_NAME`:\n\n```sh\n$ lerna exec -- npm view \\$LERNA_PACKAGE_NAME\n```\n\nYou may also run a script located in the root dir, in a complicated dir structure through the environment variable `LERNA_ROOT_PATH`:\n\n```sh\n$ lerna exec -- node \\$LERNA_ROOT_PATH/scripts/some-script.js\n```\n\n> Hint: The commands are spawned in parallel, using the concurrency given (except with `--parallel`).\n> The output is piped through, so not deterministic.\n> If you want to run the command in one package after another, use it like this:\n\n```sh\n$ lerna exec --concurrency 1 -- ls -la\n```\n\n#### --bail\n\n```sh\n$ lerna exec --bail=<boolean> <command>\n```\n\nThis flag signifies whether or not the `exec` command should halt execution upon encountering an error thrown by one of the spawned subprocesses. Its default value is `true`.\n\n### import\n\n```sh\n$ lerna import <path-to-external-repository>\n```\n\nImport the package at `<path-to-external-repository>`, with commit history,\ninto `packages/<directory-name>`.  Original commit authors, dates and messages\nare preserved.  Commits are applied to the current branch.\n\nThis is useful for gathering pre-existing standalone packages into a Lerna\nrepo.  Each commit is modified to make changes relative to the package\ndirectory.  So, for example, the commit that added `package.json` will\ninstead add `packages/<directory-name>/package.json`.\n\n## Misc\n\nLerna will log to a `lerna-debug.log` file (same as `npm-debug.log`) when it encounters an error running a command.\n\nLerna also has support for [scoped packages](https://docs.npmjs.com/misc/scope).\n\nRunning `lerna` without arguments will show all commands/options.\n\n### lerna.json\n\n```js\n{\n  \"lerna\": \"2.0.0\",\n  \"version\": \"1.1.3\",\n  \"commands\": {\n    \"publish\": {\n      \"ignore\": [\n        \"ignored-file\",\n        \"*.md\"\n      ]\n    },\n    \"bootstrap\": {\n      \"ignore\": \"component-*\"\n    }\n  },\n  \"packages\": [\"packages/*\"]\n}\n```\n\n- `lerna`: the current version of Lerna being used.\n- `version`: the current version of the repository.\n- `commands.publish.ignore`: an array of globs that won't be included in `lerna updated/publish`. Use this to prevent publishing a new version unnecessarily for changes, such as fixing a `README.md` typo.\n- `commands.bootstrap.ignore`: an array of globs that won't be bootstrapped when running the `lerna bootstrap` command.\n- `commands.bootstrap.scope`: an array of globs that restricts which packages will be bootstrapped when running the `lerna bootstrap` command.\n- `packages`: Array of globs to use as package locations.\n\n\n### Common `devDependencies`\n\nMost `devDependencies` can be pulled up to the root of a Lerna repo.\n\nThis has a few benefits:\n\n- All packages use the same version of a given dependency\n- Can keep dependencies at the root up-to-date with an automated tool such as [GreenKeeper](https://greenkeeper.io/)\n- Dependency installation time is reduced\n- Less storage is needed\n\nNote that `devDependencies` providing \"binary\" executables that are used by\nnpm scripts still need to be installed directly in each package where they're\nused.\n\nFor example the `nsp` dependency is necessary in this case for `lerna run nsp`\n(and `npm run nsp` within the package's directory) to work correctly:\n\n```json\n\n{\n  \"scripts\": {\n    \"nsp\": \"nsp\"\n  },\n  \"devDependencies\": {\n    \"nsp\": \"^2.3.3\"\n  }\n}\n```\n\n### Flags\n\nOptions to Lerna can come from configuration (`lerna.json`) or on the command\nline.  Additionally options in config can live at the top level or may be\napplied to specific commands.\n\nExample:\n\n```json\n{\n  \"lerna\": \"x.x.x\",\n  \"version\": \"1.2.0\",\n  \"exampleOption\": \"foo\",\n  \"command\": {\n    \"init\": {\n      \"exampleOption\": \"bar\",\n    }\n  },\n}\n```\n\nIn this case `exampleOption` will be \"foo\" for all commands except `init`,\nwhere it will be \"bar\".  In all cases it may be overridden to \"baz\" on the\ncommand-line with `--example-option=baz`.\n\n#### --concurrency\n\nHow many threads to use when Lerna parallelizes the tasks (defaults to `4`)\n\n```sh\n$ lerna publish --concurrency 1\n```\n\n#### --scope [glob]\n\nScopes a command to a subset of packages.\n\n```sh\n$ lerna exec --scope my-component -- ls -la\n```\n\n```sh\n$ lerna run --scope toolbar-* test\n```\n\n#### --since [ref]\n\nWhen executing a script or command, scope the operation to packages that have been updated since the specified `ref`. If `ref` is not specified, it defaults to the latest tag.\n\nList the contents of packages that have changed since the latest tag:\n\n```sh\n$ lerna exec --since -- ls -la\n```\n\nRun the tests for all packages that have changed since `master`:\n\n```\n$ lerna run test --since master\n```\n\nList all packages that have changed since `some-branch`:\n\n```\n$ lerna ls --since some-branch\n```\n\n*This can be particularly useful when used in CI, if you can obtain the target branch a PR will be going into, because you can use that as the `ref` to the `--since` option. This works well for PRs going into master as well as feature branches.*\n\n#### --ignore [glob]\n\nExcludes a subset of packages when running a command.\n\n```sh\n$ lerna bootstrap --ignore component-*\n```\n\nThe `ignore` flag, when used with the `bootstrap` command, can also be set in `lerna.json` under the `commands.bootstrap` key. The command-line flag will take precendence over this option.\n\n**Example**\n\n```javascript\n{\n  \"lerna\": \"2.0.0\",\n  \"version\": \"0.0.0\",\n  \"commands\": {\n    \"bootstrap\": {\n      \"ignore\": \"component-*\"\n    }\n  }\n}\n```\n\n> Hint: The glob is matched against the package name defined in `package.json`,\n> not the directory name the package lives in.\n\n#### --include-filtered-dependencies\n\nUsed in combination with any command that accepts `--scope` (`bootstrap`, `clean`, `ls`, `run`, `exec`). Ensures that all dependencies (and dev dependencies) of any scoped packages (either through `--scope` or `--ignore`) are operated on as well.\n\n> Note: This will override the `--scope` and `--ignore` flags.\n> > i.e. A package matched by the `--ignore` flag will still be bootstrapped if it is depended on by another package that is being bootstrapped.\n\nThis is useful for situations where you want to \"set up\" a single package that relies on other packages being set up.\n\n```sh\n$ lerna bootstrap --scope my-component --include-filtered-dependencies\n# my-component and all of its dependencies will be bootstrapped\n```\n\n```sh\n$ lerna bootstrap --scope \"package-*\" --ignore \"package-util-*\" --include-filtered-dependencies\n# all package-util's will be ignored unless they are depended upon by a\n# package matched by \"package-*\"\n```\n\n#### --loglevel [silent|error|warn|success|info|verbose|silly]\n\nWhat level of logs to report.  On failure, all logs are written to lerna-debug.log in the current working directory.\n\nAny logs of a higher level than the setting are shown.  The default is \"info\".\n\n#### --max-buffer [in-bytes]\n\nSet a max buffer length for each underlying process call. Useful for example\nwhen someone wants to import a repo with a larger amount of commits while\nrunning `lerna import`. In that case the built-in buffer length might not\nbe sufficient.\n\n#### --no-sort\n\nBy default, all tasks execute on packages in topologically sorted order as to respect the dependency relationships of the packages in question. Cycles are broken on a best-effort basis in a way not guaranteed to be consistent across Lerna invocations.\n\nTopological sorting can cause concurrency bottlenecks if there are a small number of packages with many dependents or if some packages take a disproportionately long time to execute. The `--no-sort` option disables sorting, instead executing tasks in an arbitrary order with maximum concurrency.\n\nThis option can also help if you run multiple \"watch\" commands. Since `lerna run` will execute commands in topologically sorted order, it can end up waiting for a command before moving on. This will block execution when you run \"watch\" commands, since they typically never end. An example of a \"watch\" command is [running `babel` with the `--watch` CLI flag](https://babeljs.io/docs/usage/cli/#babel-compile-files).\n\n#### --hoist [glob]\n\nInstall external dependencies matching `glob` at the repo root so they're\navailable to all packages.  Any binaries from these dependencies will be\nlinked into dependent package `node_modules/.bin/` directories so they're\navailable for npm scripts.  If the option is present but no `glob` is given\nthe default is `**` (hoist everything).  This option only affects the\n`bootstrap` command.\n\n```sh\n$ lerna bootstrap --hoist\n```\n\nFor background on `--hoist`, see the [hoist documentation](doc/hoist.md).\n\nNote: If packages depend on different _versions_ of an external dependency,\nthe most commonly used version will be hoisted, and a warning will be emitted.\n\n#### --nohoist [glob]\n\nDo _not_ install external dependencies matching `glob` at the repo root.  This\ncan be used to opt out of hoisting for certain dependencies.\n\n```sh\n$ lerna bootstrap --hoist --nohoist=babel-*\n```\n\n#### --npm-client [client]\n\nInstall external dependencies using `[client] install`.  Must be an executable\nthat knows how to install npm dependencies.\n\n```sh\n$ lerna bootstrap --npm-client=yarn\n```\n\nMay also be configured in `lerna.json`:\n\n```js\n{\n  ...\n  \"npmClient\": \"yarn\"\n}\n```\n\n#### --use-workspaces\n\nEnables integration with [Yarn Workspaces](https://github.com/yarnpkg/rfcs/blob/master/implemented/0000-workspaces-install-phase-1.md) (available since yarn@0.27+).\nThe values in the array are the commands in which Lerna will delegate operation to Yarn (currently only bootstrapping).\nIf `--use-workspaces` is true then `packages` will be overridden by the value from `package.json/workspaces.`\nMay also be configured in `lerna.json`:\n\n```js\n{\n  ...\n  \"npmClient\": \"yarn\",\n  \"useWorkspaces\": true\n}\n```\n\n\n#### --stream\n\nStream output from child processes immediately, prefixed with the originating\npackage name. This allows output from different packages to be interleaved.\n\n```sh\n$ lerna run watch --stream\n```\n\n#### --parallel\n\nSimilar to `--stream`, but completely disregards concurrency and topological sorting, running a given command or script immediately in all matching packages with prefixed streaming output. This is the preferred flag for long-running processes such as `babel src -d lib -w` run over many packages.\n\n```sh\n$ lerna exec --parallel -- babel src -d lib -w\n```\n\n#### --registry [registry]\n\nWhen run with this flag, forwarded npm commands will use the specified registry for your package(s).\n\nThis is useful if you do not want to explicitly set up your registry\nconfiguration in all of your package.json files individually when e.g. using\nprivate registries.\n\n#### --temp-tag\n\nWhen passed, this flag will alter the default publish process by first publishing\nall changed packages to a temporary dist-tag (`lerna-temp`) and then moving the\nnew version(s) to the default [dist-tag](https://docs.npmjs.com/cli/dist-tag) (`latest`).\n\nThis is not generally necessary, as Lerna will publish packages in topological\norder (all dependencies before dependents) by default.\n\n### Wizard\n\nIf you prefer some guidance for cli (in case you're about to start using lerna or introducing it to a new team), you might like [lerna-wizard](https://github.com/szarouski/lerna-wizard). It will lead you through a series of well-defined steps:\n\n![lerna-wizard demo image](https://raw.githubusercontent.com/szarouski/lerna-wizard/2e269fb5a3af7100397a1f874cea3fa78089486e/demo.png)\n","readmeFilename":"README.md"}