BitBoxSwiss / bitbox-wallet-app

The BitBoxApp for desktop and mobile.
https://bitbox.swiss/app
Apache License 2.0
251 stars 82 forks source link

frontend: bump react/react-dom version to 18.3.1 #2751

Closed NicolaLS closed 3 months ago

NicolaLS commented 4 months ago

after: #2750

Squashed react-dom and react update into one commit.

tested on webdev firefox, software keystore.

all peerDependencies support at lest ^18.0.0

[sus@archlinux web]$ npm ls react-dom
bitboxapp@0.0.0 /home/sus/Work/bitbox/dev/bitbox-wallet-app/frontends/web
├─┬ @testing-library/react@14.3.1
│ └── react-dom@18.3.1 deduped
├── react-dom@18.3.1
├─┬ react-router-dom@6.4.3
│ └── react-dom@18.3.1 deduped
└─┬ react-select@5.8.0
  ├── react-dom@18.3.1 deduped
  └─┬ react-transition-group@4.4.5
    └── react-dom@18.3.1 deduped

[sus@archlinux web]$ cat ./node_modules/react-select/package.json | grep peerDependencies -A 5
  "peerDependencies": {
    "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
    "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
  },
  "files": [
    "dist",
[sus@archlinux web]$ cat ./node_modules/react-router-dom/package.json | grep peerDependencies -A 5
  "peerDependencies": {
    "react": ">=16.8",
    "react-dom": ">=16.8"
  },
  "files": [
    "dist/",
[sus@archlinux web]$ cat ./node_modules/@testing-library/package.json | grep peerDependencies -A 5
cat: ./node_modules/@testing-library/package.json: No such file or directory
[sus@archlinux web]$ cat ./node_modules/@testing-library/react/package.json | grep peerDependencies -A 5
  "peerDependencies": {
    "react": "^18.0.0",
    "react-dom": "^18.0.0"
  },
  "eslintConfig": {
    "extends": "./node_modules/kcd-scripts/eslint.js",
[sus@archlinux web]$
NicolaLS commented 3 months ago

@thisconnect this PR now updates react and react-dom in the same commit.

thisconnect commented 3 months ago

I checked https://github.com/facebook/react/blob/main/CHANGELOG.md

Looks like they mostly added deprecation warnings for upcoming react 19.

One appears now in make webtest could you fix this?

stderr | src/hooks/api.test.ts > hooks for api calls > useLoad > re-calls apiCall when dependencies change Warning: ReactDOMTestUtils.act is deprecated in favor of React.act. Import act from react instead of react-dom/test-utils. See https://react.dev/warnings/react-dom-test-utils for more info.

thisconnect commented 3 months ago

sorry i just realized, please update this together with @types/react in this PR

NicolaLS commented 3 months ago

sorry i just realized, please update this together with @types/react in this PR

makes sense :) updating @types/react to 18.3.3` creates a ts error:

edit: deleted my comment about an error, this was actually from something that I was working on that some how slipped into this branch (really no idea how that happened)

NicolaLS commented 3 months ago

@thisconnect updated @types/react to 18.3.3 did some testing on webdev firefox software keystore everything seems to be fine.

NicolaLS commented 3 months ago

@thisconnect updated @types/react to 18.3.3 did some testing on webdev firefox software keystore everything seems to be fine.

did not see the comment about the deprecation warning initially. is fixed now, I also updated @types/react-dom to 18.3.0