Skip to content

Commit d14b05a

Browse files
renovate[bot]gjong
andauthored
Update react monorepo to v19 (major) (#141)
* Update react monorepo to v19 * Fix issues in the build post upgrade of react. --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Gerben Jongerius <g.jongerius@jong-soft.com>
1 parent d6b60fc commit d14b05a

File tree

8 files changed

+32
-63
lines changed

8 files changed

+32
-63
lines changed

package.json

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,31 @@
1212
"chartjs-adapter-spacetime": "^1.0.1",
1313
"cra-template": "1.2.0",
1414
"jwt-decode": "^4.0.0",
15-
"react": "^18.3.1",
15+
"react": "^19.0.0",
1616
"react-chartjs-2": "^5.3.0",
1717
"react-datepicker": "^7.5.0",
18-
"react-dom": "^18.3.1",
18+
"react-dom": "^19.0.0",
1919
"react-hook-form": "^7.53.1",
2020
"react-router-dom": "^6.28.0",
2121
"react-scripts": "5.0.1",
2222
"spacetime": "^7.6.2"
2323
},
2424
"devDependencies": {
2525
"@stylistic/eslint-plugin": "^2.3.0",
26-
"@testing-library/jest-dom": "^6.4.6",
2726
"@testing-library/dom": "^10.2.0",
27+
"@testing-library/jest-dom": "^6.4.6",
2828
"@testing-library/react": "^16.0.0",
2929
"@testing-library/user-event": "^14.5.2",
30-
"@types/react": "^18.3.12",
3130
"@types/jest": "^29.5.14",
32-
"typescript-eslint": "8.19.0",
31+
"@types/react": "^19.0.0",
3332
"eslint": "^9.14.0",
3433
"jest": "^29.7.0",
3534
"prop-types": "^15.8.1",
3635
"sass": "^1.83.0",
3736
"tailwindcss": "^3.4.14",
3837
"ts-jest": "^29.2.5",
3938
"typescript": "^5.6.3",
39+
"typescript-eslint": "8.19.0",
4040
"web-vitals": "^4.2.4"
4141
},
4242
"scripts": {
@@ -61,14 +61,12 @@
6161
},
6262
"browserslist": {
6363
"production": [
64-
">0.2%",
65-
"not dead",
66-
"not op_mini all"
64+
"last 1 version",
65+
"> 1%",
66+
"not dead"
6767
],
6868
"development": [
69-
"last 1 chrome version",
70-
"last 1 firefox version",
71-
"last 1 safari version"
69+
"last 1 version"
7270
]
7371
},
7472
"packageManager": "yarn@1.22.22"

src/components/form/input/ToggleInput.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React from "react";
22
import { useInputField } from "./InputGroup";
3-
import PropTypes from "prop-types";
43

54
type ToggleInputProps = {
65
id: string,
@@ -35,10 +34,3 @@ export const ToggleInput = (props: ToggleInputProps) => {
3534
</div>
3635
)
3736
}
38-
ToggleInput.propTypes = {
39-
id: PropTypes.string,
40-
onChange: PropTypes.func,
41-
value: PropTypes.bool,
42-
className: PropTypes.string
43-
}
44-

src/components/layout/card.component.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ type CardProps = Attributes & {
1515
/**
1616
* A basic card that has borders, an optional title bar and options to add buttons to the header and footer.
1717
*
18-
* @returns {JSX.Element}
1918
* @constructor
2019
*/
21-
const Card: FC<CardProps> = ({ title, actions, buttons, children, className = '', message }): JSX.Element => {
20+
const Card: FC<CardProps> = ({ title, actions, buttons, children, className = '', message }) => {
2221
const hasHeader = (title || actions || message) !== undefined
2322

2423
return (

src/components/layout/popup/confirm.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const ConfirmComponent = (props: ConfirmProps) => {
2424
const onCloseClick = () => dialogRef.current?.close()
2525

2626
return <>
27-
<Button { ...openButton.props } onClick={ onOpenClick }/>
27+
<Button { ...(openButton.props as any) } onClick={ onOpenClick }/>
2828
<Popup ref={ dialogRef }
2929
{ ...props }
3030
actions={ [

src/components/layout/popup/dialog.component.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { mdiCancel } from "@mdi/js";
2-
import { LegacyRef, ReactElement, useEffect, useRef } from "react";
2+
import {LegacyRef, ReactElement, Ref, useEffect, useRef} from "react";
33
import { Button } from "../button";
44

55
import Popup, { PopupCallbacks, PopupProps } from "./popup.component";
@@ -13,7 +13,7 @@ type DialogProps = PopupProps & {
1313
}
1414

1515
export const Dialog = ({ control, openButton, title, actions = [], className = '', children }: DialogProps) => {
16-
const dialogRef: LegacyRef<PopupCallbacks> = useRef(null)
16+
const dialogRef: Ref<PopupCallbacks> = useRef(null)
1717

1818
useEffect(() => {
1919
if (control) {
@@ -32,7 +32,7 @@ export const Dialog = ({ control, openButton, title, actions = [], className = '
3232
icon={ mdiCancel }/>]
3333

3434
return <>
35-
{ openButton && <Button { ...openButton.props } onClick={ open }/> }
35+
{ openButton && <Button { ...(openButton.props as any) } onClick={ open }/> }
3636
<Popup title={ title }
3737
className={ className }
3838
ref={ dialogRef }

src/pages/account/default/index.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { mdiDotsVertical, mdiPlus, mdiSquareEditOutline, mdiTrashCanOutline } from "@mdi/js";
2-
import PropTypes from "prop-types";
32
import React, { Attributes, useEffect, useState } from "react";
43
import { NavLink, useRouteLoaderData } from "react-router-dom";
54
import BalanceComponent from "../../../components/balance.component";
@@ -73,10 +72,6 @@ const AccountRow = ({ account, deleteCallback }: AccountRowProps) => {
7372
</tr>
7473
)
7574
}
76-
AccountRow.propTypes = {
77-
account: EntityShapes.Account,
78-
deleteCallback: PropTypes.func.isRequired
79-
}
8075

8176
const AccountOverview = () => {
8277
const [accounts, setAccounts] = useState<Account[] | undefined>(undefined)

src/pages/setting/currency/index.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { mdiPlus, mdiSquareEditOutline } from "@mdi/js";
2-
import PropTypes from "prop-types";
32
import React, { useEffect, useState } from "react";
43
import BreadCrumbItem from "../../../components/breadcrumb/breadcrumb-item.component";
54
import BreadCrumbs from "../../../components/breadcrumb/breadcrumb.component";
@@ -37,9 +36,6 @@ const CurrencyRow = ({ currency }: { currency: Currency }) => {
3736
</tr>
3837
)
3938
}
40-
CurrencyRow.propTypes = {
41-
currency: PropTypes.any
42-
}
4339

4440
const _ = () => {
4541
const [currencies, setCurrencies] = useState<Currency[]>([])

yarn.lock

Lines changed: 18 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2574,11 +2574,6 @@
25742574
resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.3.tgz#3e51a17e291d01d17d3fc61422015a933af7a08f"
25752575
integrity sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==
25762576

2577-
"@types/prop-types@*":
2578-
version "15.7.14"
2579-
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.14.tgz#1433419d73b2a7ebfc6918dcefd2ec0d5cd698f2"
2580-
integrity sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ==
2581-
25822577
"@types/q@^1.5.1":
25832578
version "1.5.8"
25842579
resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.8.tgz#95f6c6a08f2ad868ba230ead1d2d7f7be3db3837"
@@ -2594,12 +2589,11 @@
25942589
resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.7.tgz#50ae4353eaaddc04044279812f52c8c65857dbcb"
25952590
integrity sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==
25962591

2597-
"@types/react@^18.3.12":
2598-
version "18.3.18"
2599-
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.18.tgz#9b382c4cd32e13e463f97df07c2ee3bbcd26904b"
2600-
integrity sha512-t4yC+vtgnkYjNSKlFx1jkAhH8LgTo2N/7Qvi83kdEaUtMDiwpbLAktKDaAMlRcJ5eSxZkH74eEGt1ky31d7kfQ==
2592+
"@types/react@^19.0.0":
2593+
version "19.0.2"
2594+
resolved "https://registry.yarnpkg.com/@types/react/-/react-19.0.2.tgz#9363e6b3ef898c471cb182dd269decc4afc1b4f6"
2595+
integrity sha512-USU8ZI/xyKJwFTpjSVIrSeHBVAGagkHQKPNbxeWwql/vDmnTIBgx+TJnhFnj1NXgz8XfprU0egV2dROLGpsBEg==
26012596
dependencies:
2602-
"@types/prop-types" "*"
26032597
csstype "^3.0.2"
26042598

26052599
"@types/resolve@1.17.1":
@@ -7609,7 +7603,7 @@ lodash@^4.17.20, lodash@^4.17.21, lodash@^4.7.0:
76097603
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
76107604
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
76117605

7612-
loose-envify@^1.1.0, loose-envify@^1.4.0:
7606+
loose-envify@^1.4.0:
76137607
version "1.4.0"
76147608
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
76157609
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
@@ -9072,13 +9066,12 @@ react-dev-utils@^12.0.1:
90729066
strip-ansi "^6.0.1"
90739067
text-table "^0.2.0"
90749068

9075-
react-dom@^18.3.1:
9076-
version "18.3.1"
9077-
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.3.1.tgz#c2265d79511b57d479b3dd3fdfa51536494c5cb4"
9078-
integrity sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==
9069+
react-dom@^19.0.0:
9070+
version "19.0.0"
9071+
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-19.0.0.tgz#43446f1f01c65a4cd7f7588083e686a6726cfb57"
9072+
integrity sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==
90799073
dependencies:
9080-
loose-envify "^1.1.0"
9081-
scheduler "^0.23.2"
9074+
scheduler "^0.25.0"
90829075

90839076
react-error-overlay@^6.0.11:
90849077
version "6.0.11"
@@ -9180,12 +9173,10 @@ react-scripts@5.0.1:
91809173
optionalDependencies:
91819174
fsevents "^2.3.2"
91829175

9183-
react@^18.3.1:
9184-
version "18.3.1"
9185-
resolved "https://registry.yarnpkg.com/react/-/react-18.3.1.tgz#49ab892009c53933625bd16b2533fc754cab2891"
9186-
integrity sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==
9187-
dependencies:
9188-
loose-envify "^1.1.0"
9176+
react@^19.0.0:
9177+
version "19.0.0"
9178+
resolved "https://registry.yarnpkg.com/react/-/react-19.0.0.tgz#6e1969251b9f108870aa4bff37a0ce9ddfaaabdd"
9179+
integrity sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==
91899180

91909181
read-cache@^1.0.0:
91919182
version "1.0.0"
@@ -9526,12 +9517,10 @@ saxes@^5.0.1:
95269517
dependencies:
95279518
xmlchars "^2.2.0"
95289519

9529-
scheduler@^0.23.2:
9530-
version "0.23.2"
9531-
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.2.tgz#414ba64a3b282892e944cf2108ecc078d115cdc3"
9532-
integrity sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==
9533-
dependencies:
9534-
loose-envify "^1.1.0"
9520+
scheduler@^0.25.0:
9521+
version "0.25.0"
9522+
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.25.0.tgz#336cd9768e8cceebf52d3c80e3dcf5de23e7e015"
9523+
integrity sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==
95359524

95369525
schema-utils@2.7.0:
95379526
version "2.7.0"

0 commit comments

Comments
 (0)