test: prepare lint and Vitest for TypeScript 7#9345
Conversation
SonarJS 4.1 reads compiler enums removed in TypeScript 7 and crashes before ESLint can run.
Vitest 3 resolves a bare tsc command from the inherited npm PATH, which made sandboxed typechecks use the repository compiler instead of their pinned dependency.
Overall package sizeSelf size: 6.74 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.3.1 | 122.62 kB | 438.86 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
There was a problem hiding this comment.
More details
PR is a correct preparation for TypeScript 7 compatibility: updates sonarjs to pin a TS-compatible version and makes Vitest's typecheck use the sandboxed tsc directly instead of PATH resolution. Both changes are minimal, necessary, and carry no behavioral risks.
📊 Validated against 4 scenarios · Open Bits AI session
🤖 Datadog Autotest · Commit aae8006 · What is Autotest? · Any feedback? Reach out in #autotest
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: aae8006 | Docs | Datadog PR Page | Give us feedback! |
BenchmarksBenchmark execution time: 2026-07-14 17:52:29 Comparing candidate commit aae8006 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 2310 metrics, 48 unstable metrics.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9345 +/- ##
========================================
Coverage 96.61% 96.61%
========================================
Files 920 920
Lines 122387 122387
Branches 20958 21511 +553
========================================
+ Hits 118247 118249 +2
+ Misses 4140 4138 -2 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
* chore(deps-dev): update sonarjs for TypeScript 7 SonarJS 4.1 reads compiler enums removed in TypeScript 7 and crashes before ESLint can run. * test(vitest): use the sandboxed TypeScript compiler Vitest 3 resolves a bare tsc command from the inherited npm PATH, which made sandboxed typechecks use the repository compiler instead of their pinned dependency.
* chore(deps-dev): update sonarjs for TypeScript 7 SonarJS 4.1 reads compiler enums removed in TypeScript 7 and crashes before ESLint can run. * test(vitest): use the sandboxed TypeScript compiler Vitest 3 resolves a bare tsc command from the inherited npm PATH, which made sandboxed typechecks use the repository compiler instead of their pinned dependency.
Summary
TypeScript 7 exposes two compatibility issues before the dependency update can land. SonarJS 4.1 crashes while loading compiler enums that TypeScript 7 removed, and Vitest 3 picks up the repository
tscfrom npm's inherited PATH instead of the sandbox's pinned compiler. This updates SonarJS to the release that pins a compatible compiler and makes the Vitest fixture invoke its sandboxedtscdirectly.Refs: #9327