-
Notifications
You must be signed in to change notification settings - Fork 489
Change TypeScript to peerDependency #85
Comments
This is an interesting question. If you look through past issues, most people are asking the package to upgrade the version os TS - the opposite issue for you! What that does show though, is that there might be an opportunity to let consumers control their version of TS, while the package dictates a minimum version it supports on creation. I can't think of any issues that may arise from this, but maybe other people can 😄 Would be good to open this to discussion! |
Yeah I think there's a couple benefits. It allows users to stay back on an older version if needed because of some breaking change in their project. Like I was describing has happened on a very large code base at my company. Stuck on 2.1.5 when 2.3.3 was current and took a significant effort to fix the issues for us to upgrade. It also allows users to upgrade to the latest without having to release a new version of react-scripts-ts. I'm actually confused as to why this isn't already the case since you guys use the carat versioning to signify any 2.x. Thanks for considering! |
Oh I forgot to mention I thought of it since I've used gulp-typescript before which uses this same approach with the peerDependency |
Same here. This would be a nice thing to do |
Other side of the story - I'd like to be on typescript@next currently for some compilation performance improvements they've done there. Being able to specify the typescript version would be really nice. edit: It actually does seem to pick up on the new tsc if i install typescript@next |
Are we feeling like this is a change we should make? I'd be happy to submit a PR. We should probably do a major version bump on |
I agree with @ianschmitz. This is a change I would also appreciate! I want to use the latest changes of react-scripts-ts but use a slightly older typescript version at the moment. I use yarn's
|
Yep happy to take a PR for this, and will publish a major version 👍 |
Just a quick suggestion for your package.json that is created as part of a new cra-ts app.
Could we consider changing TypeScript to be a peerDependency in react-scripts-ts and a devDependency in the application's package.json instead of a dependency inside of react-scripts-ts? This would allow the developer to be in control of the version of TS to use, while being able to stay on the latest flavor of react-scripts-ts.
Our company has had issues in the past in a large code base where we've had to stay back a minor version or two of TypeScript to fix issues that prevented us from upgrading.
Cheers!
The text was updated successfully, but these errors were encountered: