Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the TypeScript submodule to target version 6.0 behavior, bringing the codebase in line with the latest TypeScript main branch. The changes include compiler option defaults, diagnostic message updates, and test configuration adjustments to minimize behavioral differences.
Changes:
- Updated TypeScript submodule from 5.9 to 6.0 (latest main)
- Changed default compiler behavior for
target,module, andstrictoptions to align with TS 6.0 - Added
lib: es5to fourslash tests to maintain consistent baseline behavior - Updated diagnostic messages and error codes to match TS 6.0
Reviewed changes
Copilot reviewed 186 out of 26991 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
_submodules/TypeScript |
Updated submodule commit to latest main (TS 6.0) |
internal/fourslash/fourslash.go |
Set default target to ScriptTargetLatestStandard for new behavior |
internal/core/compileroptions.go |
Updated target/module inference and strict mode defaults |
internal/fourslash/tests/gen/*_test.go |
Added @lib: es5 directive to maintain test baselines |
internal/diagnostics/diagnostics_generated.go |
Updated diagnostic messages to match TS 6.0 |
internal/bundled/*_generated.go |
Added new lib.esnext.typedarrays.d.ts library |
README.md |
Updated references from TS 5.9 to TS 6.0 |
internal/fourslash/_scripts/failingTests.txt |
Updated list of currently failing tests |
Comments suppressed due to low confidence (1)
internal/fourslash/tests/gen/autoImportModuleNone1_test.go:1
- The entire test file has been deleted. Based on the PR description stating that changes were made to "start targeting 6.0" and this test used
@module: none, this appears to be an intentional removal of a test for deprecated functionality. However, verify that this test removal is intentional and not an accidental deletion.
| @@ -210,6 +216,11 @@ func (r *CompilerBaselineRunner) runSingleConfigTest(t *testing.T, testName stri | |||
| t.Skipf("Skipping test %s with outFile set", testName) | |||
| } | |||
|
|
|||
| switch compilerTest.options.Target { | |||
| case core.ScriptTargetES3, core.ScriptTargetES5: | |||
There was a problem hiding this comment.
I'm skipping ES3/ES5 here preemptively; will need to skip other things like allowStrict=false, downlevelIteration, etc etc. In later PRs.
| Kind: PtrTo(lsproto.CompletionItemKindVariable), | ||
| SortText: PtrTo(string(ls.SortTextGlobalsOrKeywords)), | ||
| }, | ||
| &lsproto.CompletionItem{ |
There was a problem hiding this comment.
Note the giant amount of stuff deleted here; Strada fourslash was doing ES5, but Corsa was not, leading to these. Since the target bump in Strada was going to break every test in ways that sucked, I instead annotated most everything with @lib: es5 in the target bump changes for 6.0 in Strada. This change brings these hardcoded globals lists back to what they are in Strada, which is ES5.
It's time to start targeting 6.0!
This bumps the submodule to the latest main.
I've preemptively partially ported a few things to make this less diff-y, but we will need to still go one at a time and port things over.
Notably:
mappedTypeAsClauseRecursiveNoCrash1.tsis skipped as it crashes the compiler, pending a port.for-of29.tsis skipped; it's now flaky, flipping between differing errors. (!!!)strict,alwaysStrict,target, andmodulechanges, enough to not end up with a billion diffs.