Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@typescript-tools/packages-to-rebuild-on-changes-cli

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@typescript-tools/packages-to-rebuild-on-changes-cli

CLI for packages-to-rebuild-on-changes

  • 2.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9.6K
increased by24.5%
Maintainers
2
Weekly downloads
 
Created
Source

packages-to-rebuild-on-changes-cli

License NPM Package

Enumerate packages reachable from graph traversal given starting packages

Install

npm install --save-dev @typescript-tools/packages-to-rebuild-on-changes-cli

Use

Usage:
    packages-to-rebuild-on-changes [--root <root>] [--path] [<package>]...

Options:
    packages         Package names or paths to rebuild when listed packages change (also reads from stdin)
    --root=<root>    Root of lerna mono-repository
    --path           Print the relative path to each package from root

This packages offers a CLI to invoke packages-to-rebuild-on-changes, and calculates which packages in a monorepo need to be built and tested given a changed set of packages.

The changed set of packages can be specified as arguments or from stdin, as paths or by (scoped) package name.

The set of packages to rebuild is calculated as follows:

given set_of_changed_packages,
let downstream = internal_dependers(set_of_changed_packages)
let dependencies = internal_dependencies(downstream)
let packags_to_rebuild = set_of_changed_packages ∪ downstream ∪ dependencies

where is the union of two sets.

The set of downstream packages (internal dependers) is included to ensure no changed packages has violated a contract that another package is reliant upon.

The set of dependencies is required in order to build.

Note that the dependencies set need only be rebuilt and not re-tested.

Example

Consider a monorepo with the following packages

A ---B --- C
 \
  -- D

Invoking packages-to-rebuild-on-changes with the following inputs would yield this output

inputoutput
AA B C D
BA B C
DA D

Keywords

FAQs

Package last updated on 31 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc