Upgrade React ecosystem to v19, migrate snapshot tests to @testing-library/react#19352
Upgrade React ecosystem to v19, migrate snapshot tests to @testing-library/react#19352dependabot[bot] wants to merge 7 commits intomainfrom
Conversation
Bumps [react-test-renderer](https://github.com/facebook/react/tree/HEAD/packages/react-test-renderer) and [@types/react-test-renderer](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-test-renderer). These dependencies needed to be updated together. Updates `react-test-renderer` from 18.3.1 to 19.2.4 - [Release notes](https://github.com/facebook/react/releases) - [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/react/commits/v19.2.4/packages/react-test-renderer) Updates `@types/react-test-renderer` from 18.3.1 to 19.1.0 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-test-renderer) --- updated-dependencies: - dependency-name: react-test-renderer dependency-version: 19.2.4 dependency-type: direct:development update-type: version-update:semver-major - dependency-name: "@types/react-test-renderer" dependency-version: 19.1.0 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
|
Test this change out locally with the following install scripts (Action run 24255729136) VSCode
Azure CLI
|
|
@copilot please fix failing tests |
Agent-Logs-Url: https://github.com/Azure/bicep/sessions/9dfde390-33db-43ad-ae76-f3915bba6878 Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
The issue was that Fixed in commit |
|
@copilot Instead of reverting to v18, can you roll both forward to v19? |
Agent-Logs-Url: https://github.com/Azure/bicep/sessions/d95bd9da-22f6-4edf-882c-85b997592072 Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
…r to @testing-library/react Agent-Logs-Url: https://github.com/Azure/bicep/sessions/d95bd9da-22f6-4edf-882c-85b997592072 Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
Done in commit Since All 2 snapshot tests and 38 unit tests pass. |
|
@copilot please fix CI/CD |
…es/cytoscape global Agent-Logs-Url: https://github.com/Azure/bicep/sessions/69f052db-1e75-4baa-a561-b0e28a8e471c Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
Fixed in commit |
|
@brendandburns - For context, the latest release introduced a new experimental visualizer (with its source in |
|
@copilot please fix conflicts in package lock file. |
…rn/src/vscode-bicep/multi-b9fe0db564 # Conflicts: # src/vscode-bicep/package-lock.json Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
Fixed in commit |
|
Please fix linter errors. |
|
@copilot please fix linter errors. |
…se-prefix lint warning Agent-Logs-Url: https://github.com/Azure/bicep/sessions/5fddde85-3a88-4229-8394-fd7eab2e1a63 Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
Fixed in commit |
The
react-test-renderer@19peer dependency conflict withreact@18caused CI failures. Rather than pin to v18, this rolls the full React ecosystem to v19 and replaces the deprecated (broken in v19)react-test-rendererwith@testing-library/react.Dependency changes
react,react-dom→^19.2.4;@types/react→^19.2.14,@types/react-dom→^19.2.3react-test-renderer+@types/react-test-renderer(toJSON()returnsnullin React 19)@testing-library/react@^16.3.2,@testing-library/jest-dom@^6.9.1React 19 breaking change fixes
VFCremoved — replaced withFCinApp.tsx,StatusBar.tsx,Tooltip.tsxuseRef<T>()→useRef<T | undefined>(undefined)(explicit initial value now required)RefObject<HTMLDivElement>→RefObject<HTMLDivElement | null>; return typeMutableRefObject→RefObjectinuseCytoscape.tsTest infrastructure
@testing-library/reactusingasFragment()— snapshots now contain realDocumentFragmentHTMLsetup.tswith a canvas 2d context mock (jsdom doesn't implementHTMLCanvasElement.getContext)cytoscapeMock.tsviamoduleNameMapper; variable renamed tocytoscapeMockto avoidTS2451redeclaration conflict with the@types/cytoscapeglobal (tsconfig includes all ofsrc/)vscode.tsmock: was exporting a factory function instead of the API object