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

fix(run): only use run-one when not passing multiple scripts #3620

Merged
merged 2 commits into from Mar 27, 2023

Conversation

fahslaj
Copy link
Contributor

@fahslaj fahslaj commented Mar 25, 2023

Description

Update the run command to use runMany when a single package matches the filter, but multiple targets are provided.

Motivation and Context

Nx's runOne function cannot accept multiple targets. Because of this, Lerna currently errors in the following case:

$ lerna run --scope="my-specific-package" script1,script2

This fix makes this case use runMany instead, which can accept multiple targets.

How Has This Been Tested?

This has been tested manually and an e2e test has been added to cover this case. All existing tests pass.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (change that has absolutely no effect on users)

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.

@fahslaj fahslaj marked this pull request as ready for review March 25, 2023 19:57
@fahslaj fahslaj requested a review from JamesHenry March 25, 2023 19:57
@JamesHenry JamesHenry merged commit 9db1572 into lerna:main Mar 27, 2023
13 checks passed
@fahslaj fahslaj deleted the fix/nx-run-one-multi-script branch March 27, 2023 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants