Skip to content

Conversation

@sheetalkamat
Copy link
Member

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 ports TypeScript PR #62418, which changes the default behavior for rootDir to be the directory containing the config file when rootDir is not explicitly specified. Previously, this defaulting only occurred for composite projects. The change also includes related module resolution fixes to properly handle package self-references with outDir and declarationDir.

Changes:

  • Modified rootDir default to use config file directory for all projects, not just composite projects
  • Updated module resolution logic to correctly handle input file lookups for package self-names
  • Fixed missing packageId assignment in export/import resolution
  • Updated all test baselines to reflect the new output path structure

Reviewed changes

Copilot reviewed 39 out of 40 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
internal/outputpaths/commonsourcedirectory.go Removed composite check, now defaults rootDir to config file directory for all projects
internal/module/resolver.go Updated tryLoadInputFileForPath to use config directory for all projects and added missing packageId assignment
internal/compiler/emitter.go Updated comment and condition to check for config file path instead of composite flag
internal/execute/tsctests/tscbuild_test.go Updated test expectation for output path
Multiple baseline files Updated to reflect new output paths with src/ subdirectory structure and corrected module resolution behavior

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@andrewbranch
Copy link
Member

Should we get microsoft/TypeScript#62418 in the porting branch of the submodule first so the diffs are clean?

@jakebailey
Copy link
Member

Sheetal asked me about this, and I think actually we should start targeting TS 6.0 in the porting branch, which I wanted to start doing next week, it's just annoying due to some patches that had been applied.

In the meantime I think a few diffs is probably okay?

@sheetalkamat sheetalkamat added this pull request to the merge queue Jan 16, 2026
Merged via the queue into main with commit dc26e34 Jan 16, 2026
22 checks passed
@sheetalkamat sheetalkamat deleted the rootDir branch January 16, 2026 19:30
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