Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --parallel flag to lerna exec #795

Merged
merged 2 commits into from May 1, 2017

Conversation

evocateur
Copy link
Member

@evocateur evocateur commented May 1, 2017

Description

With this flag, lerna exec will run the command in all filtered packages
in parallel, completely ignoring concurrency and topological sorting.

# transpile modules in all packages as changes occur
lerna exec -- babel src -d lib -w

# transpile watched modules only in package-foo
lerna exec --scope package-foo -- babel src -d lib -w

Motivation and Context

I found this useful in a hoisted monorepo to transpile package exports that are themselves linked to private webpack entry points. Disabling the progress bar is necessary in all cases.

It is advised to constrain the scope of the command when running with this
flag, as spawning dozens of subprocesses may be harmful to your shell's
equanimity (or maximum file descriptor limit, for example). YMMV

How Has This Been Tested?

local development in a lerna monorepo, and several integration tests.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

With this flag, `lerna exec` will run the command in _all_ filtered packages
in parallel, completely ignoring concurrency and topological sorting.

```sh
lerna exec -- babel src -d lib -w

lerna exec --scope package-foo -- babel src -d lib -w
```

It is advised to constrain the scope of the command when running with this
flag, as spawning dozens of subprocesses may be harmful to your shell's
equanimity (or maximum file descriptor limit, for example). YMMV
@evocateur evocateur merged commit 5886981 into lerna:master May 1, 2017
@evocateur evocateur deleted the exec-parallel-streaming branch May 1, 2017 01:04
@lock
Copy link

lock bot commented Dec 27, 2018

This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant