Skip to content

change typescript version to exact or make it peerDependency #1632

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

Closed
Hotell opened this issue Jul 20, 2017 · 3 comments
Closed

change typescript version to exact or make it peerDependency #1632

Hotell opened this issue Jul 20, 2017 · 3 comments
Labels
STATE: Auto-locked An issue has been automatically locked by the Lock bot.

Comments

@Hotell
Copy link

Hotell commented Jul 20, 2017

Are you requesting a feature or reporting a bug?

none of them, rather a build change

What is the current behavior?

If I use TS version 2.2.2 for instance in my project, and install testcafe, which has ^ in typescript package version ( which will install latest version till 3 ), my whole build will start to break, because testcafe's TS dependency overrides my older version -> what does it mean?

node_modules/.bin/tsc -> will symlink to testcafe/node_modules/typescript,
so when I run yarn tsc during my build tsc version 2.4.2 will run ( which had breaking changes by means of stricter type checking ) and my build will not pass, which is very unfortunate

similar issue like
TypeStrong/typedoc#556

What is the expected behavior?

making typescript peerDependency or fixing version in dependencies to oldest possible.

Specify your

  • operating system: OSX/Win 10
  • testcafe version: 0.16.2
  • node.js version: 8.x
@Hotell Hotell changed the title fix typescript version or make it peerDependency change typescript version to exact or make it peerDependency Jul 20, 2017
@inikulin
Copy link
Contributor

Testcafe has ^2.2.2 version specified in package.json, which means it will install latest 2.x.x and never any other major version. Also, package manager shouldn't override binary bindings in project root node_modules with transitive dependency version if their semver range doesn't overlap. So, it's either bug in yarn or something is wrong with your project configuration.

@Hotell
Copy link
Author

Hotell commented Jul 21, 2017

Testcafe has ^2.2.2 version specified in package.json, which means it will install latest 2.x.x and never any other major version.

Don't you worry I know what ^ means :)

As I've said, using ^ versioning especially for typescript is very wrong as they are not following semver for breaking changes

So, it's either bug in yarn or something is wrong with your project configuration.

yup you definitely right here, just tried id with npm 5.3 and it behaves as it should

@lock
Copy link

lock bot commented Mar 28, 2019

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.

@lock lock bot added the STATE: Auto-locked An issue has been automatically locked by the Lock bot. label Mar 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
STATE: Auto-locked An issue has been automatically locked by the Lock bot.
Projects
None yet
Development

No branches or pull requests

2 participants