Closed typeofweb closed 8 years ago
Hi @mmiszy,
Thanks for contributing this. We anticipated this need and handle it already. You can do this by just editing your own project's package.json
and setting a pinned dependency on typescript
. When grunt-ts comes down it will just use whatever version of typescript
you've got (assuming you also did npm install
). The "included" compiler is just a default for if you don't have one there and for building grunt-ts itself.
Take a look here: https://github.com/TypeStrong/grunt-ts#compiler
Please let me know if that doesn't work for you.
I do appreciate this suggestion but I will close this now. Thank you for contributing!!!
I'm using
grunt-ts
library but I needed features from TypeScript 1.8.0, howevergrunt-ts
currently has a hardcoded dependency on TypeScript 1.7.3 even though version 1.7.5 is out since December and 1.8.0 was released on January 28th (https://libraries.io/npm/typescript/versions).This situation is completely understandable because it's hard to demand from the maintainers of grunt-ts, to update this package as soon as new TypeScript version is released. Thus it'll always be a problem as long as TypeScript's package version is hardcoded. I think it's a much better idea to change it to
peerDependency
so thatgrunt-ts
relies on user-installed TypeScript version. This way users can theoretically use any TypeScript version including legacy (for some reason) and nightly builds.Note: After this update some tests might fail if run with different TypeScript version installed locally. I'm not sure what's the approach here.