Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

typescript peerDependency blocks npm shrinkwrap #167

Closed
zaggino opened this issue Feb 20, 2017 · 4 comments
Closed

typescript peerDependency blocks npm shrinkwrap #167

zaggino opened this issue Feb 20, 2017 · 4 comments
Labels

Comments

@zaggino
Copy link

zaggino commented Feb 20, 2017

Please use "typescript": "*" or at least "typescript": "^2.0.0" in peerDependencies as current "typescript": "~2.0.3" means that typescript <2.1.0 is required.

This happens on my machine with "typescript": "2.1.6", and "typescript-eslint-parser": "1.0.3", in package.json:

npm WARN [email protected] requires a peer of typescript@~2.0.3 but none was installed.
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Zaggi\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "shrinkwrap"
npm ERR! node v7.5.0
npm ERR! npm  v4.2.0

npm ERR! Problems were encountered
npm ERR! Please correct and try again.
npm ERR! peer invalid: typescript@~2.0.3, required by [email protected]
@soda0289
Copy link
Member

We do not currently support typescript versions > 2.1. There were some issues that were introduced in 2.1 that broke the parser. These are all mostly fixed, with the exception of JSDoc comments. If you wish to use this parser with newer versions of typescript you can try the ts-2.1 branch.

Check here for more info:
#149

@zaggino
Copy link
Author

zaggino commented Feb 20, 2017

The issue with that branch is similar, I cant use it with ts rc 2.2.0 because of peerDependency lock. Eslint works fine with 2.2.0 but it blocks shrinkwrap for no good reason.

@soda0289
Copy link
Member

@zaggino You make a good point. I would like to see a ts-next or ts-rc branch that set the peer dependency to next or ^2.0.0 as you mentioned. The problem with setting the peer dependency version higher than the one we support is that the parser will crash if new features, like mapped types, are used.

Maybe we should remove peer dependency and have the parser check the globally installed version of typescript and warn the user.

@zaggino
Copy link
Author

zaggino commented Feb 20, 2017

ts-next branch with a unrestricted peerDependency would be great 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants