react-native
react-native copied to clipboard
update TypeScript dependencies
Summary:
Update TypeScript dependencies to support TypeScript 5.4.
TypeScript 5.4 support was added in eslint-plugin 7.2.0 Updating to current version (7.6.0).
Changelog:
[INTERNAL] [CHANGED] - Update @typescript-eslint modules.
Test Plan:
Run standard unit and integration tests.
| Platform | Engine | Arch | Size (bytes) | Diff |
|---|---|---|---|---|
| android | hermes | arm64-v8a | 19,217,872 | -4 |
| android | hermes | armeabi-v7a | n/a | -- |
| android | hermes | x86 | n/a | -- |
| android | hermes | x86_64 | n/a | -- |
| android | jsc | arm64-v8a | 22,594,636 | +20 |
| android | jsc | armeabi-v7a | n/a | -- |
| android | jsc | x86 | n/a | -- |
| android | jsc | x86_64 | n/a | -- |
Base commit: eae5d97113ba359d6a6c131cd6831f12ce6d1390 Branch: main
Also add "typescript": "^5.4.4" to the package.json
@joe-sam which package.json? This same one? If so, in which section?
@joe-sam which package.json? This same one? If so, in which section?
Not sure which ones probably at minimum the main react-native package.json and the template package.json and as far as I know these are all devDependencies sections and do not affect the runtime. Typescript has not been bumped up since last year and we could all benefit with some of the new semantics.
Best avoid use the caret (^) as that might cause some unexpected compile problems later in the project lifetime. "typescript": "5.4.4" https://github.com/facebook/react-native/pull/36862
see https://github.com/paulschreiber/react-native/commit/d2e446d98f322d7c5f98c3abd5abb59d12367ea9
@dmytrorykun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@paulschreiber the Node that we have on CircleCI (v18.16.0) is incompatible with what's required this change (v18.18.0). We're currently discussing what to do about this.
@dmytrorykun Should I update typescript to 5.4.4 in this PR? Or should that be handled separately?
@paulschreiber I think let's wait until we land this.
The difficult part with this sort of dependency change is the circular logic usually getting the types/react to sync to the react lib version bump and then in turn having to fix all the breaking change caused by having all the apps to follow suit. Since react 18 is already supported out of the box these type definition upgrades have already been made upto the latest major version release.
I am already using typescript 5.4.4 with yarn tsc without bumping the parser plugins in an older react-native supported version and an IDE linter plugin, and have experienced no issues at all. In fact am happy to note some false positives in the linter were fixed with the update. Since the plugin anyway supports 5.4 it makes sense to sync the latest patch release typescript 5.4.4 it into this version within this commit iteration. If it causes it to fails fast we should know straightaway and can report that to the devs of the plugin. Otherwise you might experience TYPE 1/ TYPE 2 errors and not know if your commit was actually working !!!
What is this blocked on?
Hey @robhogan do you know what is the latest on this?
TypeScript 5.5.x is now out.
Here is the blog announcing all the amazing benefits of upgrading straight upto typescript 5.5 for React Native developers !
This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This PR was closed because it has been stalled for 7 days with no activity.