Skip to content

feat(semver)!: support Nx 23 and drop support for Nx < 22#1094

Draft
tuffz wants to merge 3 commits into
jscutlery:mainfrom
tuffz:feat/support-nx-23
Draft

feat(semver)!: support Nx 23 and drop support for Nx < 22#1094
tuffz wants to merge 3 commits into
jscutlery:mainfrom
tuffz:feat/support-nx-23

Conversation

@tuffz

@tuffz tuffz commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Implements Option A from #1093. Opening as a draft for discussion, since the direction (Option A vs. Option B) is still open there.

Adds Nx 23 support. Unlike the earlier Nx 21 and Nx 22 updates, this is not a peer-range-only bump: Nx 23 removed the flat releaseTagPattern property from NxReleaseConfiguration (moved to the nested releaseTag.pattern in Nx 22) and now rejects it at runtime, so the nx.json written by the migrate-nx-release generator broke nx release. The generator now emits the nested shape.

Warning

This drops backward compatibility. The nested releaseTag.pattern shape only exists in Nx >= 22, so the peer range is narrowed to ^22.0.0 || ^23.0.0 and support for Nx 18-21 is dropped. This is a breaking change (major bump).

If you'd prefer to keep backward compatibility instead (Option B in #1093: a version-aware generator that emits the flat shape for Nx < 22 and the nested shape for Nx >= 22), I'm happy to implement that and close this in favor of it.

Changes

  • migrate-nx-release generator emits the nested releaseTag: { pattern } shape.
  • Peer range narrowed to @nx/devkit ^22.0.0 || ^23.0.0.
  • Removed an obsolete test-only mock of @nx/workspace/src/core/project-graph, which is unreachable under Nx 23's tightened exports map (the executor source only uses public @nx/devkit entrypoints).
  • Updated the README compatibility table.

Verification

Migrated the dev workspace to Nx 23 and ran the build and full test suite; both green. Re-verified green on Nx 22 as well, so the change works across the whole ^22.0.0 || ^23.0.0 range.

Related

tuffz added 3 commits July 3, 2026 01:29
Nx 23 removed the flat `releaseTagPattern` property from
`NxReleaseConfiguration` and rejects it at runtime, so the `nx.json`
written by the `migrate-nx-release` generator broke `nx release`. Emit
the nested `releaseTag.pattern` shape that Nx 22 introduced instead.

That shape is only understood by Nx >= 22, so `@nx/devkit` v18-v21 can
no longer be supported. Narrow the peer range to `^22.0.0 || ^23.0.0`.

BREAKING CHANGE: `@nx/devkit` `^22.0.0 || ^23.0.0` is now required;
support for Nx 18, 19, 20 and 21 has been dropped.
The mock targeted `@nx/workspace/src/core/project-graph`, a path the
version executor no longer imports (it calls `createProjectGraphAsync`
from `@nx/devkit`). The deep path is also unreachable under Nx 23's
tightened package `exports` map, which broke the test suite.
Add a v7.0.0 row for the `@nx/devkit ^22.0.0 || ^23.0.0` peer range,
reflecting the addition of Nx 23 and the drop of Nx 18-21.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant