Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade react version from 18 to 19 #63

Merged
merged 2 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs",
"import": "./dist/index.js",
"source": "./src/index.ts",
"default": "./dist/index.js"
},
"./package.json": "./package.json"
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
Comment on lines -28 to +36
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you know why these changes are needed? the previous values match what we have in the monorepo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to run the build script with no success, with this error message
`when I run yarn build I have these errors

[ERROR]

  • package.json with 'type: "module"' - 'exports["."].require' must end with ".cjs"
  • package.json with 'type: "module"' - 'exports["."].import' must end with ".js"`
    So I followed the error message and fixed the extensions

"source": "./src/index.ts",
"types": "./dist/index.d.ts",
"files": [
Expand All @@ -59,10 +59,10 @@
"@swc/core": "^1.3.93",
"@swc/jest": "^0.2.29",
"@testing-library/jest-dom": "^6.1.4",
"@testing-library/react": "^14.0.0",
"@testing-library/react": "^16.0.0",
"@types/jest": "^29.5.5",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/react": "^18.0.0 || ^19.0.0",
"@types/react-dom": "^18.0.0 || ^19.0.0",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"eslint": "^8.52.0",
Expand All @@ -81,14 +81,14 @@
"lint-staged": "^15.0.1",
"pinst": "^3.0.0",
"prettier": "^3.0.3",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react": "^18.0.0 || ^19.0.0",
"react-dom": "^18.0.0 || ^19.0.0",
"rollup-plugin-preserve-directives": "^0.2.0",
"typescript": "^5.2.2"
},
"peerDependencies": {
"react": "^18.0.0",
"react-dom": "^18.0.0"
"react": "^18.0.0 || ^19.0.0",
"react-dom": "^18.0.0 || ^19.0.0"
},
"packageManager": "[email protected]",
"resolutions": {
Expand Down
123 changes: 46 additions & 77 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1322,10 +1322,10 @@ __metadata:
"@swc/core": ^1.3.93
"@swc/jest": ^0.2.29
"@testing-library/jest-dom": ^6.1.4
"@testing-library/react": ^14.0.0
"@testing-library/react": ^16.0.0
"@types/jest": ^29.5.5
"@types/react": ^18.0.0
"@types/react-dom": ^18.0.0
"@types/react": ^18.0.0 || ^19.0.0
"@types/react-dom": ^18.0.0 || ^19.0.0
"@typescript-eslint/eslint-plugin": ^6.9.0
"@typescript-eslint/parser": ^6.9.0
eslint: ^8.52.0
Expand All @@ -1344,13 +1344,13 @@ __metadata:
lint-staged: ^15.0.1
pinst: ^3.0.0
prettier: ^3.0.3
react: ^18.0.0
react-dom: ^18.0.0
react: ^18.0.0 || ^19.0.0
react-dom: ^18.0.0 || ^19.0.0
rollup-plugin-preserve-directives: ^0.2.0
typescript: ^5.2.2
peerDependencies:
react: ^18.0.0
react-dom: ^18.0.0
react: ^18.0.0 || ^19.0.0
react-dom: ^18.0.0 || ^19.0.0
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -1574,22 +1574,6 @@ __metadata:
languageName: node
linkType: hard

"@testing-library/dom@npm:^9.0.0":
version: 9.3.3
resolution: "@testing-library/dom@npm:9.3.3"
dependencies:
"@babel/code-frame": ^7.10.4
"@babel/runtime": ^7.12.5
"@types/aria-query": ^5.0.1
aria-query: 5.1.3
chalk: ^4.1.0
dom-accessibility-api: ^0.5.9
lz-string: ^1.5.0
pretty-format: ^27.0.2
checksum: 34e0a564da7beb92aa9cc44a9080221e2412b1a132eb37be3d513fe6c58027674868deb9f86195756d98d15ba969a30fe00632a4e26e25df2a5a4f6ac0686e37
languageName: node
linkType: hard

"@testing-library/jest-dom@npm:^6.1.4":
version: 6.1.4
resolution: "@testing-library/jest-dom@npm:6.1.4"
Expand Down Expand Up @@ -1620,17 +1604,23 @@ __metadata:
languageName: node
linkType: hard

"@testing-library/react@npm:^14.0.0":
version: 14.0.0
resolution: "@testing-library/react@npm:14.0.0"
"@testing-library/react@npm:^16.0.0":
version: 16.2.0
resolution: "@testing-library/react@npm:16.2.0"
dependencies:
"@babel/runtime": ^7.12.5
"@testing-library/dom": ^9.0.0
"@types/react-dom": ^18.0.0
peerDependencies:
react: ^18.0.0
react-dom: ^18.0.0
checksum: 4a54c8f56cc4a39b50803205f84f06280bb76521d6d5d4b3b36651d760c7c7752ef142d857d52aaf4fad4848ed7a8be49afc793a5dda105955d2f8bef24901ac
"@testing-library/dom": ^10.0.0
"@types/react": ^18.0.0 || ^19.0.0
"@types/react-dom": ^18.0.0 || ^19.0.0
react: ^18.0.0 || ^19.0.0
react-dom: ^18.0.0 || ^19.0.0
peerDependenciesMeta:
"@types/react":
optional: true
"@types/react-dom":
optional: true
checksum: 4a687200e4d5dc7c7bd83c01f847a26e2c78f08acf54e5dbde8132969221401c6c595f624f5bd47e758346edc5f516d0bb07bffaae8a2e149910343eed4ae39f
languageName: node
linkType: hard

Expand Down Expand Up @@ -1774,37 +1764,21 @@ __metadata:
languageName: node
linkType: hard

"@types/prop-types@npm:*":
version: 15.7.8
resolution: "@types/prop-types@npm:15.7.8"
checksum: 61dfad79da8b1081c450bab83b77935df487ae1cdd4660ec7df6be8e74725c15fa45cf486ce057addc956ca4ae78300b97091e2a25061133d1b9a1440bc896ae
languageName: node
linkType: hard

"@types/react-dom@npm:^18.0.0":
version: 18.2.13
resolution: "@types/react-dom@npm:18.2.13"
dependencies:
"@types/react": "*"
checksum: 22ba066b141dca5a5a9227fae0afc7c94b470fff8e8a38ade72649da57a8ea04d0cb2ba3e22005e7d8e772d49bddd28855b1dd98e6defd033bba6afb6edff883
"@types/react-dom@npm:^18.0.0 || ^19.0.0":
version: 19.0.3
resolution: "@types/react-dom@npm:19.0.3"
peerDependencies:
"@types/react": ^19.0.0
checksum: a253931fc3a41a74ef99a7380fa3fa02b94ddd1addba9fc0aea39c90ce3dfb22d60fbac292669de224b1ffb23836cde3cc78c2425f0c77593435b6368a9fd2ed
languageName: node
linkType: hard

"@types/react@npm:*, @types/react@npm:^18.0.0":
version: 18.2.28
resolution: "@types/react@npm:18.2.28"
"@types/react@npm:^18.0.0 || ^19.0.0":
version: 19.0.8
resolution: "@types/react@npm:19.0.8"
dependencies:
"@types/prop-types": "*"
"@types/scheduler": "*"
csstype: ^3.0.2
checksum: 81381bedeba83278f4c9febb0b83e0bd3f42a25897a50b9cb36ef53651d34b3d50f87ebf11211ea57ea575131f85d31e93e496ce46478a00b0f9bf7b26b5917a
languageName: node
linkType: hard

"@types/scheduler@npm:*":
version: 0.16.4
resolution: "@types/scheduler@npm:0.16.4"
checksum: a57b0f10da1b021e6bd5eeef8a1917dd3b08a8715bd8029e2ded2096d8f091bb1bb1fef2d66e139588a983c4bfbad29b59e48011141725fa83c76e986e1257d7
checksum: 80dd2e7fa4b3e0ea2d883c21317563f4af1c4d90a6250c8bcbc052079304dc3335369267026004ed5d7cac09c7b0026e02e71ae5cca3150643507e353219fe47
languageName: node
linkType: hard

Expand Down Expand Up @@ -6446,7 +6420,7 @@ __metadata:
languageName: node
linkType: hard

"loose-envify@npm:^1.1.0, loose-envify@npm:^1.4.0":
"loose-envify@npm:^1.4.0":
version: 1.4.0
resolution: "loose-envify@npm:1.4.0"
dependencies:
Expand Down Expand Up @@ -7489,15 +7463,14 @@ __metadata:
languageName: node
linkType: hard

"react-dom@npm:^18.0.0":
version: 18.2.0
resolution: "react-dom@npm:18.2.0"
"react-dom@npm:^18.0.0 || ^19.0.0":
version: 19.0.0
resolution: "react-dom@npm:19.0.0"
dependencies:
loose-envify: ^1.1.0
scheduler: ^0.23.0
scheduler: ^0.25.0
peerDependencies:
react: ^18.2.0
checksum: 7d323310bea3a91be2965f9468d552f201b1c27891e45ddc2d6b8f717680c95a75ae0bc1e3f5cf41472446a2589a75aed4483aee8169287909fcd59ad149e8cc
react: ^19.0.0
checksum: 009cc6e575263a0d1906f9dd4aa6532d2d3d0d71e4c2b7777c8fe4de585fa06b5b77cdc2e0fbaa2f3a4a5e5d3305c189ba152153f358ee7da4d9d9ba5d3a8975
languageName: node
linkType: hard

Expand Down Expand Up @@ -7529,12 +7502,10 @@ __metadata:
languageName: node
linkType: hard

"react@npm:^18.0.0":
version: 18.2.0
resolution: "react@npm:18.2.0"
dependencies:
loose-envify: ^1.1.0
checksum: 88e38092da8839b830cda6feef2e8505dec8ace60579e46aa5490fc3dc9bba0bd50336507dc166f43e3afc1c42939c09fe33b25fae889d6f402721dcd78fca1b
"react@npm:^18.0.0 || ^19.0.0":
version: 19.0.0
resolution: "react@npm:19.0.0"
checksum: 86de15d85b2465feb40297a90319c325cb07cf27191a361d47bcfe8c6126c973d660125aa67b8f4cbbe39f15a2f32efd0c814e98196d8e5b68c567ba40a399c6
languageName: node
linkType: hard

Expand Down Expand Up @@ -7907,12 +7878,10 @@ __metadata:
languageName: node
linkType: hard

"scheduler@npm:^0.23.0":
version: 0.23.0
resolution: "scheduler@npm:0.23.0"
dependencies:
loose-envify: ^1.1.0
checksum: d79192eeaa12abef860c195ea45d37cbf2bbf5f66e3c4dcd16f54a7da53b17788a70d109ee3d3dde1a0fd50e6a8fc171f4300356c5aee4fc0171de526bf35f8a
"scheduler@npm:^0.25.0":
version: 0.25.0
resolution: "scheduler@npm:0.25.0"
checksum: b7bb9fddbf743e521e9aaa5198a03ae823f5e104ebee0cb9ec625392bb7da0baa1c28ab29cee4b1e407a94e76acc6eee91eeb749614f91f853efda2613531566
languageName: node
linkType: hard

Expand Down