Skip to content

chore: upgrade Nx to 22.7.9 - #36717

Draft
Paul Mardling (PaulGMardling) wants to merge 1 commit into
microsoft:masterfrom
PaulGMardling:paulgmardling-nx22-clean-upgrade
Draft

chore: upgrade Nx to 22.7.9#36717
Paul Mardling (PaulGMardling) wants to merge 1 commit into
microsoft:masterfrom
PaulGMardling:paulgmardling-nx22-clean-upgrade

Conversation

@PaulGMardling

Copy link
Copy Markdown
Contributor

Draft — not ready to merge. Full v9 validation remains blocked by the published swc-plugin-de-indent-template-literal@1.5.1 Wasm artifact. A corrected official release, subject to the existing seven-day quarantine, is still required. No local rebuilt artifact or workaround dependency is included.

Previous Behavior

The workspace uses Nx 21.6.10, with an older devkit dependency in the private workspace plugin. The installed SWC compiler/helpers do not meet Nx 22's peer requirements. The custom build executor passes an output directory where newer SWC expects the emitted filename, and project inference relies on the process working directory for filesystem access. RIT retains the legacy Nx release-version configuration shape.

New Behavior

A clean, 13-file Nx 21 → 22.7.9 upgrade, started directly from master at a5b8341b24ed78137d2eeb4e7514b01071c6d471, without merging or cherry-picking the earlier upgrade branch. No Nx 23 packages or migration preparation.

  • Align installed Nx packages; update SWC core to 1.15.47 and helpers to 0.5.23 (core requires helpers ≥0.5.17). Retain compatible SWC CLI 0.7.7 and the supported ts-node fallback; do not add optional register solely to suppress a warning.
  • Remove only the obsolete @nx/devkit/minimatch, @nx/jest/minimatch, and nx/minimatch major-9 overrides; Nx 22.7.9 requires 10.2.5. Preserve all unrelated security overrides, Yarn 4.18.0, and the seven-day quarantine.
  • Pass the emitted JS filename to SWC and cover root/nested ES/CommonJS source maps.
  • Anchor graph-plugin filesystem access to context.workspaceRoot, keeping generated Nx keys/options/cwd workspace-relative. Add seven cwd/config-discovery regressions and update test contexts to the V2 API.
  • Manually apply only 22-0-0-release-version-config-changes (22.0.0-beta.1) to RIT: promote version resolvers, use manifestRootsToUpdate, and preserve prior behavior with preserveLocalDependencyProtocols: false. Publishing target options are unchanged.

Official Nx 22 migration metadata and implementations were audited. No blanket codemods, Jest CJS conversions, diagnostic workflows, or unrelated cleanup were applied. Existing migrations.json remains historical Nx 21 metadata, not a claim that Nx 22 migrations were all executed. nx.json is unchanged. The changed workspace package manifests are private, so no Beachball change file is needed.

Focused validation

  • 62 tests / 65 snapshots across eight suites passed, including existing component/library generator coverage and the actual Nx Jest executor loading RIT's unchanged TypeScript config.
  • Workspace-plugin build and type-check; RIT build through @nx/js:swc with CLI 0.7.7; in-process nested graph discovery; inferred release configuration; and yarn install --immutable passed.
  • Focused lint: zero errors. The existing ignore rule excludes lib/swc.ts; that code is exercised by the build regression tests.
  • The real uncached react-jsx-runtime:build completed six prerequisites but did not finish with the published de-indent plugin; its owned process tree was stopped. This is not a full-CI-green result.

Diff at creation: +1,035 / −660 lines; excluding generated yarn.lock, +258 / −69.

Related Issue(s)

Related: #36435 — fresh, narrowly scoped replacement implementation. The earlier PR is left unchanged.

Align Nx and required SWC peers, preserve emitted source-map paths and workspace-root project discovery, and migrate the RIT release configuration. Keep the upgrade scoped to tooling; full v9 validation remains blocked by the published de-indent plugin.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

1 participant