Ensure tsconfig is passed to dts emit compile tests#3185
Open
jakebailey wants to merge 1 commit intomainfrom
Open
Ensure tsconfig is passed to dts emit compile tests#3185jakebailey wants to merge 1 commit intomainfrom
jakebailey wants to merge 1 commit intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
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
ConfigFilefrom the initial program’s command line into the declaration re-compilation step (CompileFilesEx). - Updates affected submodule compiler baselines to reflect attached
tsconfig.jsondiagnostics (with file/line and underlines). - Removes now-unnecessary
.diffbaselines 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). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is needed otherwise errors go become detached.