Typescript version support with v8.5

Which typescript version is now supported with new v8.5?
Where do I find official documentation about that, please, online?
Also see: Typescript version support
Thanks.

Hi Michael,

SonarQube 8.5 supports TypeScript 3.3.1 to 3.9.x, both included. The official documentation is here.

Cheers,
Daniel

Hi Daniel,
thanks so much.
Thanks for the link to the documentation. Sorry, where on this web page do I see the information that support is for TypeScript 3.3.1 to 3.9.x? this is for particular importance for me, thus the question.
Thanks.
Michael

We don’t exactly show the TypeScript version on that documentation page, but you can see from the thread of Github issues that led us to packaging our own version of TypeScript in SonarQube 8.5:

We actually supply TypeScript 3.8.3 with SonarQube 8.5.37579 (which uses SonarJS 6.5.0.13383): https://github.com/SonarSource/SonarJS/blob/6.5.0.13383/eslint-bridge/package.json#L59

Hi Joe. Thank you. You are now packaging your own Typescript version, and with v8.5 this is Typescript version v3.8.3. Where do I see that TypeScript v3.9.x is also included and/or supported? Thanks.
Michael

@Joe_Tingsanchali Is it possible to still use a version lower than 3.8.3? My project needs to run on 3.6.5 and I can’t seem to find a way to run it with anything other than 3.8.3.

Thanks

We currently don’t show this on the Roadmap and I don’t see an easy way to find it on our plugin SonarJS page here.

@saberduck Can you give an official link or confirmation of which TypeScript version we will support in future 8.x version or later?

@gil I haven’t tested enough to know for certain. I suggest trying it and seeing how much difference there is in terms of metrics and then you will know for certain. The TypeScript version is used to just analyze the project, so if you still get false positives or bugs/code smells/etc. that you didn’t expect, I suggest remediating them as “won’t fix” or “false positive” since it might encourage you to modernize your code when you are ready to upgrade your own project’s TypeScript version.

@Joe_Tingsanchali So it’s not “supports” Typescript 3.x. It’s more like a requires Typescript 3.8.3.
That’s too bad, I think the old behavior where it would simply take my environment’s version was a lot more reliable.

Anyway, thanks for the info.

To be clear, the reason for the change is still a benefit. See the PR that triggered this change here.

Without this change many JS/TS users were encountering many false positives (e.g. users were involuntarily supplying a transitive dependency version of TypeScript which conflicted with the main devDependency they declared, which caused version mismatch) and false negatives (e.g. some SonarQube rules were not being violated correctly) in their SonarScanner analysis.

I still suggest testing it out and verifying if it fits your needs. If anything, this can motivate you to keep up-to-date with TypeScript’s roadmap. They are updating to a new minor version every 3-4 months.

@Joe_Tingsanchali My project is a somewhat big Grid interface with wrappers for many Javascript Frameworks and the reason why we are stuck with TS 3.6.5 is because a particular version of Angular requires it.

The problem with marking these issues as “Won’t Fix” or “False Positive” is that when we are finally able to upgrade (drop older Angular support) we won’t know what was actually a false positive and what was just closed due to TS version mismatch.

Anyway, it’s not a massive blocker, but it would be nice to be able to provide the scanner with the path for TS just in case.

1 Like

Since we are on a more recent version of TypeScript than what you ship, I also see right now no benefits rather possible challenges.

Michael