jescalan/accord

"typescript version 1.4.1-2 is not currently supported"

Closed this issue · 6 comments

Self-explanatory. How do I tell which versions of a NPM package are supported?

We use semver internally to make packages throw a not supported error when a major version is released, so that it's no possible that an adapter can compile incorrectly. Typescript uses the 1.x check as seen here, so I don't see any reason why this version wouldn't be supported.

Sure it is, this is a dupe of much of the discussion #130, which I just found (or re-discovered). The way that accord's tests are set up, it only installs versions of ^1.4. In semver, 1.4.1-2 is not > 1.4, nor does 1.x match it because of the prerelease indicator of -2 (mistake by the publisher). You can try it yourself: http://jubianchi.github.io/semver-check/

So, you may want to indicate in the typescript support that the latest version of typescript-compiler should not be installed, or special case this in accord (the latter of which might be worth it in this case).

Sure! Would you be willing to PR this into the docs for typescript?

Willing, yes. Have time to........ maaaaaybe. I'll do my best.

In truth, I think you should re-think using typescript-compiler as a dependency. It's based on I think TypeScript 0.8? Current version of TypeScript is 1.8. Plus, TypeScript has a direct API. If you're already writing an adapter, which is what typescript-compiler is for typescript (simplifies the API), then you don't need an adapter that adapts an adapter. TypeScript should be the direct dependency of an Accord adapter. Otherwise you're stuck with integrating with an arbitrary API for a project that rarely updates (like typescript-compiler).

If you have a better node API for typescript, I'd be happy to accept a PR that switches out the current one! I have zero interest in typescript though, so I'm probably not going to spend a ton of time chasing this myself.