@typescript-tools/configure-lerna-manifest

Configure lerna manifest properties

Usage no npm install needed!

<script type="module">
  import typescriptToolsConfigureLernaManifest from 'https://cdn.skypack.dev/@typescript-tools/configure-lerna-manifest';
</script>

README

configure-lerna-manifest

License NPM Package Build Status semantic-release

Configure Lerna manifest properties

Install

npm install --save-dev @typescript-tools/configure-lerna-manifest

Use

Usage:
    configure-lerna-manifest [--root <root>] --packages [<package>]...

Options:
    packages         Package names or paths to include in the lerna manifest (also reads from stdin)
    --root=<root>    Root of lerna mono-repository

For example:

git diff --name-only "origin/${CI_DEFAULT_BRANCH}" \
  | npx containing-packages \
  | npx packages-to-rebuild-on-changes \
  | npx configure-lerna-manifest --packages

This one-liner

  1. determines the packages that contain diffs when compared against the default git branch,
  2. calculates internal dependencies and internal consumers, and
  3. sets the packages property of lerna.json to this list