You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are working with a pretty big NX monorepo with multiple apps and libraries, pretty much all of them with Jest unit-tests. We also have some separate Typescript-packages which we publish regularly as NPM-packages on Github, which are then installed and integrated in our apps/libraries in the monorepo.
The monorepo has a single package.json file at the root where these packages are installed.
We are using GitHub Actions with NX affected to run tests on push / pull-request. The problem now is that if we update one of the published packages in the monorepo, NX marks all of the apps and libs as affected for the test-target, even if the tests aren't affected at all.
The test-target is configured the following:
In nx.json we have the following code for test:
If I then check which projects are affected using npx nx show projects --withTarget test --affected --head HEAD --base HEAD~1 --verbose, all projects are listed.
As described in the documentation (and as you can see above), I already tried to use projectsAffectedByDependencyUpdates to disable or at least improve the detection of affected projects, this however did nothing in the end.
Is there anything I'm missing here? Does the Jest-plugin even support this flag to disable dependency-updates? I could only find references to that in the @nx/js plugin.
Expected Behavior
Updates in dependencies are ignored when executing NX affected for tests with Jest.
GitHub Repo
No response
Steps to Reproduce
Create a repo with multiple apps / libs
Add target test with @nx/jest to all of them.
Change the version of any dependency
Run npx nx show projects --withTarget test --affected --head HEAD --base HEAD~1 --verbose and check the affected targets.
Current Behavior
We are working with a pretty big NX monorepo with multiple apps and libraries, pretty much all of them with Jest unit-tests. We also have some separate Typescript-packages which we publish regularly as NPM-packages on Github, which are then installed and integrated in our apps/libraries in the monorepo.
The monorepo has a single package.json file at the root where these packages are installed.
We are using GitHub Actions with NX affected to run tests on push / pull-request. The problem now is that if we update one of the published packages in the monorepo, NX marks all of the apps and libs as affected for the test-target, even if the tests aren't affected at all.
The test-target is configured the following:
In
nx.json
we have the following code for test:If I then check which projects are affected using
npx nx show projects --withTarget test --affected --head HEAD --base HEAD~1 --verbose
, all projects are listed.As described in the documentation (and as you can see above), I already tried to use
projectsAffectedByDependencyUpdates
to disable or at least improve the detection of affected projects, this however did nothing in the end.Is there anything I'm missing here? Does the Jest-plugin even support this flag to disable dependency-updates? I could only find references to that in the
@nx/js
plugin.Expected Behavior
Updates in dependencies are ignored when executing NX affected for tests with Jest.
GitHub Repo
No response
Steps to Reproduce
test
with@nx/jest
to all of them.npx nx show projects --withTarget test --affected --head HEAD --base HEAD~1 --verbose
and check the affected targets.Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: