22.7 lands a few headline improvements:
- Worktree-aware caching — the Nx cache is now shared across git worktrees, so switching between worktrees gives you a cache hit instead of a rebuild.
- 7x reduction in daemon memory — on Nx's own repo, the daemon footprint dropped from 1.5-1.6 GB to ~200 MB.
- Faster cache replay — restoring 1110 cached tasks now takes 1.16s, down from ~17s.
See the Nx 22.7 release post for the full story.
Features
A new input type lets you hash only specific fields of a JSON file instead of the whole thing. For example, only invalidate the build cache when `dependencies` or `peerDependencies` change in `package.json`, ignoring edits to `scripts` or `author`.
`nx show target --verbose` now reports the plugin, preset, or config file that contributed each input, output, and option. Makes it far easier to figure out why a target is configured the way it is.
Setting `NX_BAIL=true` stops a run as soon as a single task fails, instead of continuing through the rest of the graph. Contributed by [@jase88](https://github.com/jase88).
Angular Rspack got HMR support, `fileReplacements` wired into `resolve.alias`, and Windows path separator normalization for i18n.
Bug Fixes
Nx 22.7 ships a range of fixes across the ecosystem. Highlights:
- Release: Publish errors are now surfaced when stdout isn't valid JSON, instead of being swallowed (#35283).
- Module Federation: Bumped
@module-federation/enhancedto 2.3.3 (#35314). - TUI: Page up/down shortcuts added (#34525), contributed by @yharaskrik.
See the full Nx 22.7.0 release notes for the complete list.
