Skip to content

chore(repo): migrate to nx 23.1.0-rc.1#3175

Merged
FrozenPandaz merged 7 commits into
masterfrom
migrate-nx-23.1.0-rc.0
Jul 13, 2026
Merged

chore(repo): migrate to nx 23.1.0-rc.1#3175
FrozenPandaz merged 7 commits into
masterfrom
migrate-nx-23.1.0-rc.0

Conversation

@FrozenPandaz

@FrozenPandaz FrozenPandaz commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Current Behavior

nx-console is on nx 23.1.0-beta.7 (ESLint legacy config, pre-TS6 tsconfig defaults, Gradle project-graph plugin 0.1.22).

Expected Behavior

nx-console is on nx 23.1.0-rc.0. All nx/@nx/* packages are bumped to exactly 23.1.0-rc.0 (Yarn Berry lockfile updated).

Migrations applied (one nx migrate --run-migrations pass, one commit each):

  • update-23-1-0-convert-to-flat-config — ESLint 8→9 flat config; removed the typescript-eslint-v8-removed @typescript-eslint/no-extra-semi rule
  • 23-1-0-add-ignore-deprecations-for-ts6"ignoreDeprecations": "6.0" for TypeScript 6
  • change-plugin-version-0-1-23 / change-plugin-version-0-1-24 — dev.nx.gradle.project-graph 0.1.22 → 0.1.24
  • set-ts-jest-isolated-modules — no changes needed

AI migration prompts applied:

  • convert-to-flat-config — converted the eslint-plugin-cypress FlatCompat shim to a flat-native import, kept the pre-migration lint scope (projects without their own eslint config stay ignored), and disabled the rules newly enabled by ESLint v9 / typescript-eslint v8 presets (@typescript-eslint/no-unused-expressions, no-constant-binary-expression, no-unused-private-class-members, prefer-const) with comments
  • migrate-ban-types-rule — verified no-op: no flat config references @typescript-eslint/ban-types
  • verify-typecheck — fixed libs/shared/json-schema for the new TargetDefaultValue union in nx 23.1 (a targetDefaults entry can now be an ordered array of filtered entries; the schema builder takes the executor from the last entry that sets one, matching nx's last-match-wins semantics)

Verification (all --skip-nx-cache): typecheck 64/64, lint 59/59; project graph resolves.

Related Issue(s)

Part of the coordinated nx 23.1.0-rc.1 migration across nrwl repos (see linked Polygraph session).


View session information ↗

@nx-cloud-snapshot

nx-cloud-snapshot Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit 0805ec2

Command Status Duration Result
nx affected --targets=lint,test,build,e2e-ci,ty... ✅ Succeeded 6m 22s View ↗
nx-cloud record -- node tools/scripts/check-pin... ✅ Succeeded <1s View ↗
nx-cloud record -- yarn nx sync:check ✅ Succeeded 9s View ↗
nx-cloud record -- yarn nx run-many -t ktfmtFormat ✅ Succeeded 13m 53s View ↗
nx run-many -t ktfmtFormat ✅ Succeeded 12m 24s View ↗
nx-cloud record -- yarn nx format:check --verbose ✅ Succeeded 2s View ↗

☁️ Nx Cloud last updated this comment at 2026-07-10 17:47:18 UTC

nx-cloud-snapshot[bot]

This comment was marked as outdated.

nx-cloud-snapshot[bot]

This comment was marked as outdated.

FrozenPandaz added a commit to nrwl/nx that referenced this pull request Jul 8, 2026
…ory (#36272)

## Current Behavior

The `23-1-0-set-tsconfig-root-dir-for-ts6` migration skips any tsconfig
whose inferred common source directory already equals the tsconfig's own
directory, on the assumption that TypeScript 6 infers the same value so
no pin is needed.

That assumption only holds for the program the config declares.
Inference is per-program: a tool that compiles a subset of the config's
files re-infers the common directory from that subset alone. Concretely,
ts-jest with its `isolatedModules` option builds a program per test
file, the common directory collapses to that file's folder, and
TypeScript 6 hard-fails with:

```
error TS5011: The common source directory of 'tsconfig.spec.json' is './src/document-links'.
The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
```

This is not hypothetical — it broke nx-console's CI on its nx
23.1.0-rc.0 migration (nrwl/nx-console#3175): the `nxls-e2e` and
`nx-mcp-e2e` projects' spec tsconfigs include the root-level
`jest.config.ts` alongside `src/**`, so their inferred dir equals the
config dir and the migration skipped them; every atomized `e2e-ci` jest
task then failed with TS5011. Ironically, sibling projects whose include
starts at `src/**` were pinned fine — including the root-level
`jest.config.ts` is exactly what exempted the broken ones.

## Expected Behavior

Every non-composite candidate (no `rootDir`, has an emit-gate option,
has input files) gets an explicit `rootDir` pin — the file-derived
directory when it differs from the config dir (as before), and `.` when
it doesn't (new). The pinned value is exactly what TypeScript 5 inferred
for the declared program, so compilation and emit layout are unchanged;
single-file programs can no longer re-infer a different root.

Composite configs keep the previous behavior (never pinned from files,
only shielded from an `extends` base pin) — their `rootDir` defaults to
the tsconfig directory in both TS5 and TS6 for any file subset, so they
are genuinely safe.

Implementation notes:

- The `own-dir` analysis kind is gone: the `commonDir == config dir`
case now falls through to the normal `write` path (producing `.`), and
composite gets its own `composite` kind. The phase-3 shield loop now
only processes composite configs, since every non-composite candidate is
pinned directly in phase 2.
- The migration entry is re-stamped `23.1.0-beta.8` → `23.1.0-rc.1` so
workspaces that already migrated to rc.0 run it again on their next `nx
migrate`. The writes are idempotent (`rootDir` present → untouched), so
re-running over already-pinned workspaces is a no-op.
- Added a regression spec modeled on the nx-console shape: a spec
tsconfig whose include spans its own directory root (`jest.config.ts` +
`src/**`) must come out with `"rootDir": "."`. All 10 specs pass.

## Related Issue(s)

Discovered via the coordinated nx 23.1.0-rc.0 migration (nx-console CI
failure on nrwl/nx-console#3175; fixed there manually with the same
`"rootDir": "."` pins this migration now writes).

<!-- polygraph-session-start -->
---
[View session information
↗](https://app.trypolygraph.com/orgs/6a061dcb561c062131116eca/sessions/Migrate-nrwl-repos-to-nx-23.1.0-rc.0-b8c94700)
<!-- polygraph-session-end -->
nx-cloud-snapshot[bot]

This comment was marked as outdated.

@FrozenPandaz
FrozenPandaz force-pushed the migrate-nx-23.1.0-rc.0 branch from ba58b1e to dba2926 Compare July 9, 2026 18:21
nx-cloud-snapshot[bot]

This comment was marked as outdated.

@FrozenPandaz
FrozenPandaz force-pushed the migrate-nx-23.1.0-rc.0 branch from dba2926 to 5d01557 Compare July 9, 2026 19:20

@nx-cloud-snapshot nx-cloud-snapshot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

At least one additional CI pipeline execution has run since the conclusion below was written and it may no longer be applicable.

Nx Cloud has identified a possible root cause for your failed CI:

We investigated this failure and determined it is unrelated to the PR's changes. The test hardcodes defaultVersion = '21.3.0', causing a peer dependency conflict when npm install -D @nx/plugin resolves to @nx/[email protected] (which requires nx >= 22) in an [email protected] workspace — a pre-existing infrastructure mismatch. The same test is also failing on master for a separate reason, confirming the breakage predates this PR.

No code changes were suggested for this issue.

Trigger a rerun:

Rerun CI

Nx Cloud View detailed reasoning on Nx Cloud ↗

🔔 Heads up, your workspace has pending recommendations ↗ to auto-apply fixes for similar failures.


🎓 Learn more about Self-Healing CI on nx.dev

@FrozenPandaz
FrozenPandaz marked this pull request as ready for review July 9, 2026 22:06
@FrozenPandaz
FrozenPandaz requested a review from MaxKless as a code owner July 9, 2026 22:06
@FrozenPandaz
FrozenPandaz force-pushed the migrate-nx-23.1.0-rc.0 branch from 5d01557 to df8f053 Compare July 9, 2026 22:11
@FrozenPandaz FrozenPandaz changed the title chore(repo): migrate to nx 23.1.0-rc.0 chore(repo): migrate to nx 23.1.0-rc.1 Jul 10, 2026
@FrozenPandaz
FrozenPandaz enabled auto-merge (squash) July 10, 2026 03:11
Includes update-23-1-0-remove-removed-typescript-eslint-extension-rules
(drops @typescript-eslint/no-extra-semi, removed in typescript-eslint v8).
Includes 23-1-0-set-tsconfig-root-dir-for-ts6 (pins rootDir on project
tsconfigs so ts-jest per-file compiles keep working under TypeScript 6).
Applies change-plugin-version-0-1-23 and change-plugin-version-0-1-24
(dev.nx.gradle.project-graph 0.1.22 -> 0.1.24).
- Replace the FlatCompat shim in generate-ui-v2-e2e with the flat-native
  eslint-plugin-cypress/flat preset
- Restore the pre-migration lint scope: the old root .eslintrc.json ignored
  all files, so projects without their own eslint config were never linted
- Disable rules newly enabled by ESLint v9 / typescript-eslint v8 preset
  defaults that were not enforced before
nx 23.1 widened TargetDefaults values to a union that includes an ordered
array of filtered entries. Take the executor from the last array entry that
sets one, matching the last-match-wins semantics.
@FrozenPandaz
FrozenPandaz force-pushed the migrate-nx-23.1.0-rc.0 branch from df8f053 to 0805ec2 Compare July 10, 2026 03:29
@FrozenPandaz
FrozenPandaz disabled auto-merge July 10, 2026 17:27
@FrozenPandaz
FrozenPandaz merged commit c1c6b54 into master Jul 13, 2026
8 of 9 checks passed
@FrozenPandaz
FrozenPandaz deleted the migrate-nx-23.1.0-rc.0 branch July 13, 2026 13:41
FrozenPandaz added a commit to nrwl/nx that referenced this pull request Jul 15, 2026
…eywords (#36326)

## Current Behavior

`nx release changelog` extracts issue references from the commit body
with a bare `/(#\d+)/gm` regex, so **every** `#number` in a squashed PR
description becomes an issue link in the changelog — including other
repos' issue numbers.

For example, the [23.1.0 release
notes](https://github.com/nrwl/nx/releases/tag/23.1.0) contain:

> **rspack:** support @rspack/core@2 and @rsbuild/core@2 (multi-version
compliance) (#35682, #35764, #13420, #781)

where `#13420` is actually `web-infra-dev/rspack#13420` and `#781` is
`privatenumber/tsx#781` — upstream issues discussed in the PR
description, rendered as (bogus) `nrwl/nx` issue links. The same release
also picked up `nrwl/nx-console#3175`, `react/react#418`, and
`web-infra-dev/rspack#2292`, plus noisy same-repo PR mentions that were
merely referenced in prose.

## Expected Behavior

Issue references are only extracted from the commit body when linked via
a GitHub closing keyword (`Fixes #123`, `Closes #123`, `Resolves: #123`,
...) — the same rule GitHub itself uses to auto-link and close issues.
Cross-repo forms (`owner/repo#123`), markdown links to other repos, and
casual same-repo mentions no longer produce changelog references.

Subject-line extraction (the PR number in `(#123)` and inline issue
refs) is unchanged. Both regular commits and version plans go through
the same `extractReferencesFromCommit` function, so this fixes both
paths.

## Related Issue(s)

N/A

<!-- polygraph-session-start -->
---
[View session information
↗](https://app.trypolygraph.com/orgs/6a061dcb561c062131116eca/sessions/Fix-nx-release-changelog-scraping-other-repos-issue-numbers-7967dd62)
<!-- polygraph-session-end -->
AgentEnder pushed a commit to nrwl/nx that referenced this pull request Jul 17, 2026
…eywords (#36326)

## Current Behavior

`nx release changelog` extracts issue references from the commit body
with a bare `/(#\d+)/gm` regex, so **every** `#number` in a squashed PR
description becomes an issue link in the changelog — including other
repos' issue numbers.

For example, the [23.1.0 release
notes](https://github.com/nrwl/nx/releases/tag/23.1.0) contain:

> **rspack:** support @rspack/core@2 and @rsbuild/core@2 (multi-version
compliance) (#35682, #35764, #13420, #781)

where `#13420` is actually `web-infra-dev/rspack#13420` and `#781` is
`privatenumber/tsx#781` — upstream issues discussed in the PR
description, rendered as (bogus) `nrwl/nx` issue links. The same release
also picked up `nrwl/nx-console#3175`, `react/react#418`, and
`web-infra-dev/rspack#2292`, plus noisy same-repo PR mentions that were
merely referenced in prose.

## Expected Behavior

Issue references are only extracted from the commit body when linked via
a GitHub closing keyword (`Fixes #123`, `Closes #123`, `Resolves: #123`,
...) — the same rule GitHub itself uses to auto-link and close issues.
Cross-repo forms (`owner/repo#123`), markdown links to other repos, and
casual same-repo mentions no longer produce changelog references.

Subject-line extraction (the PR number in `(#123)` and inline issue
refs) is unchanged. Both regular commits and version plans go through
the same `extractReferencesFromCommit` function, so this fixes both
paths.

## Related Issue(s)

N/A

<!-- polygraph-session-start -->
---
[View session information
↗](https://app.trypolygraph.com/orgs/6a061dcb561c062131116eca/sessions/Fix-nx-release-changelog-scraping-other-repos-issue-numbers-7967dd62)
<!-- polygraph-session-end -->
FrozenPandaz added a commit to nrwl/nx that referenced this pull request Jul 20, 2026
…eywords (#36326)

## Current Behavior

`nx release changelog` extracts issue references from the commit body
with a bare `/(#\d+)/gm` regex, so **every** `#number` in a squashed PR
description becomes an issue link in the changelog — including other
repos' issue numbers.

For example, the [23.1.0 release
notes](https://github.com/nrwl/nx/releases/tag/23.1.0) contain:

> **rspack:** support @rspack/core@2 and @rsbuild/core@2 (multi-version
compliance) (#35682, #35764, #13420, #781)

where `#13420` is actually `web-infra-dev/rspack#13420` and `#781` is
`privatenumber/tsx#781` — upstream issues discussed in the PR
description, rendered as (bogus) `nrwl/nx` issue links. The same release
also picked up `nrwl/nx-console#3175`, `react/react#418`, and
`web-infra-dev/rspack#2292`, plus noisy same-repo PR mentions that were
merely referenced in prose.

## Expected Behavior

Issue references are only extracted from the commit body when linked via
a GitHub closing keyword (`Fixes #123`, `Closes #123`, `Resolves: #123`,
...) — the same rule GitHub itself uses to auto-link and close issues.
Cross-repo forms (`owner/repo#123`), markdown links to other repos, and
casual same-repo mentions no longer produce changelog references.

Subject-line extraction (the PR number in `(#123)` and inline issue
refs) is unchanged. Both regular commits and version plans go through
the same `extractReferencesFromCommit` function, so this fixes both
paths.

## Related Issue(s)

N/A

<!-- polygraph-session-start -->
---
[View session information
↗](https://app.trypolygraph.com/orgs/6a061dcb561c062131116eca/sessions/Fix-nx-release-changelog-scraping-other-repos-issue-numbers-7967dd62)
<!-- polygraph-session-end -->

(cherry picked from commit d7312d2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants