lerna run --scope ignored if pass paramaters to the underlying script
See original GitHub issueIf i call my npm script (using lerna run) without any args and scoped (using --scope ) then the scope is successfully applied
lerna run --scope @my/package publish
# lerna notice filter including "@my/package"
# lerna info filter [ '@my/package' ]
# lerna info Executing command in 1 package: "yarn run package"
if i call my npm script (using lerna run) with args and scoped (using --scope ) the scope is ignored and runs for all packages with the publish command
lerna run --scope @my/package publish -- -- --stage dev
# lerna info Executing command in 6 packages: "yarn run package --stage dev"
Expected Behavior
Scope should still be applied
Current Behavior
Scope is not applied
Context
Paramaters are provided by my CI depending on environment i want to publish for in this example, so i need to be able to pass arguments to the script, which i can but i also need the scope to still be applied and it is not.
Your Environment
Executable | Version |
---|---|
lerna --version |
3.2.0 |
npm --version |
6.13.4 |
yarn --version |
1.18.0 |
node --version |
12.14.1 |
OS | Version |
---|---|
NAME | VERSION |
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:6
Top Results From Across the Web
@lerna/run - npm
Run an npm script in each package that contains that script. A double-dash ( -- ) is necessary to pass dashed arguments to...
Read more >Untitled
When you run `lerna publish`, if a module has been updated since the last time ... `lerna bootstrap` respects the `--ignore`, `--ignore-scripts`, `--scope` ......
Read more >Project Configuration - Nx
Projects can be configured in package.json (if you use npm scripts and not Nx ... the actual command here is arbitrary "ignored": "exit...
Read more >Managing multiples projects with Lerna and Yarn Workspaces
The second, lerna exec <command> , will execute the command (not script) in all the packages. This is useful if you want to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any update on this?
any thoughts on this greatly appreciated