[WTF] Migrate The Repository to React 19 & React Native 0.78.2#163
[WTF] Migrate The Repository to React 19 & React Native 0.78.2#163LEGIO-SEXTA-FERRATA wants to merge 12 commits intomasterfrom
Conversation
3267c4e to
fbcbf16
Compare
fbcbf16 to
f943346
Compare
b96d27b to
ac0c413
Compare
ac0c413 to
7db5d26
Compare
845fdc9 to
cf30484
Compare
cf30484 to
0c07706
Compare
| // ["web", "full", "ts", "8.0"], | ||
| // ["native", "full", "ts", "8.6"], | ||
| // ["web", "full", "ts", "8.6"], | ||
| // ["web", "full", "js", "8.7"], | ||
| // ["web", "full", "ts", "8.9"], | ||
| // ["native", "full", "ts", "8.9"], |
There was a problem hiding this comment.
I suppose it is forgotten.
There was a problem hiding this comment.
To Ali's point, shouldn't this be deleted?
002e3b7 to
194afb2
Compare
194afb2 to
d497c1b
Compare
…will become unused
6f416e3 to
c177af5
Compare
0e178da to
163844c
Compare
|
To allow this PR to merge I updated the branch protection rules to remove the requirement that the node 16 tests succeed. After merge we should update them to require that the node 20 tests succeed. |
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0 | ||
| if: matrix.node == 16 | ||
| with: | ||
| version: 8 | ||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0 | ||
| if: matrix.node == 18 | ||
| with: | ||
| version: 10 | ||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0 | ||
| if: matrix.node == 20 | ||
| with: | ||
| version: 10 |
There was a problem hiding this comment.
We can reduce these to a single Setup pnpm step, as pnpm 10 supports both node 18 and 20.
- name: Setup pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
with:
version: 10| // ["web", "full", "ts", "8.0"], | ||
| // ["native", "full", "ts", "8.6"], | ||
| // ["web", "full", "ts", "8.6"], | ||
| // ["web", "full", "js", "8.7"], | ||
| // ["web", "full", "ts", "8.9"], | ||
| // ["native", "full", "ts", "8.9"], |
There was a problem hiding this comment.
To Ali's point, shouldn't this be deleted?
| "react-dom": "^19.0.0",<% if (isLanguageTS) { %> | ||
| "@types/react": "^19.0.0", | ||
| "@types/react-dom": "^19.0.0",<% } %> | ||
| "react-native": "~0.78.2" |
There was a problem hiding this comment.
Do we need react native in the web package.json template?
| @@ -1,4 +1,4 @@ | |||
| import { createElement } from "react"; | |||
|
|
|||
There was a problem hiding this comment.
This and a lot of other template files have an empty line, where the React import used to only import createElement. Can you remove these empty first lines?
| ) as ReactNode; | ||
| } | ||
|
|
There was a problem hiding this comment.
The need to cast these JSX expressions tells me the typings are not well aligned. I also remember from upgrading the client that we would use JSX.Element instead of ReactNode.
| "warn", | ||
| { | ||
| "varsIgnorePattern": "createElement", | ||
| "args": "none" |
There was a problem hiding this comment.
In my previous comment I suggested to remove this object from the rule's configuration. However, I missed that this args setting is separate from the createElement exception. So we may want to re-introduce it.
| } | ||
| ], | ||
| "@typescript-eslint/ban-types": "warn", | ||
| "no-unused-vars": "warn", |
There was a problem hiding this comment.
The authors of typescript-eslint recommend to disable no-unused-vars as it may report false positives in combination with @typescript-eslint/no-unused-vars.
| "@typescript-eslint/class-name-casing": "off", | ||
| "@typescript-eslint/indent": "off", | ||
| "@typescript-eslint/no-object-literal-type-assertion": "off", | ||
| "@typescript-eslint/no-require-imports": "warn", |
There was a problem hiding this comment.
Does this change downgrade or start reporting require imports?
| "@types/testing-library__jest-dom": "^5.14.5", | ||
| "@typescript-eslint/eslint-plugin": "^5.8.1", | ||
| "@typescript-eslint/parser": "^5.8.1", | ||
| "@typescript-eslint/eslint-plugin": "^8.0.0", |
There was a problem hiding this comment.
The autofix command added to the migration script relies on a feature that was added to the eslint plugin in 8.53.0, so we should increase the minimum version to at least that.
This is no longer a test PR but is supposed to replace this.