Skip to content

Conversation

@andrewbranch
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings October 27, 2025 18:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the TypeScript submodule to align with TypeScript 6.0 defaults and ports the corresponding option changes. The update primarily affects how modules are imported in generated JavaScript code, changing from var declarations to const declarations and introducing helper functions (__importStar, __importDefault, __createBinding, etc.) for proper module handling.

Key Changes

  • Updated TypeScript submodule reference
  • Changed generated JavaScript imports from var to const
  • Added module import helper functions (__importStar, __importDefault, etc.) to generated code
  • Removed or updated test baselines for tests involving removed/changed compiler options (outFile, baseUrl)

Reviewed Changes

Copilot reviewed 300 out of 2176 changed files in this pull request and generated no comments.

File Description
Various .js baseline files Updated to use const instead of var for imports and added import helper functions
Various .js.diff baseline files Show the transition from var to const for import statements
Various .types, .symbols, .errors.txt files Removed or updated baselines for tests with deprecated options
Multiple test baseline files Updated line number references due to insertion of import helper code

Comment on lines -139 to +141
{Key: "node", Value: core.ModuleResolutionKindBundler}, // TODO: remove when node is fully deprecated -- this is helpful for testing porting
{Key: "classic", Value: core.ModuleResolutionKindBundler}, // TODO: remove when fully deprecated
{Key: "node10", Value: core.ModuleResolutionKindBundler}, // TODO: remove when fully deprecated
{Key: "classic", Value: core.ModuleResolutionKindClassic},
{Key: "node", Value: core.ModuleResolutionKindNode10},
{Key: "node10", Value: core.ModuleResolutionKindNode10},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notable change

Comment on lines -185 to 204
switch compilerTest.options.GetEmitModuleKind() {
switch compilerTest.options.Module {
case core.ModuleKindAMD, core.ModuleKindUMD, core.ModuleKindSystem:
t.Skipf("Skipping test %s with unsupported module kind %s", testName, compilerTest.options.GetEmitModuleKind())
t.Skipf("Skipping test %s with unsupported module kind %s", testName, compilerTest.options.Module)
}
switch compilerTest.options.ModuleResolution {
case core.ModuleResolutionKindNode10, core.ModuleResolutionKindClassic:
t.Skipf("Skipping test %s with unsupported module resolution kind %d", testName, compilerTest.options.ModuleResolution)
}
if compilerTest.options.ESModuleInterop.IsFalse() {
t.Skipf("Skipping test %s with esModuleInterop=false", testName)
}
if compilerTest.options.AllowSyntheticDefaultImports.IsFalse() {
t.Skipf("Skipping test %s with allowSyntheticDefaultImports=false", testName)
}
if compilerTest.options.BaseUrl != "" {
t.Skipf("Skipping test %s with baseUrl set", testName)
}
if compilerTest.options.OutFile != "" {
t.Skipf("Skipping test %s with outFile set", testName)
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notable change; I’ve migrated many of these Strada tests off of the deprecated options, so I think there's now no need to include the remaining ones in Corsa at all.

@jakebailey
Copy link
Member

Almost clean, generate is unhappy.

@andrewbranch
Copy link
Member Author

I don't really have a suggestion, but boy it's annoying that a clean npm test is only one of like 20 CI gates

@jakebailey
Copy link
Member

It wouldn't be impossible to come up with a check that can do everything, though it would take extra time to run given one needs many test runs.

@andrewbranch andrewbranch added this pull request to the merge queue Oct 27, 2025
Merged via the queue into microsoft:main with commit a4fa408 Oct 27, 2025
22 checks passed
@andrewbranch andrewbranch deleted the update-submodule branch October 27, 2025 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants