MarshallOfSound

#54170: test: keep spec sources to erasable syntax and explicit type imports

Merged
Created: Sep 21, 2026, 4:12:17 AM
Merged: Sep 21, 2026, 5:21:33 PM
8 comments
Target: main

Description of Change

Before: specs used a few pieces of TypeScript syntax that need a real compiler (two enums, a parameter property, import x = require(), angle-bracket casts), imported types without marking them, and a number of test bodies reached for require() inline even though the module was already imported at the top of the file.

After: tsconfig.spec.json turns on erasableSyntaxOnly and isolatedModules and those constructs are rewritten; oxlint enforces consistent-type-imports / no-import-type-side-effects on spec/ so type-only imports are written as import type; and the stray inline requires are hoisted to the existing imports (plus named imports from ws). Everything here is valid under the current CommonJS loading and is split out so the move to native ES modules that follows is easier to read.

Checklist

Release Notes

Notes: none


Generated by Claude Code

Backports

42-x-y
Merged
PR Number
#54196
Merged At
Sep 22, 2026, 1:22:17 AM
Released In
Not yet
Release Date
Not yet
43-x-y
Merged
PR Number
#54195
Merged At
Sep 21, 2026, 11:40:08 PM
Released In
Not yet
Release Date
Not yet
44-x-y
Merged
PR Number
#54194
Merged At
Sep 21, 2026, 11:39:42 PM
Released In
Not yet
Release Date
Not yet
45-x-y
Merged
PR Number
#54193
Merged At
Sep 21, 2026, 11:39:00 PM
Released In
Not yet
Release Date
Not yet

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron