-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Allow TypeScript 5+ in peerDependencies
#13071
base: main
Are you sure you want to change the base?
Conversation
cc @ianschmitz @iansu breaking out of the box with latest TypeScript may be enough of a reason to get a new patch release out with this change (eg. |
peerDependencies
…install react-scripts alongside latest typescript. This can be reverted when facebook/create-react-app#13071 is merged.
npm deps installation is used with "--force" due to existing issue facebook/create-react-app#13071
- Added basic integration with GH actions for building and testing the application -- npm dependencies installation is used with `--force` flag due to existing issue facebook/create-react-app#13071
eagerly waiting and checking everyday to see an update on this as this stops from upgrading to the latest typescript v5.0.2. Thanks |
Typescript does not use semantic versioning. The bump from 4.8 to 4.9 is equivalent to the bump of 4.9 to 5.0. (The current version of Typescript was versioned as 5.0 instead of 4.10 because they never release minor releases with a numeric value greater than 9 and always bump the major version after each x.9 release) Therefore it makes no sense to have a If this project wants to play it safe, then you should maintain an explicit upper bound ( If you don't want to play it safe then you should just have the minimal supported version ( The "Alternatives considered" of microsoft/TypeScript#39269 |
Bumping it since it's been two months that issue persists, and a month since the last comment. |
package.json
|
It's been another quarter since the last ping here. What's stopping this from being merged? The reasoning is sound, the implementation is correct and simple. The alternative is for people to stop using react-scripts entirely. (Or put up with the workaround above. But if a project can't merge a simple PR like this in half a year, maybe it's better not to depend on it.) |
|
I think it is a bit too premature to declare this project dead. create-react-app is an open source project with an MIT License. If the current maintainer has decided that they will no longer work on it, then there is still a chance that someone from the community will take over maintainership. This is something that happens all the time in the open source world. This is a popular project with lots of pull requests and community involvement, leading me to believe that there is a good chance that someone will step up and request to be an official maintainer, or will maintain their own fork that will become the new home for this project. |
Maybe - however, keep in mind:
I would suggest taking a look at the new directions of React, which are reflected in metaframeworks like Next.js and Remix. Even if you don't go with React Server Components right away (which I can also highly recommend), you can win a lot from a modern metaframework (which |
please merge |
Given that there has been no commits on this codebase in pretty close to two years, it seems safe to assume that CRA is dead. The documentation also says it's not the recommended tool to start any new project. Previous comments on this issue (and other related ones) have included a variety of ways you can override the version declaration in package.json. If you're stuck with a CRA based app, you should probably try one of those ideas (or "eject" the project and deal with all the config files yourself). For me personally, I'm migrating my projects to Next.JS - which not only supports Typescript 5, but also all the cool stuff from React 18+. And, the ability to use Server Actions completely avoids the need to create a back end server and API (with Express or whatever) simply to serve the needs of my React front end. |
Now that TypeScript 5 was released (specifically,
typescript@5.0.2
), it would be great to get the restriction on the version of TypeScript removed.Otherwise npm will throw errors like this, when resolving peer dependencies:
CodeSandbox demo (run
npm i
in a terminal to get the error below): https://codesandbox.io/p/sandbox/react-scripts-5-0-1-typescript-5-0-2-t48wwiAlternatives considered
I could instead do this if desired, which would then need to be updated again each time TypeScript 6, 7, etc are released: