Skip to content

Commit 0bec1f3

Browse files
committed
MBS-13716: Upgrade React to v19
https://react.dev/blog/2024/04/25/react-19 https://react.dev/blog/2024/04/25/react-19-upgrade-guide It seems that a new version of the react-dom libdefs have not been published to flow-typed yet. I simply moved the existing v18 file and removed all removed functions. I didn't add any of the new functions (we don't use them yet).
1 parent 812018a commit 0bec1f3

4 files changed

Lines changed: 21 additions & 136 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- translations
1010

1111
env:
12-
TESTS_IMAGE_TAG: v-2025-08-28
12+
TESTS_IMAGE_TAG: v-2025-08-28.1
1313

1414
jobs:
1515
build-tests-image:
Lines changed: 1 addition & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// flow-typed signature: bd8a9984746306d26194a489f3aeff35
2-
// flow-typed version: 388e9edcf0/react-dom_v18.x.x/flow_>=v0.127.x
1+
// @flow strict
32

43
declare module 'react-dom_shared-types' {
54
/**
@@ -105,33 +104,13 @@ declare module 'react-dom_shared-types' {
105104
}
106105

107106
declare module 'react-dom' {
108-
import * as React from 'react';
109-
110107
declare var version: string;
111108

112-
declare function findDOMNode(
113-
componentOrElement: Element | ?React.Component<any, any>
114-
): null | Element | Text;
115-
116-
declare function render<ElementType: React.ElementType>(
117-
element: React.MixedElement,
118-
container: Element,
119-
callback?: () => void
120-
): React.ElementRef<ElementType>;
121-
122-
declare function hydrate<ElementType: React.ElementType>(
123-
element: React.MixedElement,
124-
container: Element,
125-
callback?: () => void
126-
): React.ElementRef<ElementType>;
127-
128109
declare function createPortal(
129110
node: React.Node,
130111
container: Element
131112
): React$Portal;
132113

133-
declare function unmountComponentAtNode(container: any): boolean;
134-
135114
declare function flushSync(callback: () => mixed): void;
136115

137116
declare function unstable_batchedUpdates<A, B, C, D, E>(
@@ -142,15 +121,6 @@ declare module 'react-dom' {
142121
d: D,
143122
e: E
144123
): void;
145-
146-
declare function unstable_renderSubtreeIntoContainer<
147-
ElementType: React.ElementType
148-
>(
149-
parentComponent: React.Component<any, any>,
150-
nextElement: React.MixedElement,
151-
container: any,
152-
callback?: () => void
153-
): React.ElementRef<ElementType>;
154124
}
155125

156126
declare module 'react-dom/client' {
@@ -216,83 +186,3 @@ declare module 'react-dom/server' {
216186
element: React.Node
217187
): stream$Readable;
218188
}
219-
220-
declare module 'react-dom/test-utils' {
221-
import * as React from 'react';
222-
223-
declare interface Thenable {
224-
then(resolve: () => mixed, reject?: () => mixed): mixed,
225-
}
226-
227-
declare var Simulate: {
228-
[eventName: string]: (
229-
element: Element,
230-
eventData?: { [key: string]: mixed, ... }
231-
) => void,
232-
...
233-
};
234-
235-
declare function renderIntoDocument(
236-
instance: React.MixedElement
237-
): React.Component<any, any>;
238-
239-
declare function mockComponent(
240-
componentClass: React.ElementType,
241-
mockTagName?: string
242-
): { [key: string]: mixed, ... };
243-
244-
declare function isElement(element: React.MixedElement): boolean;
245-
246-
declare function isElementOfType(
247-
element: React.MixedElement,
248-
componentClass: React.ElementType
249-
): boolean;
250-
251-
declare function isDOMComponent(instance: any): boolean;
252-
253-
declare function isCompositeComponent(
254-
instance: React.Component<any, any>
255-
): boolean;
256-
257-
declare function isCompositeComponentWithType(
258-
instance: React.Component<any, any>,
259-
componentClass: React.ElementType
260-
): boolean;
261-
262-
declare function findAllInRenderedTree(
263-
tree: React.Component<any, any>,
264-
test: (child: React.Component<any, any>) => boolean
265-
): Array<React.Component<any, any>>;
266-
267-
declare function scryRenderedDOMComponentsWithClass(
268-
tree: React.Component<any, any>,
269-
className: string
270-
): Array<Element>;
271-
272-
declare function findRenderedDOMComponentWithClass(
273-
tree: React.Component<any, any>,
274-
className: string
275-
): ?Element;
276-
277-
declare function scryRenderedDOMComponentsWithTag(
278-
tree: React.Component<any, any>,
279-
tagName: string
280-
): Array<Element>;
281-
282-
declare function findRenderedDOMComponentWithTag(
283-
tree: React.Component<any, any>,
284-
tagName: string
285-
): ?Element;
286-
287-
declare function scryRenderedComponentsWithType(
288-
tree: React.Component<any, any>,
289-
componentClass: React.ElementType
290-
): Array<React.Component<any, any>>;
291-
292-
declare function findRenderedComponentWithType(
293-
tree: React.Component<any, any>,
294-
componentClass: React.ElementType
295-
): ?React.Component<any, any>;
296-
297-
declare function act(callback: () => void | Thenable): Thenable;
298-
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
"pg-cursor": "2.11.0",
5555
"po2json": "https://github.com/metabrainz/po2json.git#905dd32b286c80b973ca3c7c27f31d0ef1f4e65b",
5656
"punycode": "2.3.1",
57-
"react": "18.3.1",
58-
"react-dom": "18.3.1",
57+
"react": "19.1.1",
58+
"react-dom": "19.1.1",
5959
"react-table": "7.8.0",
6060
"redux": "4.2.1",
6161
"shell-quote": "1.8.3",

yarn.lock

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7351,7 +7351,7 @@ __metadata:
73517351
languageName: node
73527352
linkType: hard
73537353

7354-
"loose-envify@npm:^1.1.0, loose-envify@npm:^1.4.0":
7354+
"loose-envify@npm:^1.4.0":
73557355
version: 1.4.0
73567356
resolution: "loose-envify@npm:1.4.0"
73577357
dependencies:
@@ -7797,8 +7797,8 @@ __metadata:
77977797
po2json: "https://github.com/metabrainz/po2json.git#905dd32b286c80b973ca3c7c27f31d0ef1f4e65b"
77987798
process: "npm:0.11.10"
77997799
punycode: "npm:2.3.1"
7800-
react: "npm:18.3.1"
7801-
react-dom: "npm:18.3.1"
7800+
react: "npm:19.1.1"
7801+
react-dom: "npm:19.1.1"
78027802
react-is: "npm:18.3.1"
78037803
react-table: "npm:7.8.0"
78047804
redux: "npm:4.2.1"
@@ -8814,15 +8814,14 @@ __metadata:
88148814
languageName: node
88158815
linkType: hard
88168816

8817-
"react-dom@npm:18.3.1":
8818-
version: 18.3.1
8819-
resolution: "react-dom@npm:18.3.1"
8817+
"react-dom@npm:19.1.1":
8818+
version: 19.1.1
8819+
resolution: "react-dom@npm:19.1.1"
88208820
dependencies:
8821-
loose-envify: "npm:^1.1.0"
8822-
scheduler: "npm:^0.23.2"
8821+
scheduler: "npm:^0.26.0"
88238822
peerDependencies:
8824-
react: ^18.3.1
8825-
checksum: 10c0/a752496c1941f958f2e8ac56239172296fcddce1365ce45222d04a1947e0cc5547df3e8447f855a81d6d39f008d7c32eab43db3712077f09e3f67c4874973e85
8823+
react: ^19.1.1
8824+
checksum: 10c0/8c91198510521299c56e4e8d5e3a4508b2734fb5e52f29eeac33811de64e76fe586ad32c32182e2e84e070d98df67125da346c3360013357228172dbcd20bcdd
88268825
languageName: node
88278826
linkType: hard
88288827

@@ -8849,12 +8848,10 @@ __metadata:
88498848
languageName: node
88508849
linkType: hard
88518850

8852-
"react@npm:18.3.1":
8853-
version: 18.3.1
8854-
resolution: "react@npm:18.3.1"
8855-
dependencies:
8856-
loose-envify: "npm:^1.1.0"
8857-
checksum: 10c0/283e8c5efcf37802c9d1ce767f302dd569dd97a70d9bb8c7be79a789b9902451e0d16334b05d73299b20f048cbc3c7d288bbbde10b701fa194e2089c237dbea3
8851+
"react@npm:19.1.1":
8852+
version: 19.1.1
8853+
resolution: "react@npm:19.1.1"
8854+
checksum: 10c0/8c9769a2dfd02e603af6445058325e6c8a24b47b185d0e461f66a6454765ddcaecb3f0a90184836c68bb509f3c38248359edbc42f0d07c23eb500a5c30c87b4e
88588855
languageName: node
88598856
linkType: hard
88608857

@@ -9420,12 +9417,10 @@ __metadata:
94209417
languageName: node
94219418
linkType: hard
94229419

9423-
"scheduler@npm:^0.23.2":
9424-
version: 0.23.2
9425-
resolution: "scheduler@npm:0.23.2"
9426-
dependencies:
9427-
loose-envify: "npm:^1.1.0"
9428-
checksum: 10c0/26383305e249651d4c58e6705d5f8425f153211aef95f15161c151f7b8de885f24751b377e4a0b3dd42cce09aad3f87a61dab7636859c0d89b7daf1a1e2a5c78
9420+
"scheduler@npm:^0.26.0":
9421+
version: 0.26.0
9422+
resolution: "scheduler@npm:0.26.0"
9423+
checksum: 10c0/5b8d5bfddaae3513410eda54f2268e98a376a429931921a81b5c3a2873aab7ca4d775a8caac5498f8cbc7d0daeab947cf923dbd8e215d61671f9f4e392d34356
94299424
languageName: node
94309425
linkType: hard
94319426

0 commit comments

Comments
 (0)