New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

workspaces-run-script

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

workspaces-run-script

Run a script on the packages in a mono-repo.

0.0.8
latest
Source
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

workspaces-run-script

Use this utility in a mono-repo. Install this utility in your mono-repo using the command yarn add -D workspaces-run-script.

The command workspaces-run-script --script test --package my-app --parallel will run the yarn run test command in the projects my-app and any other project that are dependencies of my-app in the mono-repo.

The command above is similar to yarn workspaces foreach -ptR --from '{my-app}' run test except it will not fail if one of the workspace projects does not have a test script.

If you are using NX, the command abose is also similar to npx nx test my-app except that you do not need to create a nx.json file to indicate that the test script should be executed on all dependencies of the my-app project.

Usage: workspaces-run-script [options]

Options:
    -s, --script <script>    name of the script to be executed on each package
    -p, --package <package>  name of the package on which to execute the script
    --parallel               executes the command on all dependencies in parallel
    --sequential             executes the command on all dependencies sequentially
    -m, --max <max>          maximum number of parallel processes
    -h, --help               display help for command

FAQs

Package last updated on 24 Dec 2022

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