@rnx-kit/yarn-plugin-install-to
v0.2.1
Published
EXPERIMENTAL - USE WITH CAUTION - yarn-plugin-install-to
Downloads
8
Keywords
Readme
@rnx-kit/yarn-plugin-install-to
🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧
THIS TOOL IS EXPERIMENTAL — USE WITH CAUTION
🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧
A plugin for yarn v4, that adds an install-to command that executes a partial
install based on the dependencies of one or more packages inside the monorepo.
Details
This replicates the core installation code in yarn's Project.install function.
- It forces the immutable flag internally which will error if there are any lockfile changes
- This will also install dependencies of the root package given that this is typically required for executing root level build scripts.
Internally this works by paring down the set of resolved packages to just ones
required to install, this is what drives the set of fetchers. Then the set of
accessibleLocators are pared down which drives the link/install behavior.
Installation
The plugin needs to be installed via yarn plugin install command. This needs
to reference the produced bundle out of the dist folder.
yarn plugin import ./path/to/my/yarn-plugin-install-to.cjsUsage
Once installed the install-to command will appear in yarn --help.
yarn install-to @my-scope/package1 @my-scope/package2
Optionally if --verbose is specified additional information about the packages
installed and what percent of the repository is being installed will be output.
yarn install-to --verbose @my-scope/package1
