Add Windows Platform Release constant#16156
Closed
vivekjm wants to merge 1 commit into
Closed
Conversation
7c7c4c1 to
7428966
Compare
Contributor
Author
|
Closing this because it overlaps with existing similar work and should not compete for maintainer review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Type of Change
Why
Platform.constants['Release']is currently undefined on Windows, while React Native Android exposes aReleasestring for the OS release version. This adds the Windows equivalent so callers can read the OS release fromPlatform.constants.Resolves #11012
What
Releaseto the Windows PlatformConstants Flow spec and JS platform types.Releasein the native Windows PlatformConstants module fromAnalyticsInfo.VersionInfo.DeviceFamilyVersion(), formatted asmajor.minor.build.revision.osVersionAPI contract value unchanged.Screenshots
Not applicable.
Testing
./node_modules/.bin/prettier --plugin=prettier-plugin-hermes-parser --check vnext/src-win/src/private/specs_DEPRECATED/modules/NativePlatformConstantsWindows.js vnext/src-win/Libraries/Utilities/Platform.windows.js vnext/src-win/Libraries/Utilities/PlatformTypes.js./../node_modules/.bin/react-native-windows-codegen --files 'src/**/*Native*.js' --namespace Microsoft::ReactNativeSpecs --libraryName rnwcore --componentsWindows --modulesWindows --internalComponents --modulesCxx --testfromvnext./node_modules/.bin/eslint vnext/src-win/src/private/specs_DEPRECATED/modules/NativePlatformConstantsWindows.js vnext/src-win/Libraries/Utilities/Platform.windows.js vnext/src-win/Libraries/Utilities/PlatformTypes.jsgit diff --checkI also tried
npx just-scripts codegen:check, but this macOS checkout could not loadvnext/just-task.jsbecausepwsh.exe/dotnet tooling was unavailable. I triedflow checkfromvnext; it failed on existing repository-wide missing-module and unused-suppression errors unrelated to these files.Changelog
Should this change be included in the release notes: yes
Add
Platform.constants.Releaseon Windows with the OS release version string.Microsoft Reviewers: Open in CodeFlow