Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add warnings and deprecations for react-native-windows-init #13488

Merged
merged 2 commits into from
Jul 23, 2024

Conversation

jonthysell
Copy link
Contributor

@jonthysell jonthysell commented Jul 23, 2024

Description

This PR adds version checking to react-native-windows-init to give a deprecation warning if the user tries to use it for RNW 0.75 and an error if they use it on a newer version.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Why

We will be deprecating react-native-windows-init in favor of newer methods for adding RNW projects.

Resolves #13461

What

See above.

Screenshots

N/A

Testing

Verified I could se the warning/error when using it with

Changelog

Should this change be included in the release notes: yes

Add warnings and deprecations for react-native-windows-init

Microsoft Reviewers: Open in CodeFlow

@jonthysell jonthysell requested review from a team as code owners July 23, 2024 20:40
&& parsedVersion.prerelease.length > 1
&& parsedVersion.prerelease[0] === 'canary'
&& typeof parsedVersion.prerelease[1] === 'number'
&& parsedVersion.prerelease[1] > 843)
Copy link
Contributor

Choose a reason for hiding this comment

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

just curious what is "parsedVersion.prerelease[1] > 843" checking?

Copy link
Contributor Author

@jonthysell jonthysell Jul 23, 2024

Choose a reason for hiding this comment

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

I want to throw the error for > 0.0.0-canary.843. I still want the command to work for older canary builds (not sure if it really matters).

@jonthysell jonthysell merged commit b513ff2 into microsoft:main Jul 23, 2024
55 checks passed
@jonthysell jonthysell deleted the rnwinitdepwarning branch July 23, 2024 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants