nx icon indicating copy to clipboard operation
nx copied to clipboard

feat(testing): add disableJestRuntime option to @nx/jest/plugin to speed up target inference

Open jaysoo opened this issue 1 year ago • 2 comments

This PR adds a new disableJestRuntime option to @nx/jest/plugin. By setting this to true, the inference plugin will not use jest-config and jest-runtime to retrieve outputs, nor matching spec files when ciTargetName is used. Instead, we'll use our own config loader and glob/matcher to get both values for the inferred targets.

This speeds up computation quite a bit. With a large monorepo (800 projects, 75K files), the computation goes from 2m 41s to 35s, or ~78% time reduction.

NOTE: This has no effect on existing projects and needs to be opted into.

Current Behavior

Expected Behavior

Related Issue(s)

Fixes #

jaysoo avatar Oct 18 '24 15:10 jaysoo

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Oct 28, 2024 6:03pm

vercel[bot] avatar Oct 18 '24 15:10 vercel[bot]

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

github-actions[bot] avatar Nov 07 '24 00:11 github-actions[bot]