Skip to content

Conversation

riteshshukla04
Copy link
Contributor

Summary:

This PR fixes #52356.

As per discussion here #52360 . We have changed the implementation in React native web in this PR necolas/react-native-web#2791.
As discussed with @cortinico , Now web returns a hardcoded string "0.0.0" for platform.version.
We can safely change this to string now.

Changelog:

[GENERAL][CHANGED] Update types for Platform.version

Test Plan:

N/A

@meta-cla meta-cla 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 Aug 11, 2025
@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 Aug 11, 2025
@cortinico cortinico requested a review from necolas August 13, 2025 10:43
@facebook-github-bot
Copy link
Contributor

@necolas has imported this pull request. If you are a Meta employee, you can view this in D80173301.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Aug 14, 2025
@facebook-github-bot
Copy link
Contributor

@necolas merged this pull request in f6ba2db.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @riteshshukla04 in f6ba2db

When will my fix make it into a release? | How to file a pick request?

@@ -162,7 +162,7 @@ type MacOSPlatform = {
type WebPlatform = {
OS: 'web',
// $FlowFixMe[unsafe-getters-setters]

Choose a reason for hiding this comment

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

Are these still needed?

kikoso pushed a commit to kikoso/react-native that referenced this pull request Aug 26, 2025
Summary:
This PR fixes facebook#52356.

As per discussion here facebook#52360 . We have changed the implementation in React native web in this PR necolas/react-native-web#2791.
As discussed with cortinico , Now web returns a hardcoded string "0.0.0" for `platform.version`.
 We can safely change this to string now.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[GENERAL][CHANGED] Update types for Platform.version

Pull Request resolved: facebook#53216

Test Plan: N/A

Reviewed By: christophpurrer

Differential Revision: D80173301

Pulled By: necolas

fbshipit-source-id: 750aae2427a6c36a068346a9722d9734d9906b58
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. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Web returns undefined for Platform.Version, but it is not optional
5 participants