chore(deps): upgrade Nx to v22#36435
Open
PaulGMardling wants to merge 15 commits into
Open
Conversation
PaulGMardling
force-pushed
the
chore/nx-22-upgrade
branch
from
July 22, 2026 14:05
4488a5a to
43b9a04
Compare
PaulGMardling
force-pushed
the
chore/nx-22-upgrade
branch
from
July 22, 2026 14:17
43b9a04 to
eee090c
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR upgrades the monorepo’s Nx toolchain from 21.6.10 to 22.7.7, applying required migrations and compatibility updates across custom workspace tooling, Jest config loading, and SWC usage. It also replaces the removed SWC de-indent plugin with a new shared deIndent utility exported from @fluentui/react-utilities to preserve diagnostic formatting across multiple packages.
Changes:
- Upgrade Nx packages (and related dependencies) to 22.7.7 and update Nx config/migrations artifacts.
- Update Jest config modules to CommonJS export style for Nx 22 compatibility.
- Introduce and adopt
deIndentin@fluentui/react-utilities, removing SWC de-indent plugin usage from affected packages.
Reviewed changes
Copilot reviewed 49 out of 51 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Updates lockfile for Nx 22 + related dependency graph changes. |
| tools/workspace-plugin/src/plugins/workspace-plugin.spec.ts | Updates Nx devkit context typing for Nx 22. |
| tools/workspace-plugin/src/plugins/type-check-plugin.spec.ts | Updates Nx devkit context typing for Nx 22. |
| tools/workspace-plugin/src/plugins/format-plugin.spec.ts | Updates Nx devkit context typing for Nx 22. |
| tools/workspace-plugin/src/plugins/clean-plugin.spec.ts | Updates Nx devkit context typing for Nx 22. |
| tools/workspace-plugin/src/generators/move-packages/index.ts | Updates move generator import for Nx 22 (currently via deep/internal import). |
| tools/workspace-plugin/src/executors/build/executor.spec.ts | Updates inline snapshots to match output/source map formatting changes. |
| tools/workspace-plugin/package.json | Aligns workspace-plugin’s Nx devkit dependency to 22.7.7. |
| tools/workspace-plugin/jest.config.ts | Switches Jest config export style to CommonJS for Nx 22 compatibility. |
| tools/visual-regression-utilities/jest.config.ts | Switches Jest config to CommonJS + require() to satisfy Nx 22 config loading. |
| tools/visual-regression-assert/jest.config.ts | Switches Jest config to CommonJS + require() to satisfy Nx 22 config loading. |
| tools/storybook-llms-extractor/jest.config.ts | Switches Jest config to CommonJS + require() to satisfy Nx 22 config loading. |
| tools/react-integration-tester/project.json | Updates Nx release version config schema to Nx 22 format. |
| tools/react-integration-tester/jest.config.ts | Switches Jest config to CommonJS + require() to satisfy Nx 22 config loading. |
| tools/eslint-rules/jest.config.ts | Switches Jest config export style to CommonJS for Nx 22 compatibility. |
| packages/react-components/react-utilities/src/utils/index.ts | Exports the new deIndent utility from the utils barrel. |
| packages/react-components/react-utilities/src/utils/getReactCallbackName.ts | Replaces SWC de-indent marker usage with deIndent tagged template usage. |
| packages/react-components/react-utilities/src/utils/deIndent.ts | Adds new deIndent tagged template utility implementation. |
| packages/react-components/react-utilities/src/utils/deIndent.test.ts | Adds unit tests for deIndent. |
| packages/react-components/react-utilities/src/ssr/SSRContext.tsx | Uses deIndent for multiline SSR warnings (replacing SWC plugin marker usage). |
| packages/react-components/react-utilities/src/index.ts | Exposes deIndent as a public export from @fluentui/react-utilities. |
| packages/react-components/react-utilities/src/hooks/useMergedRefs.ts | Uses deIndent for multiline warnings (replacing SWC plugin marker usage). |
| packages/react-components/react-utilities/src/hooks/useControllableState.ts | Uses deIndent for multiline warnings (replacing SWC plugin marker usage). |
| packages/react-components/react-utilities/src/compose/slot.ts | Uses deIndent for multiline warnings (replacing SWC plugin marker usage). |
| packages/react-components/react-utilities/src/compose/assertSlots.ts | Uses deIndent for multiline warnings (replacing SWC plugin marker usage). |
| packages/react-components/react-utilities/etc/react-utilities.api.md | Updates API extractor output to include deIndent as a public API. |
| packages/react-components/react-utilities/.swcrc | Removes the incompatible SWC de-indent plugin configuration. |
| packages/react-components/react-tree/library/src/utils/createHeadlessTree.ts | Switches multiline diagnostics to deIndent. |
| packages/react-components/react-tree/library/src/hooks/useRootTree.ts | Switches multiline diagnostics to deIndent. |
| packages/react-components/react-tree/library/src/hooks/useFlatTreeNavigation.ts | Switches multiline diagnostics to deIndent. |
| packages/react-components/react-tree/library/src/components/TreeItem/useTreeItem.tsx | Switches multiline diagnostics to deIndent. |
| packages/react-components/react-tree/library/src/components/Tree/useTree.ts | Switches multiline error formatting to deIndent. |
| packages/react-components/react-tree/library/src/components/FlatTree/useFlatTree.ts | Switches multiline error formatting to deIndent. |
| packages/react-components/react-tree/library/src/components/FlatTree/useFlatControllableCheckedItems.ts | Switches multiline diagnostics to deIndent. |
| packages/react-components/react-tree/library/.swcrc | Removes the incompatible SWC de-indent plugin configuration. |
| packages/react-components/react-jsx-runtime/src/utils/warnIfElementTypeIsInvalid.ts | Switches multiline diagnostics to deIndent and normalizes indentation. |
| packages/react-components/react-jsx-runtime/.swcrc | Removes the incompatible SWC de-indent plugin configuration. |
| packages/react-components/react-dialog/library/src/utils/useFocusFirstElement.ts | Switches multiline diagnostics to deIndent. |
| packages/react-components/react-dialog/library/src/components/Dialog/useDialog.ts | Switches multiline diagnostics to deIndent. |
| packages/react-components/react-dialog/library/.swcrc | Removes the incompatible SWC de-indent plugin configuration. |
| packages/eslint-plugin/package.json | Updates @nx/eslint-plugin dependency to 22.7.7. |
| package.json | Bumps Nx + SWC versions; removes de-indent SWC plugin dependency and Nx-related resolutions. |
| nx.json | Removes legacy cache config usage and disables Nx analytics. |
| migrations.json | Removes completed Nx migrations file after applying migrations. |
| jest.config.ts | Switches root Jest config export style to CommonJS for Nx 22 compatibility. |
| change/@fluentui-storybook-llms-extractor-a939f325-051a-4dde-8463-a964e88dff2d.json | Beachball change file for Jest config update. |
| change/@fluentui-react-utilities-7e1a28e4-cf87-4ec4-9f3e-6f81286640d5.json | Beachball change file for new public deIndent export. |
| change/@fluentui-react-tree-e51cc437-c382-4ab6-8150-aa1e9f51e6bd.json | Beachball change file for diagnostic formatting preservation update. |
| change/@fluentui-react-jsx-runtime-bf898021-4a83-471c-a2b4-205e7d712423.json | Beachball change file for diagnostic formatting preservation update. |
| change/@fluentui-react-dialog-67524c52-c663-4451-a0eb-87938fd6024e.json | Beachball change file for diagnostic formatting preservation update. |
| .gitignore | Ignores Nx polygraph output directory. |
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 48 out of 50 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
packages/react-components/react-utilities/src/utils/deIndent.test.ts:19
deIndentexplicitly calls out support for cases where the first content line starts with an interpolation, but the tests don't cover that edge case (only an interpolation on a later line). Adding a regression test would help ensure the indentation-detection logic stays correct.
📊 Bundle size reportUnchanged fixtures
|
|
Pull request demo site: URL |
PaulGMardling
force-pushed
the
chore/nx-22-upgrade
branch
from
July 23, 2026 08:47
5f2aaca to
1780317
Compare
PaulGMardling
marked this pull request as ready for review
July 23, 2026 12:00
Hotell
self-requested a review
July 23, 2026 12:07
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
PaulGMardling
marked this pull request as draft
July 23, 2026 12:35
PaulGMardling
force-pushed
the
chore/nx-22-upgrade
branch
from
July 23, 2026 14:39
c421705 to
d5e4f3a
Compare
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
PaulGMardling
marked this pull request as ready for review
July 24, 2026 10:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Previous Behavior
The workspace used Nx 21.6.10. Nx tasks and custom workspace plugins depended on APIs and configuration that are incompatible with Nx 22.
Multiline development diagnostics relied on
swc-plugin-de-indent-template-literal, which is incompatible with the SWC version required by Nx 22.New Behavior
deIndentutility from@fluentui/react-utilities.Validated across the workspace with immutable install, lint, type-check, build, unit tests, and Beachball checks.
Related Issue(s)
No related issue.