From 4a4a87e2bebaa227f1f4f8c9e32ee63032caded3 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 18 Feb 2026 03:32:24 +0000
Subject: [PATCH 1/2] Initial plan
From fa7242620fc1985f67ee03fa5f843c6c56ff6a54 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 18 Feb 2026 03:51:51 +0000
Subject: [PATCH 2/2] Port TypeScript PR #62418: Assume rootDir is the current
configuration directory
Add diagnostic 5011 to warn when rootDir inference changes output layout.
Export GetComputedCommonSourceDirectory from outputpaths package.
Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com>
---
internal/compiler/program.go | 42 +++++++++++++
internal/outputpaths/commonsourcedirectory.go | 8 +++
.../compiler/commonSourceDirectory.js | 32 ++++++++++
.../compiler/commonSourceDirectory.js.diff | 49 ++++++---------
.../commonSourceDirectory_dts.errors.txt | 25 ++++++++
.../commonSourceDirectory_dts.errors.txt.diff | 29 ---------
...itToDeclarationDirWithDeclarationOption.js | 16 +++++
...eclarationDirWithDeclarationOption.js.diff | 31 +++++-----
.../when-rootDir-is-not-specified.js | 54 ++++++++++++++---
...iles-containing-json-file-non-composite.js | 22 +++++--
.../include-and-files-non-composite.js | 22 +++++--
...file-name-matches-ts-file-non-composite.js | 22 +++++--
...-along-with-other-include-non-composite.js | 22 +++++--
.../include-only-non-composite.js | 22 +++++--
...t-outside-configDirectory-non-composite.js | 22 +++++--
.../sourcemap-non-composite.js | 59 ++++++++++++++++---
...ing-Windows-paths-and-uppercase-letters.js | 19 ++----
.../tsc/moduleResolution/pnpm-style-layout.js | 8 ++-
18 files changed, 360 insertions(+), 144 deletions(-)
create mode 100644 testdata/baselines/reference/submodule/compiler/commonSourceDirectory_dts.errors.txt
delete mode 100644 testdata/baselines/reference/submodule/compiler/commonSourceDirectory_dts.errors.txt.diff
diff --git a/internal/compiler/program.go b/internal/compiler/program.go
index c46207e545e..e06b6e1e4be 100644
--- a/internal/compiler/program.go
+++ b/internal/compiler/program.go
@@ -856,6 +856,48 @@ func (p *Program) verifyCompilerOptions() {
}
}
+ if !options.NoEmit.IsTrue() &&
+ !options.Composite.IsTrue() &&
+ options.RootDir == "" &&
+ options.ConfigFilePath != "" &&
+ (options.OutDir != "" ||
+ (options.GetEmitDeclarations() && options.DeclarationDir != "") ||
+ options.OutFile != "") {
+ // Check if rootDir inferred changed and issue diagnostic
+ dir := p.CommonSourceDirectory()
+ var emittedFiles []string
+ for _, file := range p.files {
+ if !file.IsDeclarationFile && sourceFileMayBeEmitted(file, p, false) {
+ emittedFiles = append(emittedFiles, file.FileName())
+ }
+ }
+ dir59 := outputpaths.GetComputedCommonSourceDirectory(emittedFiles, p.GetCurrentDirectory(), p.UseCaseSensitiveFileNames())
+ if dir59 != "" && tspath.GetCanonicalFileName(dir, p.UseCaseSensitiveFileNames()) != tspath.GetCanonicalFileName(dir59, p.UseCaseSensitiveFileNames()) {
+ // change in layout
+ var option1 string
+ if options.OutFile != "" {
+ option1 = "outFile"
+ } else if options.OutDir != "" {
+ option1 = "outDir"
+ } else {
+ option1 = "declarationDir"
+ }
+ var option2 string
+ if options.OutFile == "" && options.OutDir != "" {
+ option2 = "declarationDir"
+ }
+ diag := createDiagnosticForOption(
+ true, /*onKey*/
+ option1,
+ option2,
+ diagnostics.The_common_source_directory_of_0_is_1_The_rootDir_setting_must_be_explicitly_set_to_this_or_another_path_to_adjust_your_output_s_file_layout,
+ tspath.GetBaseFileName(options.ConfigFilePath),
+ tspath.GetRelativePathFromFile(options.ConfigFilePath, dir59, p.comparePathsOptions),
+ )
+ diag.AddMessageChain(ast.NewCompilerDiagnostic(diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashts6_for_migration_information))
+ }
+ }
+
if options.CheckJs.IsTrue() && !options.GetAllowJS() {
createDiagnosticForOptionName(diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "checkJs", "allowJs")
}
diff --git a/internal/outputpaths/commonsourcedirectory.go b/internal/outputpaths/commonsourcedirectory.go
index 433f28635db..6b64d893b28 100644
--- a/internal/outputpaths/commonsourcedirectory.go
+++ b/internal/outputpaths/commonsourcedirectory.go
@@ -48,6 +48,14 @@ func computeCommonSourceDirectoryOfFilenames(fileNames []string, currentDirector
return tspath.GetPathFromPathComponents(commonPathComponents)
}
+func GetComputedCommonSourceDirectory(emittedFiles []string, currentDirectory string, useCaseSensitiveFileNames bool) string {
+ commonSourceDirectory := computeCommonSourceDirectoryOfFilenames(emittedFiles, currentDirectory, useCaseSensitiveFileNames)
+ if len(commonSourceDirectory) > 0 {
+ commonSourceDirectory = tspath.EnsureTrailingDirectorySeparator(commonSourceDirectory)
+ }
+ return commonSourceDirectory
+}
+
func GetCommonSourceDirectory(options *core.CompilerOptions, files func() []string, currentDirectory string, useCaseSensitiveFileNames bool) string {
var commonSourceDirectory string
if options.RootDir != "" {
diff --git a/testdata/baselines/reference/submodule/compiler/commonSourceDirectory.js b/testdata/baselines/reference/submodule/compiler/commonSourceDirectory.js
index 4d8d4214440..d80a2aaa4b1 100644
--- a/testdata/baselines/reference/submodule/compiler/commonSourceDirectory.js
+++ b/testdata/baselines/reference/submodule/compiler/commonSourceDirectory.js
@@ -25,3 +25,35 @@ x + y;
//// [/app/bin/index.d.ts]
///
export {};
+
+
+//// [DtsFileErrors]
+
+
+error TS5011: The common source directory of 'tsconfig.json' is '../.src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
+ Visit https://aka.ms/ts6 for migration information.
+
+
+!!! error TS5011: The common source directory of 'tsconfig.json' is '../.src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
+!!! error TS5011: Visit https://aka.ms/ts6 for migration information.
+==== /app/tsconfig.json (0 errors) ====
+ {
+ "compilerOptions": {
+ "outDir": "bin",
+ "typeRoots": ["../types"],
+ "sourceMap": true,
+ "mapRoot": "myMapRoot",
+ "sourceRoot": "mySourceRoot",
+ "declaration": true
+ }
+ }
+
+==== /app/bin/index.d.ts (0 errors) ====
+ ///
+ export {};
+
+==== /types/bar.d.ts (0 errors) ====
+ declare module "bar" {
+ export const y = 0;
+ }
+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/commonSourceDirectory.js.diff b/testdata/baselines/reference/submodule/compiler/commonSourceDirectory.js.diff
index a92adeec86d..69952b25c85 100644
--- a/testdata/baselines/reference/submodule/compiler/commonSourceDirectory.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/commonSourceDirectory.js.diff
@@ -1,39 +1,24 @@
--- old.commonSourceDirectory.js
+++ new.commonSourceDirectory.js
-@@= skipped -24, +24 lines =@@
- //// [/app/bin/index.d.ts]
- ///
- export {};
--
--
--//// [DtsFileErrors]
--
--
+@@= skipped -29, +29 lines =@@
+ //// [DtsFileErrors]
+
+
-/app/tsconfig.json(3,9): error TS5011: The common source directory of 'tsconfig.json' is '../.src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
-- Visit https://aka.ms/ts6 for migration information.
--
--
++error TS5011: The common source directory of 'tsconfig.json' is '../.src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
+ Visit https://aka.ms/ts6 for migration information.
+
+
-==== /app/tsconfig.json (1 errors) ====
-- {
-- "compilerOptions": {
-- "outDir": "bin",
++!!! error TS5011: The common source directory of 'tsconfig.json' is '../.src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
++!!! error TS5011: Visit https://aka.ms/ts6 for migration information.
++==== /app/tsconfig.json (0 errors) ====
+ {
+ "compilerOptions": {
+ "outDir": "bin",
- ~~~~~~~~
-!!! error TS5011: The common source directory of 'tsconfig.json' is '../.src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
-!!! error TS5011: Visit https://aka.ms/ts6 for migration information.
-- "typeRoots": ["../types"],
-- "sourceMap": true,
-- "mapRoot": "myMapRoot",
-- "sourceRoot": "mySourceRoot",
-- "declaration": true
-- }
-- }
--
--==== /app/bin/index.d.ts (0 errors) ====
-- ///
-- export {};
--
--==== /types/bar.d.ts (0 errors) ====
-- declare module "bar" {
-- export const y = 0;
-- }
--
\ No newline at end of file
+ "typeRoots": ["../types"],
+ "sourceMap": true,
+ "mapRoot": "myMapRoot",
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/commonSourceDirectory_dts.errors.txt b/testdata/baselines/reference/submodule/compiler/commonSourceDirectory_dts.errors.txt
new file mode 100644
index 00000000000..39317702628
--- /dev/null
+++ b/testdata/baselines/reference/submodule/compiler/commonSourceDirectory_dts.errors.txt
@@ -0,0 +1,25 @@
+/app/tsconfig.json(3,9): error TS5011: The common source directory of 'tsconfig.json' is './src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
+ Visit https://aka.ms/ts6 for migration information.
+
+
+==== /app/tsconfig.json (1 errors) ====
+ {
+ "compilerOptions": {
+ "outDir": "bin",
+ ~~~~~~~~
+!!! error TS5011: The common source directory of 'tsconfig.json' is './src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
+!!! error TS5011: Visit https://aka.ms/ts6 for migration information.
+ "sourceMap": true,
+ "mapRoot": "myMapRoot",
+ "sourceRoot": "mySourceRoot",
+ "declaration": true
+ }
+ }
+
+==== /app/lib/bar.d.ts (0 errors) ====
+ declare const y: number;
+
+==== /app/src/index.ts (0 errors) ====
+ ///
+ export const x = y;
+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/commonSourceDirectory_dts.errors.txt.diff b/testdata/baselines/reference/submodule/compiler/commonSourceDirectory_dts.errors.txt.diff
deleted file mode 100644
index a8dbad91b76..00000000000
--- a/testdata/baselines/reference/submodule/compiler/commonSourceDirectory_dts.errors.txt.diff
+++ /dev/null
@@ -1,29 +0,0 @@
---- old.commonSourceDirectory_dts.errors.txt
-+++ new.commonSourceDirectory_dts.errors.txt
-@@= skipped -0, +0 lines =@@
--/app/tsconfig.json(3,9): error TS5011: The common source directory of 'tsconfig.json' is './src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
-- Visit https://aka.ms/ts6 for migration information.
--
--
--==== /app/tsconfig.json (1 errors) ====
-- {
-- "compilerOptions": {
-- "outDir": "bin",
-- ~~~~~~~~
--!!! error TS5011: The common source directory of 'tsconfig.json' is './src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
--!!! error TS5011: Visit https://aka.ms/ts6 for migration information.
-- "sourceMap": true,
-- "mapRoot": "myMapRoot",
-- "sourceRoot": "mySourceRoot",
-- "declaration": true
-- }
-- }
--
--==== /app/lib/bar.d.ts (0 errors) ====
-- declare const y: number;
--
--==== /app/src/index.ts (0 errors) ====
-- ///
-- export const x = y;
--
-+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitToDeclarationDirWithDeclarationOption.js b/testdata/baselines/reference/submodule/compiler/declarationEmitToDeclarationDirWithDeclarationOption.js
index 0a0189ac4c6..06b90908a68 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitToDeclarationDirWithDeclarationOption.js
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitToDeclarationDirWithDeclarationOption.js
@@ -17,3 +17,19 @@ interface Foo {
x: number;
}
export default Foo;
+
+
+//// [DtsFileErrors]
+
+
+error TS5011: The common source directory of 'tsconfig.json' is '../.src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
+ Visit https://aka.ms/ts6 for migration information.
+
+
+!!! error TS5011: The common source directory of 'tsconfig.json' is '../.src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
+!!! error TS5011: Visit https://aka.ms/ts6 for migration information.
+==== /foo/tsconfig.json (0 errors) ====
+ {
+ "compilerOptions": { "declaration": true, "declarationDir": "out", "module": "commonjs", "target": "es2015" }
+ }
+
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitToDeclarationDirWithDeclarationOption.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitToDeclarationDirWithDeclarationOption.js.diff
index 72969ed0e45..b30c2276e31 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitToDeclarationDirWithDeclarationOption.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitToDeclarationDirWithDeclarationOption.js.diff
@@ -1,23 +1,22 @@
--- old.declarationEmitToDeclarationDirWithDeclarationOption.js
+++ new.declarationEmitToDeclarationDirWithDeclarationOption.js
-@@= skipped -16, +16 lines =@@
- x: number;
- }
- export default Foo;
--
--
--//// [DtsFileErrors]
--
--
+@@= skipped -21, +21 lines =@@
+ //// [DtsFileErrors]
+
+
-/foo/tsconfig.json(2,47): error TS5011: The common source directory of 'tsconfig.json' is '../.src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
-- Visit https://aka.ms/ts6 for migration information.
--
--
++error TS5011: The common source directory of 'tsconfig.json' is '../.src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
+ Visit https://aka.ms/ts6 for migration information.
+
+
-==== /foo/tsconfig.json (1 errors) ====
- {
- "compilerOptions": { "declaration": true, "declarationDir": "out", "module": "commonjs", "target": "es2015" }
- ~~~~~~~~~~~~~~~~
--!!! error TS5011: The common source directory of 'tsconfig.json' is '../.src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
--!!! error TS5011: Visit https://aka.ms/ts6 for migration information.
-- }
--
\ No newline at end of file
+ !!! error TS5011: The common source directory of 'tsconfig.json' is '../.src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
+ !!! error TS5011: Visit https://aka.ms/ts6 for migration information.
++==== /foo/tsconfig.json (0 errors) ====
++ {
++ "compilerOptions": { "declaration": true, "declarationDir": "out", "module": "commonjs", "target": "es2015" }
+ }
+
\ No newline at end of file
diff --git a/testdata/baselines/reference/tsbuild/outputPaths/when-rootDir-is-not-specified.js b/testdata/baselines/reference/tsbuild/outputPaths/when-rootDir-is-not-specified.js
index 837dbd0daf4..26d7aef3b18 100644
--- a/testdata/baselines/reference/tsbuild/outputPaths/when-rootDir-is-not-specified.js
+++ b/testdata/baselines/reference/tsbuild/outputPaths/when-rootDir-is-not-specified.js
@@ -11,7 +11,7 @@ export const x = 10;
}
tsgo -b -v
-ExitStatus:: Success
+ExitStatus:: DiagnosticsPresent_OutputsGenerated
Output::
[[90mHH:MM:SS AM[0m] Projects in this build:
* tsconfig.json
@@ -20,6 +20,15 @@ Output::
[[90mHH:MM:SS AM[0m] Building project 'tsconfig.json'...
+[96mtsconfig.json[0m:[93m3[0m:[93m9[0m - [91merror[0m[90m TS5011: [0mThe common source directory of 'tsconfig.json' is './src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
+ Visit https://aka.ms/ts6 for migration information.
+
+[7m3[0m "outDir": "dist",
+[7m [0m [91m ~~~~~~~~[0m
+
+
+Found 1 error in tsconfig.json[90m:3[0m
+
//// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib*
///
interface Boolean {}
@@ -47,10 +56,11 @@ declare const console: { log(msg: any): void; };
export const x = 10;
//// [/home/src/workspaces/project/dist/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["../src/index.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["../src/index.ts"]}
//// [/home/src/workspaces/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
+ "errors": true,
"root": [
{
"files": [
@@ -59,33 +69,61 @@ export const x = 10;
"original": "../src/index.ts"
}
],
- "size": 54
+ "size": 68
}
tsconfig.json::
SemanticDiagnostics::
-*refresh* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts
-*refresh* /home/src/workspaces/project/src/index.ts
+*not cached* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts
+*not cached* /home/src/workspaces/project/src/index.ts
Signatures::
Edit [0]:: no change
tsgo -b -v
-ExitStatus:: Success
+ExitStatus:: DiagnosticsPresent_OutputsGenerated
Output::
[[90mHH:MM:SS AM[0m] Projects in this build:
* tsconfig.json
-[[90mHH:MM:SS AM[0m] Project 'tsconfig.json' is up to date because newest input 'src/index.ts' is older than output 'dist/src/index.js'
+[[90mHH:MM:SS AM[0m] Project 'tsconfig.json' is out of date because buildinfo file 'dist/tsconfig.tsbuildinfo' indicates that program needs to report errors.
+
+[[90mHH:MM:SS AM[0m] Building project 'tsconfig.json'...
+
+[96mtsconfig.json[0m:[93m3[0m:[93m9[0m - [91merror[0m[90m TS5011: [0mThe common source directory of 'tsconfig.json' is './src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
+ Visit https://aka.ms/ts6 for migration information.
+
+[7m3[0m "outDir": "dist",
+[7m [0m [91m ~~~~~~~~[0m
+
+Found 1 error in tsconfig.json[90m:3[0m
+//// [/home/src/workspaces/project/dist/src/index.js] *rewrite with same content*
+//// [/home/src/workspaces/project/dist/tsconfig.tsbuildinfo] *rewrite with same content*
+//// [/home/src/workspaces/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content*
+
+tsconfig.json::
+SemanticDiagnostics::
+*not cached* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts
+*not cached* /home/src/workspaces/project/src/index.ts
+Signatures::
Edit [1]:: Normal build without change, that does not block emit on error to show files that get emitted
tsgo -p /home/src/workspaces/project/tsconfig.json
-ExitStatus:: Success
+ExitStatus:: DiagnosticsPresent_OutputsGenerated
Output::
+[96mtsconfig.json[0m:[93m3[0m:[93m9[0m - [91merror[0m[90m TS5011: [0mThe common source directory of 'tsconfig.json' is './src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
+ Visit https://aka.ms/ts6 for migration information.
+
+[7m3[0m "outDir": "dist",
+[7m [0m [91m ~~~~~~~~[0m
+
+
+Found 1 error in tsconfig.json[90m:3[0m
+
//// [/home/src/workspaces/project/dist/src/index.js] *rewrite with same content*
diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/files-containing-json-file-non-composite.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/files-containing-json-file-non-composite.js
index 38c5639b54c..80487d28a32 100644
--- a/testdata/baselines/reference/tsbuild/resolveJsonModule/files-containing-json-file-non-composite.js
+++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/files-containing-json-file-non-composite.js
@@ -25,7 +25,7 @@ export default hello.hello
}
tsgo --b project --v --explainFiles --listEmittedFiles
-ExitStatus:: Success
+ExitStatus:: DiagnosticsPresent_OutputsGenerated
Output::
[[90mHH:MM:SS AM[0m] Projects in this build:
* project/tsconfig.json
@@ -34,6 +34,12 @@ Output::
[[90mHH:MM:SS AM[0m] Building project 'project/tsconfig.json'...
+[96mproject/tsconfig.json[0m:[93m9[0m:[93m9[0m - [91merror[0m[90m TS5011: [0mThe common source directory of 'tsconfig.json' is './src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
+ Visit https://aka.ms/ts6 for migration information.
+
+[7m9[0m "outDir": "dist",
+[7m [0m [91m ~~~~~~~~[0m
+
TSFILE: /home/src/workspaces/solution/project/dist/src/hello.json
TSFILE: /home/src/workspaces/solution/project/dist/src/index.js
TSFILE: /home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo
@@ -44,6 +50,9 @@ project/src/hello.json
Part of 'files' list in tsconfig.json
project/src/index.ts
Part of 'files' list in tsconfig.json
+
+Found 1 error in project/tsconfig.json[90m:9[0m
+
//// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib*
///
interface Boolean {}
@@ -82,10 +91,11 @@ const hello_json_1 = __importDefault(require("./hello.json"));
exports.default = hello_json_1.default.hello;
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["../src/index.ts","../src/hello.json"]}
+{"version":"FakeTSVersion","errors":true,"root":["../src/index.ts","../src/hello.json"]}
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
+ "errors": true,
"root": [
{
"files": [
@@ -100,12 +110,12 @@ exports.default = hello_json_1.default.hello;
"original": "../src/hello.json"
}
],
- "size": 74
+ "size": 88
}
project/tsconfig.json::
SemanticDiagnostics::
-*refresh* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts
-*refresh* /home/src/workspaces/solution/project/src/hello.json
-*refresh* /home/src/workspaces/solution/project/src/index.ts
+*not cached* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts
+*not cached* /home/src/workspaces/solution/project/src/hello.json
+*not cached* /home/src/workspaces/solution/project/src/index.ts
Signatures::
diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-and-files-non-composite.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-and-files-non-composite.js
index 73ee4a484c6..50ca8826bee 100644
--- a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-and-files-non-composite.js
+++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-and-files-non-composite.js
@@ -25,7 +25,7 @@ export default hello.hello
}
tsgo --b project --v --explainFiles --listEmittedFiles
-ExitStatus:: Success
+ExitStatus:: DiagnosticsPresent_OutputsGenerated
Output::
[[90mHH:MM:SS AM[0m] Projects in this build:
* project/tsconfig.json
@@ -34,6 +34,12 @@ Output::
[[90mHH:MM:SS AM[0m] Building project 'project/tsconfig.json'...
+[96mproject/tsconfig.json[0m:[93m9[0m:[93m9[0m - [91merror[0m[90m TS5011: [0mThe common source directory of 'tsconfig.json' is './src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
+ Visit https://aka.ms/ts6 for migration information.
+
+[7m9[0m "outDir": "dist",
+[7m [0m [91m ~~~~~~~~[0m
+
TSFILE: /home/src/workspaces/solution/project/dist/src/hello.json
TSFILE: /home/src/workspaces/solution/project/dist/src/index.js
TSFILE: /home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo
@@ -44,6 +50,9 @@ project/src/hello.json
Imported via "./hello.json" from file 'project/src/index.ts'
project/src/index.ts
Matched by include pattern 'src/**/*' in 'project/tsconfig.json'
+
+Found 1 error in project/tsconfig.json[90m:9[0m
+
//// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib*
///
interface Boolean {}
@@ -82,10 +91,11 @@ const hello_json_1 = __importDefault(require("./hello.json"));
exports.default = hello_json_1.default.hello;
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["../src/hello.json","../src/index.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["../src/hello.json","../src/index.ts"]}
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
+ "errors": true,
"root": [
{
"files": [
@@ -100,12 +110,12 @@ exports.default = hello_json_1.default.hello;
"original": "../src/index.ts"
}
],
- "size": 74
+ "size": 88
}
project/tsconfig.json::
SemanticDiagnostics::
-*refresh* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts
-*refresh* /home/src/workspaces/solution/project/src/hello.json
-*refresh* /home/src/workspaces/solution/project/src/index.ts
+*not cached* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts
+*not cached* /home/src/workspaces/solution/project/src/hello.json
+*not cached* /home/src/workspaces/solution/project/src/index.ts
Signatures::
diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-and-file-name-matches-ts-file-non-composite.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-and-file-name-matches-ts-file-non-composite.js
index 767f0d01120..64a2e238929 100644
--- a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-and-file-name-matches-ts-file-non-composite.js
+++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-and-file-name-matches-ts-file-non-composite.js
@@ -25,7 +25,7 @@ export default hello.hello
}
tsgo --b project --v --explainFiles --listEmittedFiles
-ExitStatus:: Success
+ExitStatus:: DiagnosticsPresent_OutputsGenerated
Output::
[[90mHH:MM:SS AM[0m] Projects in this build:
* project/tsconfig.json
@@ -34,6 +34,12 @@ Output::
[[90mHH:MM:SS AM[0m] Building project 'project/tsconfig.json'...
+[96mproject/tsconfig.json[0m:[93m9[0m:[93m9[0m - [91merror[0m[90m TS5011: [0mThe common source directory of 'tsconfig.json' is './src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
+ Visit https://aka.ms/ts6 for migration information.
+
+[7m9[0m "outDir": "dist",
+[7m [0m [91m ~~~~~~~~[0m
+
TSFILE: /home/src/workspaces/solution/project/dist/src/index.json
TSFILE: /home/src/workspaces/solution/project/dist/src/index.js
TSFILE: /home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo
@@ -44,6 +50,9 @@ project/src/index.json
Matched by include pattern 'src/**/*' in 'project/tsconfig.json'
project/src/index.ts
Matched by include pattern 'src/**/*' in 'project/tsconfig.json'
+
+Found 1 error in project/tsconfig.json[90m:9[0m
+
//// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib*
///
interface Boolean {}
@@ -82,10 +91,11 @@ exports.default = index_json_1.default.hello;
}
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["../src/index.ts","../src/index.json"]}
+{"version":"FakeTSVersion","errors":true,"root":["../src/index.ts","../src/index.json"]}
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
+ "errors": true,
"root": [
{
"files": [
@@ -100,12 +110,12 @@ exports.default = index_json_1.default.hello;
"original": "../src/index.json"
}
],
- "size": 74
+ "size": 88
}
project/tsconfig.json::
SemanticDiagnostics::
-*refresh* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts
-*refresh* /home/src/workspaces/solution/project/src/index.json
-*refresh* /home/src/workspaces/solution/project/src/index.ts
+*not cached* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts
+*not cached* /home/src/workspaces/solution/project/src/index.json
+*not cached* /home/src/workspaces/solution/project/src/index.ts
Signatures::
diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-non-composite.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-non-composite.js
index 601758ba18d..79e1f9f8fce 100644
--- a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-non-composite.js
+++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-non-composite.js
@@ -25,7 +25,7 @@ export default hello.hello
}
tsgo --b project --v --explainFiles --listEmittedFiles
-ExitStatus:: Success
+ExitStatus:: DiagnosticsPresent_OutputsGenerated
Output::
[[90mHH:MM:SS AM[0m] Projects in this build:
* project/tsconfig.json
@@ -34,6 +34,12 @@ Output::
[[90mHH:MM:SS AM[0m] Building project 'project/tsconfig.json'...
+[96mproject/tsconfig.json[0m:[93m9[0m:[93m9[0m - [91merror[0m[90m TS5011: [0mThe common source directory of 'tsconfig.json' is './src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
+ Visit https://aka.ms/ts6 for migration information.
+
+[7m9[0m "outDir": "dist",
+[7m [0m [91m ~~~~~~~~[0m
+
TSFILE: /home/src/workspaces/solution/project/dist/src/hello.json
TSFILE: /home/src/workspaces/solution/project/dist/src/index.js
TSFILE: /home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo
@@ -44,6 +50,9 @@ project/src/hello.json
Matched by include pattern 'src/**/*' in 'project/tsconfig.json'
project/src/index.ts
Matched by include pattern 'src/**/*' in 'project/tsconfig.json'
+
+Found 1 error in project/tsconfig.json[90m:9[0m
+
//// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib*
///
interface Boolean {}
@@ -82,10 +91,11 @@ const hello_json_1 = __importDefault(require("./hello.json"));
exports.default = hello_json_1.default.hello;
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["../src/index.ts","../src/hello.json"]}
+{"version":"FakeTSVersion","errors":true,"root":["../src/index.ts","../src/hello.json"]}
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
+ "errors": true,
"root": [
{
"files": [
@@ -100,12 +110,12 @@ exports.default = hello_json_1.default.hello;
"original": "../src/hello.json"
}
],
- "size": 74
+ "size": 88
}
project/tsconfig.json::
SemanticDiagnostics::
-*refresh* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts
-*refresh* /home/src/workspaces/solution/project/src/hello.json
-*refresh* /home/src/workspaces/solution/project/src/index.ts
+*not cached* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts
+*not cached* /home/src/workspaces/solution/project/src/hello.json
+*not cached* /home/src/workspaces/solution/project/src/index.ts
Signatures::
diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-non-composite.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-non-composite.js
index 5125875cb61..8c519ca9797 100644
--- a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-non-composite.js
+++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-non-composite.js
@@ -25,7 +25,7 @@ export default hello.hello
}
tsgo --b project --v --explainFiles --listEmittedFiles
-ExitStatus:: Success
+ExitStatus:: DiagnosticsPresent_OutputsGenerated
Output::
[[90mHH:MM:SS AM[0m] Projects in this build:
* project/tsconfig.json
@@ -34,6 +34,12 @@ Output::
[[90mHH:MM:SS AM[0m] Building project 'project/tsconfig.json'...
+[96mproject/tsconfig.json[0m:[93m9[0m:[93m9[0m - [91merror[0m[90m TS5011: [0mThe common source directory of 'tsconfig.json' is './src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
+ Visit https://aka.ms/ts6 for migration information.
+
+[7m9[0m "outDir": "dist",
+[7m [0m [91m ~~~~~~~~[0m
+
TSFILE: /home/src/workspaces/solution/project/dist/src/hello.json
TSFILE: /home/src/workspaces/solution/project/dist/src/index.js
TSFILE: /home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo
@@ -43,6 +49,9 @@ project/src/hello.json
Imported via "./hello.json" from file 'project/src/index.ts'
project/src/index.ts
Matched by include pattern 'src/**/*' in 'project/tsconfig.json'
+
+Found 1 error in project/tsconfig.json[90m:9[0m
+
//// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib*
///
interface Boolean {}
@@ -81,10 +90,11 @@ const hello_json_1 = __importDefault(require("./hello.json"));
exports.default = hello_json_1.default.hello;
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["../src/index.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["../src/index.ts"]}
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
+ "errors": true,
"root": [
{
"files": [
@@ -93,12 +103,12 @@ exports.default = hello_json_1.default.hello;
"original": "../src/index.ts"
}
],
- "size": 54
+ "size": 68
}
project/tsconfig.json::
SemanticDiagnostics::
-*refresh* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts
-*refresh* /home/src/workspaces/solution/project/src/hello.json
-*refresh* /home/src/workspaces/solution/project/src/index.ts
+*not cached* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts
+*not cached* /home/src/workspaces/solution/project/src/hello.json
+*not cached* /home/src/workspaces/solution/project/src/index.ts
Signatures::
diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-without-rootDir-but-outside-configDirectory-non-composite.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-without-rootDir-but-outside-configDirectory-non-composite.js
index f0aee17c030..d1ff049a82f 100644
--- a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-without-rootDir-but-outside-configDirectory-non-composite.js
+++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-without-rootDir-but-outside-configDirectory-non-composite.js
@@ -25,7 +25,7 @@ export default hello.hello
}
tsgo --b project --v --explainFiles --listEmittedFiles
-ExitStatus:: Success
+ExitStatus:: DiagnosticsPresent_OutputsGenerated
Output::
[[90mHH:MM:SS AM[0m] Projects in this build:
* project/tsconfig.json
@@ -34,6 +34,12 @@ Output::
[[90mHH:MM:SS AM[0m] Building project 'project/tsconfig.json'...
+[96mproject/tsconfig.json[0m:[93m9[0m:[93m9[0m - [91merror[0m[90m TS5011: [0mThe common source directory of 'tsconfig.json' is './src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
+ Visit https://aka.ms/ts6 for migration information.
+
+[7m9[0m "outDir": "dist",
+[7m [0m [91m ~~~~~~~~[0m
+
TSFILE: /home/src/workspaces/solution/project/dist/src/index.js
TSFILE: /home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo
../../tslibs/TS/Lib/lib.es2025.full.d.ts
@@ -42,6 +48,9 @@ hello.json
Imported via "../../hello.json" from file 'project/src/index.ts'
project/src/index.ts
Matched by include pattern 'src/**/*' in 'project/tsconfig.json'
+
+Found 1 error in project/tsconfig.json[90m:9[0m
+
//// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib*
///
interface Boolean {}
@@ -75,10 +84,11 @@ const hello_json_1 = __importDefault(require("../../hello.json"));
exports.default = hello_json_1.default.hello;
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["../src/index.ts"]}
+{"version":"FakeTSVersion","errors":true,"root":["../src/index.ts"]}
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
+ "errors": true,
"root": [
{
"files": [
@@ -87,12 +97,12 @@ exports.default = hello_json_1.default.hello;
"original": "../src/index.ts"
}
],
- "size": 54
+ "size": 68
}
project/tsconfig.json::
SemanticDiagnostics::
-*refresh* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts
-*refresh* /home/src/workspaces/solution/hello.json
-*refresh* /home/src/workspaces/solution/project/src/index.ts
+*not cached* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts
+*not cached* /home/src/workspaces/solution/hello.json
+*not cached* /home/src/workspaces/solution/project/src/index.ts
Signatures::
diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap-non-composite.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap-non-composite.js
index a557389eaa4..7a2c04468ab 100644
--- a/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap-non-composite.js
+++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap-non-composite.js
@@ -25,7 +25,7 @@ export default hello.hello
}
tsgo --b project --v --explainFiles --listEmittedFiles
-ExitStatus:: Success
+ExitStatus:: DiagnosticsPresent_OutputsGenerated
Output::
[[90mHH:MM:SS AM[0m] Projects in this build:
* project/tsconfig.json
@@ -34,6 +34,12 @@ Output::
[[90mHH:MM:SS AM[0m] Building project 'project/tsconfig.json'...
+[96mproject/tsconfig.json[0m:[93m9[0m:[93m9[0m - [91merror[0m[90m TS5011: [0mThe common source directory of 'tsconfig.json' is './src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
+ Visit https://aka.ms/ts6 for migration information.
+
+[7m9[0m "outDir": "dist",
+[7m [0m [91m ~~~~~~~~[0m
+
TSFILE: /home/src/workspaces/solution/project/dist/src/hello.json
TSFILE: /home/src/workspaces/solution/project/dist/src/index.js.map
TSFILE: /home/src/workspaces/solution/project/dist/src/index.js
@@ -45,6 +51,9 @@ project/src/hello.json
Part of 'files' list in tsconfig.json
project/src/index.ts
Part of 'files' list in tsconfig.json
+
+Found 1 error in project/tsconfig.json[90m:9[0m
+
//// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib*
///
interface Boolean {}
@@ -85,10 +94,11 @@ exports.default = hello_json_1.default.hello;
//// [/home/src/workspaces/solution/project/dist/src/index.js.map] *new*
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;AAAA,8DAAgC;kBACjB,oBAAK,CAAC,KAAK"}
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo] *new*
-{"version":"FakeTSVersion","root":["../src/index.ts","../src/hello.json"]}
+{"version":"FakeTSVersion","errors":true,"root":["../src/index.ts","../src/hello.json"]}
//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new*
{
"version": "FakeTSVersion",
+ "errors": true,
"root": [
{
"files": [
@@ -103,25 +113,58 @@ exports.default = hello_json_1.default.hello;
"original": "../src/hello.json"
}
],
- "size": 74
+ "size": 88
}
project/tsconfig.json::
SemanticDiagnostics::
-*refresh* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts
-*refresh* /home/src/workspaces/solution/project/src/hello.json
-*refresh* /home/src/workspaces/solution/project/src/index.ts
+*not cached* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts
+*not cached* /home/src/workspaces/solution/project/src/hello.json
+*not cached* /home/src/workspaces/solution/project/src/index.ts
Signatures::
Edit [0]:: no change
tsgo --b project --v --explainFiles --listEmittedFiles
-ExitStatus:: Success
+ExitStatus:: DiagnosticsPresent_OutputsGenerated
Output::
[[90mHH:MM:SS AM[0m] Projects in this build:
* project/tsconfig.json
-[[90mHH:MM:SS AM[0m] Project 'project/tsconfig.json' is up to date because newest input 'project/src/index.ts' is older than output 'project/dist/src/hello.json'
+[[90mHH:MM:SS AM[0m] Project 'project/tsconfig.json' is out of date because buildinfo file 'project/dist/tsconfig.tsbuildinfo' indicates that program needs to report errors.
+
+[[90mHH:MM:SS AM[0m] Building project 'project/tsconfig.json'...
+
+[96mproject/tsconfig.json[0m:[93m9[0m:[93m9[0m - [91merror[0m[90m TS5011: [0mThe common source directory of 'tsconfig.json' is './src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
+ Visit https://aka.ms/ts6 for migration information.
+
+[7m9[0m "outDir": "dist",
+[7m [0m [91m ~~~~~~~~[0m
+
+TSFILE: /home/src/workspaces/solution/project/dist/src/hello.json
+TSFILE: /home/src/workspaces/solution/project/dist/src/index.js.map
+TSFILE: /home/src/workspaces/solution/project/dist/src/index.js
+TSFILE: /home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo
+../../tslibs/TS/Lib/lib.es2025.full.d.ts
+ Default library for target 'ES2025'
+project/src/hello.json
+ Imported via "./hello.json" from file 'project/src/index.ts'
+ Part of 'files' list in tsconfig.json
+project/src/index.ts
+ Part of 'files' list in tsconfig.json
+
+Found 1 error in project/tsconfig.json[90m:9[0m
+//// [/home/src/workspaces/solution/project/dist/src/hello.json] *rewrite with same content*
+//// [/home/src/workspaces/solution/project/dist/src/index.js] *rewrite with same content*
+//// [/home/src/workspaces/solution/project/dist/src/index.js.map] *rewrite with same content*
+//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo] *rewrite with same content*
+//// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *rewrite with same content*
+project/tsconfig.json::
+SemanticDiagnostics::
+*not cached* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts
+*not cached* /home/src/workspaces/solution/project/src/hello.json
+*not cached* /home/src/workspaces/solution/project/src/index.ts
+Signatures::
diff --git a/testdata/baselines/reference/tsc/declarationEmit/when-using-Windows-paths-and-uppercase-letters.js b/testdata/baselines/reference/tsc/declarationEmit/when-using-Windows-paths-and-uppercase-letters.js
index a8da47c2550..30a3742b82a 100644
--- a/testdata/baselines/reference/tsc/declarationEmit/when-using-Windows-paths-and-uppercase-letters.js
+++ b/testdata/baselines/reference/tsc/declarationEmit/when-using-Windows-paths-and-uppercase-letters.js
@@ -46,16 +46,11 @@ export interface MyType extends Function {
tsgo -p D:\Work\pkg1 --explainFiles
ExitStatus:: DiagnosticsPresent_OutputsGenerated
Output::
-[96msrc/main.ts[0m:[93m6[0m:[93m5[0m - [91merror[0m[90m TS2564: [0mProperty 'id' has no initializer and is not definitely assigned in the constructor.
+[96mtsconfig.json[0m:[93m5[0m:[93m9[0m - [91merror[0m[90m TS5011: [0mThe common source directory of 'tsconfig.json' is './src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
+ Visit https://aka.ms/ts6 for migration information.
-[7m6[0m id: string;
-[7m [0m [91m ~~[0m
-
-[96msrc/utils/index.ts[0m:[93m8[0m:[93m12[0m - [91merror[0m[90m TS2352: [0mConversion of type 'typeof PartialClassType' to type 'MyReturnType' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
- Cannot assign an abstract constructor type to a non-abstract constructor type.
-
-[7m8[0m return PartialClassType as MyReturnType;
-[7m [0m [91m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[0m
+[7m5[0m "outDir": "./dist",
+[7m [0m [91m ~~~~~~~~[0m
../../home/src/tslibs/TS/Lib/lib.es2017.full.d.ts
Default library for target 'ES2017'
@@ -68,11 +63,7 @@ src/utils/index.ts
src/main.ts
Matched by include pattern 'src' in 'tsconfig.json'
-Found 2 errors in 2 files.
-
-Errors Files
- 1 src/main.ts[90m:6[0m
- 1 src/utils/index.ts[90m:8[0m
+Found 1 error in tsconfig.json[90m:5[0m
//// [D:/Work/pkg1/dist/src/main.d.ts] *new*
declare const Sub_base: import("./utils/type-helpers").MyReturnType;
diff --git a/testdata/baselines/reference/tsc/moduleResolution/pnpm-style-layout.js b/testdata/baselines/reference/tsc/moduleResolution/pnpm-style-layout.js
index d5ec252f4f5..6db52d38aa0 100644
--- a/testdata/baselines/reference/tsc/moduleResolution/pnpm-style-layout.js
+++ b/testdata/baselines/reference/tsc/moduleResolution/pnpm-style-layout.js
@@ -268,6 +268,12 @@ Resolving real path for '/home/src/projects/component-type-checker/node_modules/
[7m3[0m "target": "es5",
[7m [0m [91m ~~~~~[0m
+[96mtsconfig.json[0m:[93m7[0m:[93m9[0m - [91merror[0m[90m TS5011: [0mThe common source directory of 'tsconfig.json' is './src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
+ Visit https://aka.ms/ts6 for migration information.
+
+[7m7[0m "outDir": "dist",
+[7m [0m [91m ~~~~~~~~[0m
+
../../../../tslibs/TS/Lib/lib.es5.d.ts
Library 'lib.es5.d.ts' specified in compilerOptions
../../node_modules/.pnpm/@component-type-checker+button@0.0.1/node_modules/@component-type-checker/button/src/index.ts
@@ -284,7 +290,7 @@ Resolving real path for '/home/src/projects/component-type-checker/node_modules/
src/app.tsx
Matched by include pattern 'src' in 'tsconfig.json'
-Found 1 error in tsconfig.json[90m:3[0m
+Found 2 errors in the same file, starting at: tsconfig.json[90m:3[0m
//// [/home/src/projects/component-type-checker/packages/app/dist/src/app.js] *new*
import { createButton } from "@component-type-checker/button";