Skip to content

Commit

Permalink
Restore object with prerelease as string to unblock 0.72
Browse files Browse the repository at this point in the history
  • Loading branch information
Riccardo Cipolleschi committed Mar 27, 2023
1 parent fecfd04 commit 4adef34
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,12 @@ exports.checkVersions = function checkVersions(): void {
}
};

// Note: in OSS, the prerelease version is usually 0.Y.0-rc.W, so it is a string and not a number
// Then we need to keep supporting that object shape.
function _formatVersion(
version: (typeof Platform)['constants']['reactNativeVersion'],
version:
| (typeof Platform)['constants']['reactNativeVersion']
| {major: number, minor: number, patch: number, prerelease: ?string},
): string {
return (
`${version.major}.${version.minor}.${version.patch}` +
Expand Down

0 comments on commit 4adef34

Please sign in to comment.