@typescript-tools/update-lerna-manifest
    TypeScript icon, indicating that this package has built-in type declarations

    6.0.1 • Public • Published

    update-lerna-manifest

    License NPM Package Build Status semantic-release

    Keep the Lerna manifest up to date

    This tool solves a very specific use-case:

    • when a new lerna package is added or removed from the monorepo, modify the lerna.json manifest to reflect the new monorepo state

    You may get value from this tool if you:

    • cannot write regex-based package whitelists in your lerna.json manifest

    This is sometimes the case when e.g. retrofitting an existing monorepo with Lerna, or using a monorepo containing projects in multiple languages.

    It is recommended to hook this tool automatically into the build process, before running lerna bootstrap.

    Install

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

    Use

    Usage:
        update-lerna-manifest [--root <root>] [--depth <depth>] <dirs>...
    
    Options:
        <dirs>             Directories to recursively search for lerna packages
        --root=<root>      Root of lerna mono-repository
        --depth=<depth>    Maximum directory depth in package search
    

    Example:

    npx update-lerna-manifest packages

    Note that the glob only needs to point to a parent directory containing lerna packages; each glob will be scanned recursively.

    update-lerna-manifest will search for a tsconfig.json file extending a parent's tsconfig.json file, like the following:

    {
      "extends": "../tsconfig.settings.json",
      "include": ["src/**/*", "test/**/test-*"],
      "exclude": ["node_modules", "dist"],
      "compilerOptions": {
        "outDir": "./dist"
      }
    }

    Specifically, it considers a package to be a lerna package if the extends property ends with /tsconfig.settings.json. This may result in false positives with your monorepo, in which case tightening the --package-dir globs would be prudent.

    Install

    npm i @typescript-tools/update-lerna-manifest

    DownloadsWeekly Downloads

    3,494

    Version

    6.0.1

    License

    ISC

    Unpacked Size

    20.8 kB

    Total Files

    10

    Last publish

    Collaborators

    • hamroctopus
    • amchelle