Skip to content

Conversation

@paulschreiber
Copy link
Contributor

@paulschreiber paulschreiber commented Apr 8, 2024

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.

Update TypeScript dependencies to support TypeScript 5.4.
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 8, 2024
@paulschreiber paulschreiber changed the title update TypeScript depdenencies update TypeScript dependencies Apr 8, 2024
@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Apr 8, 2024
@analysis-bot
Copy link

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: eae5d97
Branch: main

@joe-sam
Copy link

joe-sam commented Apr 9, 2024

Also add "typescript": "^5.4.4" to the package.json

@paulschreiber
Copy link
Contributor Author

@joe-sam which package.json? This same one? If so, in which section?

@joe-sam
Copy link

joe-sam commented Apr 9, 2024

@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"
#36862

see paulschreiber@d2e446d

@facebook-github-bot
Copy link
Contributor

@dmytrorykun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@dmytrorykun
Copy link
Contributor

@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.

@paulschreiber
Copy link
Contributor Author

@dmytrorykun Should I update typescript to 5.4.4 in this PR? Or should that be handled separately?

@dmytrorykun
Copy link
Contributor

@paulschreiber I think let's wait until we land this.

@joe-sam
Copy link

joe-sam commented Apr 12, 2024

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 !!!

@paulschreiber
Copy link
Contributor Author

What is this blocked on?

@dmytrorykun
Copy link
Contributor

Hey @robhogan do you know what is the latest on this?

@paulschreiber
Copy link
Contributor Author

TypeScript 5.5.x is now out.

@joe-sam
Copy link

joe-sam commented Jun 27, 2024

Here is the blog announcing all the amazing benefits of upgrading straight upto typescript 5.5 for React Native developers !

@react-native-bot
Copy link
Collaborator

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.

@react-native-bot react-native-bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Aug 14, 2025
@react-native-bot
Copy link
Collaborator

This PR was closed because it has been stalled for 7 days with no activity.

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. Stale There has been a lack of activity on this issue and it may be closed soon.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants