Skip to content

Ensure tsconfig is passed to dts emit compile tests#3185

Open
jakebailey wants to merge 1 commit intomainfrom
jabaile/fix-dts-test-options
Open

Ensure tsconfig is passed to dts emit compile tests#3185
jakebailey wants to merge 1 commit intomainfrom
jabaile/fix-dts-test-options

Conversation

@jakebailey
Copy link
Member

This is needed otherwise errors go become detached.

Copilot AI review requested due to automatic review settings March 20, 2026 23:24
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

Updates the test harness’s secondary “compile emitted .d.ts files” pass to carry through the original tsconfig source file, so diagnostics originating from tsconfig.json are reported with correct file/position context (preventing “detached” errors in baselines).

Changes:

  • Plumbs ConfigFile from the initial program’s command line into the declaration re-compilation step (CompileFilesEx).
  • Updates affected submodule compiler baselines to reflect attached tsconfig.json diagnostics (with file/line and underlines).
  • Removes now-unnecessary .diff baselines for the affected tests (no longer diverging).

Reviewed changes

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

Show a summary per file
File Description
internal/testutil/tsbaseline/js_emit_baseline.go Passes ConfigFile into the emitted .d.ts recompilation to attach tsconfig diagnostics properly.
testdata/baselines/reference/submodule/compiler/declarationEmitToDeclarationDirWithDeclarationOption.js Baseline updated to show tsconfig.json-attached TS5011 with correct context.
testdata/baselines/reference/submodule/compiler/declarationEmitToDeclarationDirWithDeclarationOption.js.diff Removed because the submodule diff is now empty (NoContent).
testdata/baselines/reference/submodule/compiler/commonSourceDirectory.js Baseline updated to show tsconfig.json-attached TS5011 with correct context.
testdata/baselines/reference/submodule/compiler/commonSourceDirectory.js.diff Removed because the submodule diff is now empty (NoContent).

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