diff --git a/internal/ast/utilities.go b/internal/ast/utilities.go
index fa0578d7fe4..4bf36bb6192 100644
--- a/internal/ast/utilities.go
+++ b/internal/ast/utilities.go
@@ -2851,6 +2851,19 @@ func isVariableDeclarationInitializedWithRequireHelper(node *Node, allowAccessed
IsRequireCall(initializer, true /*requireStringLiteralLikeArgument*/)
}
+func GetModuleSpecifierOfBareOrAccessedRequire(node *Node) *Node {
+ if isVariableDeclarationInitializedWithRequireHelper(node, false /*allowAccessedRequire*/) {
+ return node.Initializer().Arguments()[0]
+ }
+ if isVariableDeclarationInitializedWithRequireHelper(node, true /*allowAccessedRequire*/) {
+ leftmost := GetLeftmostAccessExpression(node.Initializer())
+ if IsRequireCall(leftmost, true /*requireStringLiteralLikeArgument*/) {
+ return leftmost.Arguments()[0]
+ }
+ }
+ return nil
+}
+
func IsModuleExportsAccessExpression(node *Node) bool {
if IsAccessExpression(node) && IsModuleIdentifier(node.Expression()) {
if name := GetElementOrPropertyAccessName(node); name != nil {
diff --git a/internal/checker/checker.go b/internal/checker/checker.go
index c4ef1928608..def3adead4b 100644
--- a/internal/checker/checker.go
+++ b/internal/checker/checker.go
@@ -14678,8 +14678,8 @@ func (c *Checker) resolveExternalModule(location *ast.Node, moduleReference stri
contextSpecifier = location.AsModuleDeclaration().Name()
} else if ast.IsLiteralImportTypeNode(location) {
contextSpecifier = location.AsImportTypeNode().Argument.AsLiteralTypeNode().Literal
- } else if ast.IsVariableDeclaration(location) && location.Initializer() != nil && ast.IsRequireCall(location.Initializer(), true /*requireStringLiteralLikeArgument*/) {
- contextSpecifier = location.Initializer().Arguments()[0]
+ } else if ast.IsVariableDeclarationInitializedToBareOrAccessedRequire(location) {
+ contextSpecifier = ast.GetModuleSpecifierOfBareOrAccessedRequire(location)
} else {
ancestor := ast.FindAncestor(location, ast.IsImportCall)
if ancestor != nil {
diff --git a/internal/compiler/program.go b/internal/compiler/program.go
index 865ad3db418..198078068dc 100644
--- a/internal/compiler/program.go
+++ b/internal/compiler/program.go
@@ -739,6 +739,10 @@ func (p *Program) verifyCompilerOptions() {
createRemovedOptionDiagnostic("allowSyntheticDefaultImports", "false", "")
}
+ if options.ModuleResolution == core.ModuleResolutionKindNode10 {
+ createRemovedOptionDiagnostic("moduleResolution", "node10", "")
+ }
+
if options.StrictPropertyInitialization.IsTrue() && !options.GetStrictOptionValue(options.StrictNullChecks) {
createDiagnosticForOptionName(diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "strictPropertyInitialization", "strictNullChecks")
}
diff --git a/internal/execute/tsctests/tsc_test.go b/internal/execute/tsctests/tsc_test.go
index 04f2cead1a1..bc4eb48efa2 100644
--- a/internal/execute/tsctests/tsc_test.go
+++ b/internal/execute/tsctests/tsc_test.go
@@ -2614,7 +2614,6 @@ func TestTscModuleResolution(t *testing.T) {
"target": "es5",
"module": "esnext",
"lib": ["ES5"],
- "moduleResolution": "node",
"outDir": "dist",
},
"include": ["src"],
diff --git a/internal/execute/tsctests/tscbuild_test.go b/internal/execute/tsctests/tscbuild_test.go
index eec8c0f646d..d9b0391219f 100644
--- a/internal/execute/tsctests/tscbuild_test.go
+++ b/internal/execute/tsctests/tscbuild_test.go
@@ -2631,7 +2631,6 @@ func TestBuildResolveJsonModule(t *testing.T) {
{
"compilerOptions": {
"composite": %t,
- "moduleResolution": "node",
"module": "commonjs",
"resolveJsonModule": true,
"esModuleInterop": true,
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 80487d28a32..dd15f557587 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
@@ -12,7 +12,6 @@ export default hello.hello
{
"compilerOptions": {
"composite": false,
- "moduleResolution": "node",
"module": "commonjs",
"resolveJsonModule": true,
"esModuleInterop": true,
@@ -34,10 +33,10 @@ 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.
+[96mproject/tsconfig.json[0m:[93m8[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",
+[7m8[0m "outDir": "dist",
[7m [0m [91m ~~~~~~~~[0m
TSFILE: /home/src/workspaces/solution/project/dist/src/hello.json
@@ -51,7 +50,7 @@ project/src/hello.json
project/src/index.ts
Part of 'files' list in tsconfig.json
-Found 1 error in project/tsconfig.json[90m:9[0m
+Found 1 error in project/tsconfig.json[90m:8[0m
//// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib*
///
diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/files-containing-json-file.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/files-containing-json-file.js
index b8335cb69e6..a972e003544 100644
--- a/testdata/baselines/reference/tsbuild/resolveJsonModule/files-containing-json-file.js
+++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/files-containing-json-file.js
@@ -12,7 +12,6 @@ export default hello.hello
{
"compilerOptions": {
"composite": true,
- "moduleResolution": "node",
"module": "commonjs",
"resolveJsonModule": true,
"esModuleInterop": true,
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 50ca8826bee..c4ecedf558a 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
@@ -12,7 +12,6 @@ export default hello.hello
{
"compilerOptions": {
"composite": false,
- "moduleResolution": "node",
"module": "commonjs",
"resolveJsonModule": true,
"esModuleInterop": true,
@@ -34,10 +33,10 @@ 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.
+[96mproject/tsconfig.json[0m:[93m8[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",
+[7m8[0m "outDir": "dist",
[7m [0m [91m ~~~~~~~~[0m
TSFILE: /home/src/workspaces/solution/project/dist/src/hello.json
@@ -51,7 +50,7 @@ project/src/hello.json
project/src/index.ts
Matched by include pattern 'src/**/*' in 'project/tsconfig.json'
-Found 1 error in project/tsconfig.json[90m:9[0m
+Found 1 error in project/tsconfig.json[90m:8[0m
//// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib*
///
diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-and-files.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-and-files.js
index d4eb60ea499..83f8b72d1f7 100644
--- a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-and-files.js
+++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-and-files.js
@@ -12,7 +12,6 @@ export default hello.hello
{
"compilerOptions": {
"composite": true,
- "moduleResolution": "node",
"module": "commonjs",
"resolveJsonModule": true,
"esModuleInterop": true,
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 64a2e238929..60a64f88f2d 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
@@ -12,7 +12,6 @@ export default hello.hello
{
"compilerOptions": {
"composite": false,
- "moduleResolution": "node",
"module": "commonjs",
"resolveJsonModule": true,
"esModuleInterop": true,
@@ -34,10 +33,10 @@ 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.
+[96mproject/tsconfig.json[0m:[93m8[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",
+[7m8[0m "outDir": "dist",
[7m [0m [91m ~~~~~~~~[0m
TSFILE: /home/src/workspaces/solution/project/dist/src/index.json
@@ -51,7 +50,7 @@ project/src/index.json
project/src/index.ts
Matched by include pattern 'src/**/*' in 'project/tsconfig.json'
-Found 1 error in project/tsconfig.json[90m:9[0m
+Found 1 error in project/tsconfig.json[90m:8[0m
//// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib*
///
diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-and-file-name-matches-ts-file.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-and-file-name-matches-ts-file.js
index 59a39226f81..3e9ea58b79c 100644
--- a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-and-file-name-matches-ts-file.js
+++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-and-file-name-matches-ts-file.js
@@ -12,7 +12,6 @@ export default hello.hello
{
"compilerOptions": {
"composite": true,
- "moduleResolution": "node",
"module": "commonjs",
"resolveJsonModule": true,
"esModuleInterop": true,
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 79e1f9f8fce..39811cc20d4 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
@@ -12,7 +12,6 @@ export default hello.hello
{
"compilerOptions": {
"composite": false,
- "moduleResolution": "node",
"module": "commonjs",
"resolveJsonModule": true,
"esModuleInterop": true,
@@ -34,10 +33,10 @@ 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.
+[96mproject/tsconfig.json[0m:[93m8[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",
+[7m8[0m "outDir": "dist",
[7m [0m [91m ~~~~~~~~[0m
TSFILE: /home/src/workspaces/solution/project/dist/src/hello.json
@@ -51,7 +50,7 @@ project/src/hello.json
project/src/index.ts
Matched by include pattern 'src/**/*' in 'project/tsconfig.json'
-Found 1 error in project/tsconfig.json[90m:9[0m
+Found 1 error in project/tsconfig.json[90m:8[0m
//// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib*
///
diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include.js
index e47b5730b61..bc6b10d003b 100644
--- a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include.js
+++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include.js
@@ -12,7 +12,6 @@ export default hello.hello
{
"compilerOptions": {
"composite": true,
- "moduleResolution": "node",
"module": "commonjs",
"resolveJsonModule": true,
"esModuleInterop": true,
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 8c519ca9797..374bc890651 100644
--- a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-non-composite.js
+++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-non-composite.js
@@ -12,7 +12,6 @@ export default hello.hello
{
"compilerOptions": {
"composite": false,
- "moduleResolution": "node",
"module": "commonjs",
"resolveJsonModule": true,
"esModuleInterop": true,
@@ -34,10 +33,10 @@ 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.
+[96mproject/tsconfig.json[0m:[93m8[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",
+[7m8[0m "outDir": "dist",
[7m [0m [91m ~~~~~~~~[0m
TSFILE: /home/src/workspaces/solution/project/dist/src/hello.json
@@ -50,7 +49,7 @@ project/src/hello.json
project/src/index.ts
Matched by include pattern 'src/**/*' in 'project/tsconfig.json'
-Found 1 error in project/tsconfig.json[90m:9[0m
+Found 1 error in project/tsconfig.json[90m:8[0m
//// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib*
///
diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-not-in-rootDir-non-composite.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-not-in-rootDir-non-composite.js
index aff29af5df8..d9ff524fc44 100644
--- a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-not-in-rootDir-non-composite.js
+++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-not-in-rootDir-non-composite.js
@@ -12,7 +12,6 @@ export default hello.hello
{
"compilerOptions": {
"composite": false,
- "moduleResolution": "node",
"module": "commonjs",
"resolveJsonModule": true,
"esModuleInterop": true,
diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-not-in-rootDir.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-not-in-rootDir.js
index 11d2e32e081..c411a28df30 100644
--- a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-not-in-rootDir.js
+++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-not-in-rootDir.js
@@ -12,7 +12,6 @@ export default hello.hello
{
"compilerOptions": {
"composite": true,
- "moduleResolution": "node",
"module": "commonjs",
"resolveJsonModule": true,
"esModuleInterop": true,
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 d1ff049a82f..2025a6b242f 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
@@ -12,7 +12,6 @@ export default hello.hello
{
"compilerOptions": {
"composite": false,
- "moduleResolution": "node",
"module": "commonjs",
"resolveJsonModule": true,
"esModuleInterop": true,
@@ -34,10 +33,10 @@ 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.
+[96mproject/tsconfig.json[0m:[93m8[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",
+[7m8[0m "outDir": "dist",
[7m [0m [91m ~~~~~~~~[0m
TSFILE: /home/src/workspaces/solution/project/dist/src/index.js
@@ -49,7 +48,7 @@ hello.json
project/src/index.ts
Matched by include pattern 'src/**/*' in 'project/tsconfig.json'
-Found 1 error in project/tsconfig.json[90m:9[0m
+Found 1 error in project/tsconfig.json[90m:8[0m
//// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib*
///
diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-without-rootDir-but-outside-configDirectory.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-without-rootDir-but-outside-configDirectory.js
index bac31daa2b5..9f8bc4f412a 100644
--- a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-without-rootDir-but-outside-configDirectory.js
+++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-without-rootDir-but-outside-configDirectory.js
@@ -12,7 +12,6 @@ export default hello.hello
{
"compilerOptions": {
"composite": true,
- "moduleResolution": "node",
"module": "commonjs",
"resolveJsonModule": true,
"esModuleInterop": true,
diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-without-outDir-non-composite.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-without-outDir-non-composite.js
index 911a1dee718..6e1b6f82b82 100644
--- a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-without-outDir-non-composite.js
+++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-without-outDir-non-composite.js
@@ -12,7 +12,6 @@ export default hello.hello
{
"compilerOptions": {
"composite": false,
- "moduleResolution": "node",
"module": "commonjs",
"resolveJsonModule": true,
"esModuleInterop": true,
diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-without-outDir.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-without-outDir.js
index abbed1eb375..df1ddac314c 100644
--- a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-without-outDir.js
+++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-without-outDir.js
@@ -12,7 +12,6 @@ export default hello.hello
{
"compilerOptions": {
"composite": true,
- "moduleResolution": "node",
"module": "commonjs",
"resolveJsonModule": true,
"esModuleInterop": true,
diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only.js
index 6d32e5398da..9614e250a40 100644
--- a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only.js
+++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only.js
@@ -12,7 +12,6 @@ export default hello.hello
{
"compilerOptions": {
"composite": true,
- "moduleResolution": "node",
"module": "commonjs",
"resolveJsonModule": true,
"esModuleInterop": true,
diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap-non-composite.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap-non-composite.js
index 7a2c04468ab..d40fa043398 100644
--- a/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap-non-composite.js
+++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap-non-composite.js
@@ -12,7 +12,6 @@ export default hello.hello
{
"compilerOptions": {
"composite": false,
- "moduleResolution": "node",
"module": "commonjs",
"resolveJsonModule": true,
"esModuleInterop": true,
@@ -34,10 +33,10 @@ 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.
+[96mproject/tsconfig.json[0m:[93m8[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",
+[7m8[0m "outDir": "dist",
[7m [0m [91m ~~~~~~~~[0m
TSFILE: /home/src/workspaces/solution/project/dist/src/hello.json
@@ -52,7 +51,7 @@ project/src/hello.json
project/src/index.ts
Part of 'files' list in tsconfig.json
-Found 1 error in project/tsconfig.json[90m:9[0m
+Found 1 error in project/tsconfig.json[90m:8[0m
//// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib*
///
@@ -136,10 +135,10 @@ 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.
+[96mproject/tsconfig.json[0m:[93m8[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",
+[7m8[0m "outDir": "dist",
[7m [0m [91m ~~~~~~~~[0m
TSFILE: /home/src/workspaces/solution/project/dist/src/hello.json
@@ -154,7 +153,7 @@ project/src/hello.json
project/src/index.ts
Part of 'files' list in tsconfig.json
-Found 1 error in project/tsconfig.json[90m:9[0m
+Found 1 error in project/tsconfig.json[90m:8[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*
diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap.js
index db3f0bcd6d0..b9cd01d08e8 100644
--- a/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap.js
+++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap.js
@@ -12,7 +12,6 @@ export default hello.hello
{
"compilerOptions": {
"composite": true,
- "moduleResolution": "node",
"module": "commonjs",
"resolveJsonModule": true,
"esModuleInterop": true,
diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/without-outDir-non-composite.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/without-outDir-non-composite.js
index 48d54833ebf..c11fa894568 100644
--- a/testdata/baselines/reference/tsbuild/resolveJsonModule/without-outDir-non-composite.js
+++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/without-outDir-non-composite.js
@@ -12,7 +12,6 @@ export default hello.hello
{
"compilerOptions": {
"composite": false,
- "moduleResolution": "node",
"module": "commonjs",
"resolveJsonModule": true,
"esModuleInterop": true,
diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/without-outDir.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/without-outDir.js
index 1390531520a..0e2ffad7f54 100644
--- a/testdata/baselines/reference/tsbuild/resolveJsonModule/without-outDir.js
+++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/without-outDir.js
@@ -12,7 +12,6 @@ export default hello.hello
{
"compilerOptions": {
"composite": true,
- "moduleResolution": "node",
"module": "commonjs",
"resolveJsonModule": true,
"esModuleInterop": true,
diff --git a/testdata/baselines/reference/tsc/moduleResolution/pnpm-style-layout.js b/testdata/baselines/reference/tsc/moduleResolution/pnpm-style-layout.js
index 39d0032ee65..9828bd77ad0 100644
--- a/testdata/baselines/reference/tsc/moduleResolution/pnpm-style-layout.js
+++ b/testdata/baselines/reference/tsc/moduleResolution/pnpm-style-layout.js
@@ -89,7 +89,6 @@ const button: Button = createButton();
"target": "es5",
"module": "esnext",
"lib": ["ES5"],
- "moduleResolution": "node",
"outDir": "dist",
},
"include": ["src"],
@@ -248,10 +247,10 @@ 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.
+[96mtsconfig.json[0m:[93m6[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",
+[7m6[0m "outDir": "dist",
[7m [0m [91m ~~~~~~~~[0m
../../../../tslibs/TS/Lib/lib.es5.d.ts