Skip to content

Commit a52804a

Browse files
SamTV12345claude
andcommitted
feat(deps)!: update React dependencies to v19
- bump react, react-dom, @types/react and @types/react-dom in the workspace root and the integration demo app to React 19 - restrict the react/react-dom peer ranges of all packages (and the package generator template) to ^18 || ^19 - omit the div onChange from NumberInputProps so the interface compiles against the stricter @types/react@19 event types - reference the scoped React.JSX namespace in the MenuToggleInForm example (the global JSX namespace was removed in @types/react@19) - update Select template tests that relied on React 18 deferring unmounts past the awaited user event, and refresh snapshots for the React 19 useId format BREAKING CHANGE: all @patternfly packages now require react and react-dom ^18 || ^19; React 17 is no longer supported. Closes #11371 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 94fe4bb commit a52804a

102 files changed

Lines changed: 1100 additions & 1112 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
"@testing-library/user-event": "^14.6.1",
4444
"@types/jest": "29.5.14",
4545
"@types/node": "^22.16.5",
46-
"@types/react": "^18.3.28",
47-
"@types/react-dom": "^18.3.7",
46+
"@types/react": "^19.2.18",
47+
"@types/react-dom": "^19.2.5",
4848
"babel-jest": "^29.7.0",
4949
"concurrently": "^9.2.1",
5050
"eslint": "^9.32.0",
@@ -68,8 +68,8 @@
6868
"plop": "^4.0.5",
6969
"prettier": "^3.8.1",
7070
"publint": "^0.3.18",
71-
"react": "^18.3.1",
72-
"react-dom": "^18.3.1",
71+
"react": "^19.2.8",
72+
"react-dom": "^19.2.8",
7373
"rimraf": "^6.1.3",
7474
"rollup": "^4.57.1",
7575
"rollup-plugin-scss": "^4.0.1",

packages/react-charts/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
},
5353
"peerDependencies": {
5454
"echarts": "^5.6.0 || ^6.0.0",
55-
"react": "^17 || ^18 || ^19",
56-
"react-dom": "^17 || ^18 || ^19",
55+
"react": "^18 || ^19",
56+
"react-dom": "^18 || ^19",
5757
"victory-area": "^37.3.6",
5858
"victory-axis": "^37.3.6",
5959
"victory-bar": "^37.3.6",

packages/react-code-editor/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
"tslib": "^2.8.1"
3939
},
4040
"peerDependencies": {
41-
"react": "^17 || ^18 || ^19",
42-
"react-dom": "^17 || ^18 || ^19"
41+
"react": "^18 || ^19",
42+
"react-dom": "^18 || ^19"
4343
},
4444
"devDependencies": {
4545
"monaco-editor": "^0.56.0"

packages/react-code-editor/src/components/CodeEditor/__test__/__snapshots__/CodeEditor.test.tsx.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ exports[`Matches snapshot with control buttons enabled 1`] = `
2525
<button
2626
aria-label="Copy code to clipboard"
2727
class="pf-v6-c-button pf-m-plain"
28-
data-ouia-component-id="OUIA-Generated-Button-plain-:r1:"
28+
data-ouia-component-id="OUIA-Generated-Button-plain-_r_1_"
2929
data-ouia-component-type="PF6/Button"
3030
data-ouia-safe="true"
3131
type="button"
@@ -55,7 +55,7 @@ exports[`Matches snapshot with control buttons enabled 1`] = `
5555
<button
5656
aria-label="Upload code"
5757
class="pf-v6-c-button pf-m-plain"
58-
data-ouia-component-id="OUIA-Generated-Button-plain-:r3:"
58+
data-ouia-component-id="OUIA-Generated-Button-plain-_r_3_"
5959
data-ouia-component-type="PF6/Button"
6060
data-ouia-safe="true"
6161
type="button"
@@ -85,7 +85,7 @@ exports[`Matches snapshot with control buttons enabled 1`] = `
8585
<button
8686
aria-label="Download code"
8787
class="pf-v6-c-button pf-m-plain"
88-
data-ouia-component-id="OUIA-Generated-Button-plain-:r5:"
88+
data-ouia-component-id="OUIA-Generated-Button-plain-_r_5_"
8989
data-ouia-component-type="PF6/Button"
9090
data-ouia-safe="true"
9191
type="button"

packages/react-code-editor/src/components/CodeEditor/__test__/__snapshots__/CodeEditorControl.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exports[`Matches snapshot 1`] = `
77
>
88
<button
99
class="pf-v6-c-button pf-m-plain"
10-
data-ouia-component-id="OUIA-Generated-Button-plain-:r1:"
10+
data-ouia-component-id="OUIA-Generated-Button-plain-_r_1_"
1111
data-ouia-component-type="PF6/Button"
1212
data-ouia-safe="true"
1313
type="button"

packages/react-core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"fs-extra": "^11.3.3"
6161
},
6262
"peerDependencies": {
63-
"react": "^17 || ^18 || ^19",
64-
"react-dom": "^17 || ^18 || ^19"
63+
"react": "^18 || ^19",
64+
"react-dom": "^18 || ^19"
6565
}
6666
}

packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalBoxCloseButton.test.tsx.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ exports[`AboutModalBoxCloseButton Test 1`] = `
88
<button
99
aria-label="Close Dialog"
1010
class="pf-v6-c-button pf-m-plain"
11-
data-ouia-component-id="OUIA-Generated-Button-plain-:r0:"
11+
data-ouia-component-id="OUIA-Generated-Button-plain-_r_0_"
1212
data-ouia-component-type="PF6/Button"
1313
data-ouia-safe="true"
1414
type="button"
@@ -43,7 +43,7 @@ exports[`AboutModalBoxCloseButton Test close button aria label 1`] = `
4343
<button
4444
aria-label="Klose Daylok"
4545
class="pf-v6-c-button pf-m-plain"
46-
data-ouia-component-id="OUIA-Generated-Button-plain-:r2:"
46+
data-ouia-component-id="OUIA-Generated-Button-plain-_r_2_"
4747
data-ouia-component-type="PF6/Button"
4848
data-ouia-safe="true"
4949
type="button"
@@ -78,7 +78,7 @@ exports[`AboutModalBoxCloseButton Test onclose 1`] = `
7878
<button
7979
aria-label="Close Dialog"
8080
class="pf-v6-c-button pf-m-plain"
81-
data-ouia-component-id="OUIA-Generated-Button-plain-:r1:"
81+
data-ouia-component-id="OUIA-Generated-Button-plain-_r_1_"
8282
data-ouia-component-type="PF6/Button"
8383
data-ouia-safe="true"
8484
type="button"

packages/react-core/src/components/AboutModal/__tests__/__snapshots__/AboutModalBoxHeader.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exports[`AboutModalBoxHeader Test 1`] = `
77
>
88
<h1
99
class="pf-v6-c-title pf-m-4xl"
10-
data-ouia-component-id="OUIA-Generated-Title-:r0:"
10+
data-ouia-component-id="OUIA-Generated-Title-_r_0_"
1111
data-ouia-component-type="PF6/Title"
1212
data-ouia-safe="true"
1313
id="id"

packages/react-core/src/components/Alert/__tests__/Generated/__snapshots__/AlertActionCloseButton.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ exports[`AlertActionCloseButton should match snapshot 1`] = `
55
<button
66
aria-label="Close some label alert: test title"
77
class="pf-v6-c-button pf-m-plain"
8-
data-ouia-component-id="OUIA-Generated-Button-plain-:r0:"
8+
data-ouia-component-id="OUIA-Generated-Button-plain-_r_0_"
99
data-ouia-component-type="PF6/Button"
1010
data-ouia-safe="true"
1111
type="button"

packages/react-core/src/components/Alert/__tests__/Generated/__snapshots__/AlertActionLink.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ exports[`AlertActionLink should match snapshot (auto-generated) 1`] = `
44
<DocumentFragment>
55
<button
66
class="pf-v6-c-button pf-m-link pf-m-inline ''"
7-
data-ouia-component-id="OUIA-Generated-Button-link-:r0:"
7+
data-ouia-component-id="OUIA-Generated-Button-link-_r_0_"
88
data-ouia-component-type="PF6/Button"
99
data-ouia-safe="true"
1010
type="button"

0 commit comments

Comments
 (0)