Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "[CLI] Update CLI Warnings to > 0.79 instead of 0.75",
"packageName": "react-native-windows-init",
"email": "54227869+anupriya13@users.noreply.github.com",
"dependentChangeType": "patch"
}
8 changes: 4 additions & 4 deletions packages/react-native-windows-init/src/Cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ function installReactNativeWindows(
const newSteps =
'Please see https://microsoft.github.io/react-native-windows/docs/getting-started for the latest method for adding RNW to your project.';
if (
parsedVersion.minor > 75 ||
parsedVersion.minor > 79 ||
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is actually fine since it's not supported for any version > 75?

(parsedVersion.minor === 0 &&
parsedVersion.prerelease.length > 1 &&
parsedVersion.prerelease[0] === 'canary' &&
Expand All @@ -313,13 +313,13 @@ function installReactNativeWindows(
// Full-stop, you can't use the command anymore.
throw new CodedError(
'UnsupportedReactNativeVersion',
`react-native-windows-init only supports react-native-windows <= 0.75. ${newSteps}`,
`react-native-windows-init only supports react-native-windows <= 0.79. ${newSteps}`,
);
} else if (parsedVersion.minor === 75) {
} else if (parsedVersion.minor === 79) {
// You can use the command for now, but it will be deprecated soon.
console.warn(
chalk.yellow(
`Warning: react-native-windows-init will be deprecated for RNW > 0.75. ${newSteps}`,
`Warning: react-native-windows-init will be deprecated for RNW > 0.79. ${newSteps}`,
),
);
}
Expand Down