-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JS-329 Upgrade TypeScript to 5.6.2 #4816
Conversation
Hi, I was about to open a thread in the forum regarding the TypeScript update, but as I see this here now, I thought I might just ask here. If it is too off-topic, please tell me and I'll move it to the community forum. I am wondering if there are any guidelines, processes, documentation on how TypeScript versions are handled within SonarQube / SonarJS. The documentation does not provide any insights into:
The project I am working on, strives to use current / up-to-date versions of Angular, but in the past SQ's TS version was a blocking issue that prevented updating Angular as they raise the minimum versions of TS every 6 months with every major update. We ran into (compilation / execution) issues due to different TS versions and had to downgrade again. Now we don't even try if it would maybe work and just wait it out. Thanks in advance. |
Hi @pmaieref, Indeed, I think this would be better to discuss in the Community. We do regular upgrades as they come. However, sometimes conflicting dependencies prevent us from updating faster. You should be fine using older versions of TypeScript. We don't officially support newer versions. You might experience issues with new compiler options, which can be solved with a dedicated Keep in mind that if you are using SonarQube, you'll only get the updates when SonarQube itself is released and you update. Hope that helps! |
217bc8b
to
31490b2
Compare
@gabriel-vivas-sonarsource Highly appreciated the reply. If needed I'll create a post in the forum for any further discussions. Yes, we keep our SQ always on latest, thanks. :) Maybe you could discuss internally if a small update to https://docs.sonarsource.com/sonarqube/latest/analyzing-source-code/languages/javascript-typescript-css/ would make sense, i.e. adding some information regarding TS version support, tsconfig.sonar.json, etc.. Thank you very much for the quick reply here and good luck with the update! :) |
@saberduck What are all the ruling diffs? Is there a general pattern? |
a83b7d0
to
45dbb3b
Compare
It seems that all ruling issues disappeared from file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are changes in the ruling for these rules which depend on the TS type checker:
- S4325: Redundant casts and non-null assertions should be avoided
- S1874: Code annotated as deprecated should not be used
and weirdly one issue gone for rule S6606: Nullish coalescing should be preferred in this location
and one weirder thing: All issues are gone from the vuetify:packages/vuetify/src/components/VDatePicker/VDatePickerDateTable.ts
file.
its/ruling/src/test/expected/jsts/vuetify/typescript-S1438.json
Outdated
Show resolved
Hide resolved
{ | ||
"vuetify:packages/vuetify/src/components/VDatePicker/VDatePickerDateTable.ts": [ | ||
null | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is null here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see #4816
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you like the changes here, you should apply them to all the packages/ruling/tests/projects/*.ruling.test.ts
files
00bd076
to
9c067ce
Compare
It seems that on Mac, we reached |
2842487
to
9935a4f
Compare
9935a4f
to
dbe3f68
Compare
Quality Gate passedIssues Measures |
Behavior wrt. project references has changed. Previously, if a project overlapped with the referenced project, it would include the files of the referenced project regardless. Now, the files from the referenced project are not included. This is better for us since it avoids analyzing the files duplicitly.