Skip to content

[WTF] Migrate The Repository to React 19 & React Native 0.78.2#163

Open
LEGIO-SEXTA-FERRATA wants to merge 12 commits intomasterfrom
wtf/react-19-native
Open

[WTF] Migrate The Repository to React 19 & React Native 0.78.2#163
LEGIO-SEXTA-FERRATA wants to merge 12 commits intomasterfrom
wtf/react-19-native

Conversation

@LEGIO-SEXTA-FERRATA
Copy link
Contributor

@LEGIO-SEXTA-FERRATA LEGIO-SEXTA-FERRATA commented Feb 17, 2026

This is no longer a test PR but is supposed to replace this.

@LEGIO-SEXTA-FERRATA LEGIO-SEXTA-FERRATA force-pushed the wtf/react-19-native branch 6 times, most recently from b96d27b to ac0c413 Compare February 25, 2026 13:42
@LEGIO-SEXTA-FERRATA LEGIO-SEXTA-FERRATA changed the title [WTF] TEST [WTF] Migrate The Repository to React 19 & React Native 0.78.2 Feb 25, 2026
@LEGIO-SEXTA-FERRATA LEGIO-SEXTA-FERRATA force-pushed the wtf/react-19-native branch 2 times, most recently from 845fdc9 to cf30484 Compare February 25, 2026 13:59
Comment on lines +17 to +22
// ["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"],
Copy link
Contributor

Choose a reason for hiding this comment

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

I suppose it is forgotten.

Copy link
Collaborator

Choose a reason for hiding this comment

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

To Ali's point, shouldn't this be deleted?

@LEGIO-SEXTA-FERRATA LEGIO-SEXTA-FERRATA force-pushed the wtf/react-19-native branch 2 times, most recently from 002e3b7 to 194afb2 Compare February 25, 2026 14:48
@weirdwater
Copy link
Collaborator

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.

Comment on lines +35 to +49
- 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
Copy link
Collaborator

Choose a reason for hiding this comment

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

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

Comment on lines +17 to +22
// ["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"],
Copy link
Collaborator

Choose a reason for hiding this comment

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

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"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need react native in the web package.json template?

@@ -1,4 +1,4 @@
import { createElement } from "react";

Copy link
Collaborator

Choose a reason for hiding this comment

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

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?

Comment on lines +42 to 44
) as ReactNode;
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

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"
Copy link
Collaborator

Choose a reason for hiding this comment

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

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",
Copy link
Collaborator

Choose a reason for hiding this comment

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

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",
Copy link
Collaborator

Choose a reason for hiding this comment

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

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",
Copy link
Collaborator

Choose a reason for hiding this comment

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants