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

Mark TypeScript as an optional peer dependency for react-scripts #7860

Merged
merged 1 commit into from
Oct 31, 2019

Conversation

dstaley
Copy link
Contributor

@dstaley dstaley commented Oct 21, 2019

This PR adds TypeScript as an optional peer dependency for react-scripts. This modification is necessary to get react-scripts working with Yarn v2, and will enable the TypeScript template for create-react-app to work with Yarn v2.

This PR uses the peerDependenciesMeta key, which signifies to Yarn that typescript is an optional dependency. npm will support the key in the future, in which case "typescript": "*" can be added to peerDependencies. Until that change is made, simply having peerDependenciesMeta will be enough for Yarn, and won't adversely impact users of npm.

Other relevant issues: yarnpkg/berry/pull/475

/cc @iansu

@facebook-github-bot
Copy link

Hi dstaley! Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file.In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@iansu
Copy link
Contributor

iansu commented Oct 21, 2019

@dstaley Awesome! I suppose we'll have to publish this change to get the tests passing in Yarn v2? I can merge this right away but it might not be published for a week or two as we're currently working on the next release.

@dstaley
Copy link
Contributor Author

dstaley commented Oct 21, 2019

@iansu yeah, we'd need npx create-react-app to result in the new version being installed for the tests. It's okay if it waits for the next release! I can setup a reminder to check every couple of days to see if the new release has been published.

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@iansu iansu added this to the 3.3 milestone Oct 21, 2019
@ianschmitz ianschmitz merged commit 6d6dfa9 into facebook:master Oct 31, 2019
@ianschmitz
Copy link
Contributor

Thanks @dstaley!

@lock lock bot locked and limited conversation to collaborators Nov 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants