Closed dstoyanoff closed 2 years ago
Could you please provide a repo please?
Are test
and build
package.json
scripts or using the nx:run-commands
executor?
We have logic in place that will not propogate arguments to different executors for this exact reason. However, I could see an issue when you're using the same executor (nx:run-commands
) but for 2 different reasons. :eyes:
But please provide a repro for us so we can reproduce this easily. :pray:
Hello, Unfortunately the repo is private and will be quite time consuming to replicate. In this case, it's a yarn workspace with separate package.json's per project, so in this case, I am targeting existing npm scripts.
Im the example above, nx run hooks:build --coverage
would call the build target on the hooks project, passing --coverage
additionally. This would in-fact trigger a build on self and hooks's dependent projects, passing --coverage
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏
Not stale.
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Current Behavior
I have a repo with yarn workspaces and nx. When executing test for a certain project, I need to build all its dependent projects. For that, I have configured the following in my
nx.json
:Then I run
nx test ui -u
to execute jest with updating snapshots. When this happens, nx forwards the-u
argument to my build command, which fails because that's not a recognized parameter.Expected Behavior
The build should not receive the arguments or at least there should be a way to specify which arguments to get forwarded (perhaps in the dependency definition).
Steps to Reproduce
Failure Logs
hooks project is a dependency of ui, so this is what gets executed eventually
Environment