- 
                Notifications
    You must be signed in to change notification settings 
- Fork 726
Update submodule, port 6.0 options defaults #1961
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
Conversation
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.
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 vartoconst
- 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 .jsbaseline files | Updated to use constinstead ofvarfor imports and added import helper functions | 
| Various .js.diffbaseline files | Show the transition from vartoconstfor import statements | 
| Various .types,.symbols,.errors.txtfiles | Removed or updated baselines for tests with deprecated options | 
| Multiple test baseline files | Updated line number references due to insertion of import helper code | 
| {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}, | 
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.
Notable change
| 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) | ||
| } | 
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.
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.
| Almost clean,  | 
| I don't really have a suggestion, but boy it's annoying that a clean  | 
| 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. | 
No description provided.