-
-
Notifications
You must be signed in to change notification settings - Fork 124
deps: add React 19 to peerDep range, remove React devDeps -- needs to update devDeps, lockfile, typings, tests, etc #111
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The devDeps removals are incorrect; they're needed during dev and testing, per in-line comment below. CI also still needs fixing.
Also please use the specific title and description I had edited in for your previous PR #110; generic titles and no description are not good practice.
To the reviewers here, approvals without in-depth reviews are also counter-productive and can be misleading.
If you want something faster, you can contribute with a detailed review, by helping fix CI, by testing out and verifying compatibility in a React 19 app, etc.
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The react*
devDeps should not be removed. They are devDeps and are used during development and testing.
Unless a more recent version of Node changed something, peerDeps don't get installed during development and so this would fail CI (if it ran; it needs fixing per my last comment in the issue)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See also below comment on the package-lock.json
after I added its necessary changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI is running now (c.f. #112, #113, et al) and fails; package-lock.json
also needs updating for the @types/react
change
EDIT: I updated the package-lock.json
myself in 478dc4f.
EDIT2: Then fixed some typings issues with the new React 19 types in f3e1a78
This comment was marked as resolved.
This comment was marked as resolved.
"version": "18.2.0", | ||
"resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", | ||
"integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", | ||
"dev": true, | ||
"peer": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is still using 18.2.0
without a specific devDep afaict, although the "peer": true
part seems new (i.e. newer NPM feature).
this means that React 19 is not actually being tested, React 18 is still installed during dev/test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When installing React 19, you'll also see that v13.3.0 of @testing-library/react
is incompatible:
❯ npm install -D react react-dom
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-signature-canvas@1.0.5
npm WARN Found: react@18.2.0
npm WARN node_modules/react
npm WARN peer react@"^18.0.0" from @testing-library/react@13.3.0
npm WARN node_modules/@testing-library/react
npm WARN dev @testing-library/react@"^13.3.0" from the root project
npm WARN 2 more (react-dom, the root project)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^18.0.0" from @testing-library/react@13.3.0
npm WARN node_modules/@testing-library/react
npm WARN dev @testing-library/react@"^13.3.0" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-signature-canvas@1.0.5
npm WARN Found: react@18.2.0
npm WARN node_modules/react
npm WARN peer react@"^18.0.0" from @testing-library/react@13.3.0
npm WARN node_modules/@testing-library/react
npm WARN dev @testing-library/react@"^13.3.0" from the root project
npm WARN 2 more (react-dom, the root project)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^18.2.0" from react-dom@18.2.0
npm WARN node_modules/react-dom
npm WARN peer react-dom@"^18.0.0" from @testing-library/react@13.3.0
npm WARN node_modules/@testing-library/react
npm WARN 1 more (the root project)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-signature-canvas@1.0.5
npm WARN Found: react@18.2.0
npm WARN node_modules/react
npm WARN peer react@"^18.0.0" from @testing-library/react@13.3.0
npm WARN node_modules/@testing-library/react
npm WARN dev @testing-library/react@"^13.3.0" from the root project
npm WARN 2 more (react-dom, the root project)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^18.2.0" from react-dom@18.2.0
npm WARN node_modules/react-dom
npm WARN peer react-dom@"^18.0.0" from @testing-library/react@13.3.0
npm WARN node_modules/@testing-library/react
npm WARN 1 more (the root project)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-signature-canvas@1.0.5
npm WARN Found: react-dom@18.2.0
npm WARN node_modules/react-dom
npm WARN peer react-dom@"^18.0.0" from @testing-library/react@13.3.0
npm WARN node_modules/@testing-library/react
npm WARN dev @testing-library/react@"^13.3.0" from the root project
npm WARN 1 more (the root project)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-dom@"^18.0.0" from @testing-library/react@13.3.0
npm WARN node_modules/@testing-library/react
npm WARN dev @testing-library/react@"^13.3.0" from the root project
So @testing-library/react
also needs to be updated through a couple breaking changes to v16.1
Fixes #109. Replaces #110
Per #109 (comment), I removed the main react and react-dom dependencies, and just left the peer ones to help with compatibility