Skip to content

Start targeting TS 6.0 behavior#2689

Merged
jakebailey merged 16 commits intomainfrom
jabaile/update-submodule-6.0
Feb 5, 2026
Merged

Start targeting TS 6.0 behavior#2689
jakebailey merged 16 commits intomainfrom
jabaile/update-submodule-6.0

Conversation

@jakebailey
Copy link
Member

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:

  • I have confined the fourslash tests to lib=ES5, now that the tests explicitly request that.
  • mappedTypeAsClauseRecursiveNoCrash1.ts is skipped as it crashes the compiler, pending a port.
  • for-of29.ts is skipped; it's now flaky, flipping between differing errors. (!!!)
  • I (mostly) ported the strict, alwaysStrict, target, and module changes, enough to not end up with a billion diffs.

Copilot AI review requested due to automatic review settings February 5, 2026 04:10
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 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, and strict options to align with TS 6.0
  • Added lib: es5 to 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:
Copy link
Member Author

@jakebailey jakebailey Feb 5, 2026

Choose a reason for hiding this comment

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

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{
Copy link
Member Author

@jakebailey jakebailey Feb 5, 2026

Choose a reason for hiding this comment

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

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.

@jakebailey jakebailey added this pull request to the merge queue Feb 5, 2026
Merged via the queue into main with commit 1d3f7ae Feb 5, 2026
20 checks passed
@jakebailey jakebailey deleted the jabaile/update-submodule-6.0 branch February 5, 2026 18:28
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.

4 participants