Skip to content

Assume alwaysStrict#2777

Merged
jakebailey merged 8 commits intomainfrom
jabaile/no-always-strict
Feb 18, 2026
Merged

Assume alwaysStrict#2777
jakebailey merged 8 commits intomainfrom
jabaile/no-always-strict

Conversation

@jakebailey
Copy link
Member

@jakebailey jakebailey commented Feb 13, 2026

This follows from microsoft/TypeScript#63089

alwaysStrict is assumed to be true everywhere.

This gets rid of the last SourceFileAffectingCompilerOptions field, so that no longer exists.

The only compiler options that matter for the AST are now those used for ExternalModuleIndicatorOptions.

Copilot AI review requested due to automatic review settings February 13, 2026 00:14
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

Assumes alwaysStrict is effectively always enabled across the compiler/transform pipeline, removing SourceFileAffectingCompilerOptions and updating parsing/binding behavior and test baselines to match.

Changes:

  • Remove SourceFileAffectingCompilerOptions and associated plumbing from parse/bind/emit paths.
  • Treat strict mode as always-on for emitted output and for binding non-declaration files.
  • Update/trim baselines and skip tests that explicitly set alwaysStrict=false.

Reviewed changes

Copilot reviewed 300 out of 373 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
internal/transformers/estransforms/usestrict.go Always inject "use strict" during transform.
internal/ast/parseoptions.go Remove SourceFileAffectingCompilerOptions from parse options and delete helper.
internal/binder/binder.go Bind in strict mode without consulting source-file affecting options.
internal/binder/binder_test.go Update benchmark to reflect removed parse option field.
internal/compiler/fileloader.go Stop computing/passing source-file affecting options; keep external module indicator options.
internal/compiler/program.go Validate that alwaysStrict=false is unsupported and produce a diagnostic.
internal/core/compileroptions.go Remove cached source-file affecting options; keep alwaysStrict only for parsing/validation.
internal/project/autoimport.go Remove passing source-file affecting options while parsing for auto-import registry.
internal/project/session_test.go Adjust tsconfig used in session test.
internal/testutil/tsbaseline/js_emit_baseline.go Remove passing source-file affecting options when parsing in JS emit baselines.
internal/testutil/harnessutil/harnessutil.go Skip tests that explicitly request alwaysStrict=false.
testdata/baselines/reference/** Remove/update reference baselines affected by always-strict behavior and skipped tests.

@jakebailey jakebailey enabled auto-merge February 18, 2026 00:13
@jakebailey jakebailey added this pull request to the merge queue Feb 18, 2026
Merged via the queue into main with commit 8bdae72 Feb 18, 2026
20 checks passed
@jakebailey jakebailey deleted the jabaile/no-always-strict branch February 18, 2026 00:38
Copilot AI pushed a commit that referenced this pull request Feb 25, 2026
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.

3 participants