diff --git a/package.json b/package.json index 23d7e9cba6..526184c109 100644 --- a/package.json +++ b/package.json @@ -101,8 +101,8 @@ "photon-colors": "^3.3.2", "protobufjs": "^8.4.2", "query-string": "^9.3.1", - "react": "^18.3.1", - "react-dom": "^18.3.1", + "react": "^19.2.6", + "react-dom": "^19.2.6", "react-intersection-observer": "^10.0.3", "react-redux": "^9.3.0", "redux": "^5.0.1", @@ -129,8 +129,8 @@ "@types/minimist": "^1.2.5", "@types/node": "^22.19.19", "@types/query-string": "^6.3.0", - "@types/react": "^18.3.29", - "@types/react-dom": "^18.3.1", + "@types/react": "^19.2.15", + "@types/react-dom": "^19.2.3", "@types/redux-logger": "^3.0.6", "@types/tgwf__co2": "^0.14.2", "@typescript-eslint/eslint-plugin": "^8.59.1", diff --git a/src/components/app/ZipFileViewer.tsx b/src/components/app/ZipFileViewer.tsx index 829ef01a44..dd95444f38 100644 --- a/src/components/app/ZipFileViewer.tsx +++ b/src/components/app/ZipFileViewer.tsx @@ -122,8 +122,9 @@ class ZipFileViewerImpl extends React.PureComponent { _fixedColumns = []; _mainColumn = { propName: 'name', titleL10nId: '', component: ZipFileRow }; _treeView: TreeView | null = null; - _takeTreeViewRef = (treeView: TreeView | null) => - (this._treeView = treeView); + _takeTreeViewRef = (treeView: TreeView | null) => { + this._treeView = treeView; + }; constructor(props: Props) { super(props); diff --git a/src/components/calltree/CallTree.tsx b/src/components/calltree/CallTree.tsx index e593b01644..a8e4742c61 100644 --- a/src/components/calltree/CallTree.tsx +++ b/src/components/calltree/CallTree.tsx @@ -95,8 +95,9 @@ class CallTreeImpl extends PureComponent { titleL10nId: '', }; _treeView: TreeView | null = null; - _takeTreeViewRef = (treeView: TreeView | null) => - (this._treeView = treeView); + _takeTreeViewRef = (treeView: TreeView | null) => { + this._treeView = treeView; + }; /** * Call Trees can have different types of "weights" for the data. Choose the diff --git a/src/components/flame-graph/MaybeFlameGraph.tsx b/src/components/flame-graph/MaybeFlameGraph.tsx index ef281aa4c5..5dd0f0f227 100644 --- a/src/components/flame-graph/MaybeFlameGraph.tsx +++ b/src/components/flame-graph/MaybeFlameGraph.tsx @@ -28,7 +28,7 @@ type DispatchProps = { type Props = ConnectedProps<{}, StateProps, DispatchProps>; class MaybeFlameGraphImpl extends React.PureComponent { - _flameGraph: React.RefObject = React.createRef(); + _flameGraph: React.RefObject = React.createRef(); _onSwitchToNormalCallstackClick = () => { this.props.changeInvertCallstack(false); diff --git a/src/components/marker-table/index.tsx b/src/components/marker-table/index.tsx index 2ecaad7e11..f5057da0b2 100644 --- a/src/components/marker-table/index.tsx +++ b/src/components/marker-table/index.tsx @@ -276,8 +276,9 @@ class MarkerTableImpl extends PureComponent { _expandedNodeIds: Array = []; _onExpandedNodeIdsChange = () => {}; _treeView: TreeView | null = null; - _takeTreeViewRef = (treeView: TreeView | null) => - (this._treeView = treeView); + _takeTreeViewRef = (treeView: TreeView | null) => { + this._treeView = treeView; + }; getMarkerTree = memoize( ( diff --git a/src/components/shared/IdleSearchField.tsx b/src/components/shared/IdleSearchField.tsx index f5207c3488..6df08478d5 100644 --- a/src/components/shared/IdleSearchField.tsx +++ b/src/components/shared/IdleSearchField.tsx @@ -26,7 +26,9 @@ export class IdleSearchField extends PureComponent { _timeout: NodeJS.Timeout | null = null; _previouslyNotifiedValue: string; _input: HTMLInputElement | null = null; - _takeInputRef = (input: HTMLInputElement | null) => (this._input = input); + _takeInputRef = (input: HTMLInputElement | null) => { + this._input = input; + }; constructor(props: Props) { super(props); diff --git a/src/components/shared/TreeView.tsx b/src/components/shared/TreeView.tsx index a6eb6e374d..c1505e1472 100644 --- a/src/components/shared/TreeView.tsx +++ b/src/components/shared/TreeView.tsx @@ -476,7 +476,9 @@ export class TreeView< DisplayData extends Record, > extends React.PureComponent, TreeViewState> { _list: VirtualList | null = null; - _takeListRef = (list: VirtualList | null) => (this._list = list); + _takeListRef = (list: VirtualList | null) => { + this._list = list; + }; // This contains the information about the current column resizing happening currently. _currentMovedColumnState: { diff --git a/src/components/shared/thread/HeightGraph.tsx b/src/components/shared/thread/HeightGraph.tsx index 25b75dc4ac..29a1c57926 100644 --- a/src/components/shared/thread/HeightGraph.tsx +++ b/src/components/shared/thread/HeightGraph.tsx @@ -38,8 +38,9 @@ type Props = { export class ThreadHeightGraph extends PureComponent { _canvas: null | HTMLCanvasElement = null; - _takeCanvasRef = (canvas: HTMLCanvasElement | null) => - (this._canvas = canvas); + _takeCanvasRef = (canvas: HTMLCanvasElement | null) => { + this._canvas = canvas; + }; _resizeListener = () => this.forceUpdate(); _renderCanvas() { diff --git a/src/components/shared/thread/SampleGraph.tsx b/src/components/shared/thread/SampleGraph.tsx index 7790794440..344b006d46 100644 --- a/src/components/shared/thread/SampleGraph.tsx +++ b/src/components/shared/thread/SampleGraph.tsx @@ -77,8 +77,9 @@ type CanvasProps = { */ class ThreadSampleGraphCanvas extends React.PureComponent { _canvas: null | HTMLCanvasElement = null; - _takeCanvasRef = (canvas: HTMLCanvasElement | null) => - (this._canvas = canvas); + _takeCanvasRef = (canvas: HTMLCanvasElement | null) => { + this._canvas = canvas; + }; _canvasState: { renderScheduled: boolean; inView: boolean } = { renderScheduled: false, inView: false, diff --git a/src/test/components/ErrorBoundary.test.tsx b/src/test/components/ErrorBoundary.test.tsx index f90d5b2379..b3f04f7e3d 100644 --- a/src/test/components/ErrorBoundary.test.tsx +++ b/src/test/components/ErrorBoundary.test.tsx @@ -62,7 +62,7 @@ describe('app/NonLocalizedErrorBoundary', function () { at ThrowingComponent \\(.*[/\\\\]ErrorBoundary.test.tsx:.*\\) at ErrorBoundaryInternal \\(.*[/\\\\]ErrorBoundary.tsx:.*\\) - at NonLocalizedErrorBoundary + at NonLocalizedErrorBoundary( \\(.*\\))? at LocalizationProvider \\(.*[/\\\\]@fluent[/\\\\]react[/\\\\]index.js:.*\\) `) ), diff --git a/src/test/components/__snapshots__/Home.test.tsx.snap b/src/test/components/__snapshots__/Home.test.tsx.snap index 11f8ccb4c8..6277503f86 100644 --- a/src/test/components/__snapshots__/Home.test.tsx.snap +++ b/src/test/components/__snapshots__/Home.test.tsx.snap @@ -251,7 +251,6 @@ own importer @@ -574,7 +573,6 @@ own importer @@ -837,7 +835,6 @@ own importer @@ -1100,7 +1097,6 @@ own importer diff --git a/yarn.lock b/yarn.lock index 9aadcec184..bd3d5f8ea9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2529,11 +2529,6 @@ resolved "https://registry.yarnpkg.com/@types/parse5/-/parse5-6.0.3.tgz#705bb349e789efa06f43f128cef51240753424cb" integrity sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g== -"@types/prop-types@*": - version "15.7.15" - resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.15.tgz#e6e5a86d602beaca71ce5163fadf5f95d70931c7" - integrity sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw== - "@types/query-string@^6.3.0": version "6.3.0" resolved "https://registry.yarnpkg.com/@types/query-string/-/query-string-6.3.0.tgz#b6fa172a01405abcaedac681118e78429d62ea39" @@ -2541,17 +2536,16 @@ dependencies: query-string "*" -"@types/react-dom@^18.3.1": - version "18.3.7" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.3.7.tgz#b89ddf2cd83b4feafcc4e2ea41afdfb95a0d194f" - integrity sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ== +"@types/react-dom@^19.2.3": + version "19.2.3" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-19.2.3.tgz#c1e305d15a52a3e508d54dca770d202cb63abf2c" + integrity sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ== -"@types/react@^18.3.29": - version "18.3.29" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.29.tgz#7f3b6e1515499d4fd199cc8fd4710114be36c1a2" - integrity sha512-ch0qJdr2JY0r04NXSprbK6TXOgnaJ1Tz23fm5W+z0/CBah6BSBc3n96h7K9GOtwh0HrilNWHIBzE1Ko4Dcw/Wg== +"@types/react@^19.2.15": + version "19.2.15" + resolved "https://registry.yarnpkg.com/@types/react/-/react-19.2.15.tgz#9e2c6a4251a290f5c525c3143caa872fa6e01e0d" + integrity sha512-eRwcGNHve+E8qtEQSSRl6urh+rFop4v8gm6O8rGv25CodbvFdLjA1vVQ1KkiFE0w0UPOnb8tDiFKL5lp0rtY5Q== dependencies: - "@types/prop-types" "*" csstype "^3.2.2" "@types/redux-logger@^3.0.6": @@ -9329,13 +9323,12 @@ react-dom@^16.8.6: prop-types "^15.6.2" scheduler "^0.19.1" -react-dom@^18.3.1: - version "18.3.1" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.3.1.tgz#c2265d79511b57d479b3dd3fdfa51536494c5cb4" - integrity sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw== +react-dom@^19.2.6: + version "19.2.6" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-19.2.6.tgz#44a81b0bcca22da814c00847d09d01c8615529b7" + integrity sha512-0prMI+hvBbPjsWnxDLxlCGyM8PN6UuWjEUCYmZhO67xIV9Xasa/r/vDnq+Xyq4Lo27g8QSbO5YzARu0D1Sps3g== dependencies: - loose-envify "^1.1.0" - scheduler "^0.23.2" + scheduler "^0.27.0" react-intersection-observer@^10.0.3: version "10.0.3" @@ -9379,12 +9372,10 @@ react@^16.8.6: object-assign "^4.1.1" prop-types "^15.6.2" -react@^18.3.1: - version "18.3.1" - resolved "https://registry.yarnpkg.com/react/-/react-18.3.1.tgz#49ab892009c53933625bd16b2533fc754cab2891" - integrity sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ== - dependencies: - loose-envify "^1.1.0" +react@^19.2.6: + version "19.2.6" + resolved "https://registry.yarnpkg.com/react/-/react-19.2.6.tgz#3dadb8e12b2a7934c1d5317973e5dce1301f9a4d" + integrity sha512-sfWGGfavi0xr8Pg0sVsyHMAOziVYKgPLNrS7ig+ivMNb3wbCBw3KxtflsGBAwD3gYQlE/AEZsTLgToRrSCjb0Q== read-installed@~4.0.3: version "4.0.3" @@ -9993,12 +9984,10 @@ scheduler@^0.19.1: loose-envify "^1.1.0" object-assign "^4.1.1" -scheduler@^0.23.2: - version "0.23.2" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.2.tgz#414ba64a3b282892e944cf2108ecc078d115cdc3" - integrity sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ== - dependencies: - loose-envify "^1.1.0" +scheduler@^0.27.0: + version "0.27.0" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.27.0.tgz#0c4ef82d67d1e5c1e359e8fc76d3a87f045fe5bd" + integrity sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q== semver-compare@^1.0.0: version "1.0.0"