cincheo / jsweet

A Java to JavaScript transpiler.
http://www.jsweet.org
Other
1.46k stars 158 forks source link

TypeScript upgrade #110

Closed lgrignon closed 8 years ago

lgrignon commented 8 years ago

JSweet uses a specific typescript installation (cf private static File NPM_DIR = new File(USER_HOME_DIR, ".jsweet-node_modules");). Thus, the typescript installation in this npm directory is not upgraded by user when he performs the regular npm install typescript -g Indeed, it would require executing: npm install typescript --prefix ~/.jsweet-node_modules -g

Since JSweet uses DefTyped definitions which is based on the latest TypeScript version, we should upgrade the JSweet's typescript installation in order to keep tsc in sync with its def.

That being said, some user could rely on old candies based on an older version of typescript. Maybe it would be better to have an option specifying the TypeScript version to use, which defaults to the latest. This last option seems too manual I think.

renaudpawlak commented 8 years ago

Now, a JSweet version is bound to a tsc version and installs the right one. It solves the tsc upgrade issue.