From 8c36d1073d975fa49347bd8c0ff9a15bdf4ebcf2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 03:30:52 +0000 Subject: [PATCH 1/4] Initial plan From ea16a98030933b1669639b48a6fbc1960e567609 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 03:56:12 +0000 Subject: [PATCH 2/4] Deprecate --moduleResolution node10: add removed option diagnostic, port getModuleSpecifierOfBareOrAccessedRequire, update checker Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com> --- internal/ast/utilities.go | 35 ++++++++++++ internal/checker/checker.go | 4 +- internal/compiler/program.go | 4 ++ ...iles-containing-json-file-non-composite.js | 21 +++++-- .../files-containing-json-file.js | 26 +++++++-- .../include-and-files-non-composite.js | 21 +++++-- .../resolveJsonModule/include-and-files.js | 26 +++++++-- ...file-name-matches-ts-file-non-composite.js | 21 +++++-- ...r-include-and-file-name-matches-ts-file.js | 26 +++++++-- ...-along-with-other-include-non-composite.js | 21 +++++-- ...nclude-of-json-along-with-other-include.js | 26 +++++++-- .../include-only-non-composite.js | 21 +++++-- ...-with-json-not-in-rootDir-non-composite.js | 21 +++++-- .../include-only-with-json-not-in-rootDir.js | 26 +++++++-- ...t-outside-configDirectory-non-composite.js | 21 +++++-- ...out-rootDir-but-outside-configDirectory.js | 26 +++++++-- ...clude-only-without-outDir-non-composite.js | 21 +++++-- .../include-only-without-outDir.js | 26 +++++++-- .../tsbuild/resolveJsonModule/include-only.js | 23 +++++--- .../sourcemap-non-composite.js | 57 ++++++++++++++++--- .../tsbuild/resolveJsonModule/sourcemap.js | 53 ++++++++++++++--- .../without-outDir-non-composite.js | 53 ++++++++++++++--- .../resolveJsonModule/without-outDir.js | 53 ++++++++++++++--- .../tsc/moduleResolution/pnpm-style-layout.js | 7 ++- 24 files changed, 505 insertions(+), 134 deletions(-) diff --git a/internal/ast/utilities.go b/internal/ast/utilities.go index 7a8dcecd3c0..203b8fe1547 100644 --- a/internal/ast/utilities.go +++ b/internal/ast/utilities.go @@ -2803,6 +2803,41 @@ func IsVariableDeclarationInitializedToRequire(node *Node) bool { IsRequireCall(node.Initializer(), true /*requireStringLiteralLikeArgument*/) } +// IsVariableDeclarationInitializedToBareOrAccessedRequire is like IsVariableDeclarationInitializedToRequire +// but also allows things like `require("...").foo.bar` or `require("...")["baz"]`. +func IsVariableDeclarationInitializedToBareOrAccessedRequire(node *Node) bool { + return isVariableDeclarationInitializedWithRequireHelper(node, true /*allowAccessedRequire*/) +} + +// GetModuleSpecifierOfBareOrAccessedRequire extracts the module specifier string literal +// from a variable declaration initialized to a require call or an accessed require call. +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 isVariableDeclarationInitializedWithRequireHelper(node *Node, allowAccessedRequire bool) bool { + if !IsVariableDeclaration(node) { + return false + } + init := node.Initializer() + if init == nil { + return false + } + if allowAccessedRequire { + return IsRequireCall(GetLeftmostAccessExpression(init), true /*requireStringLiteralLikeArgument*/) + } + return IsRequireCall(init, true /*requireStringLiteralLikeArgument*/) +} + 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 76924c9009d..551a16c4c97 100644 --- a/internal/checker/checker.go +++ b/internal/checker/checker.go @@ -14758,8 +14758,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 c46207e545e..e77509d0099 100644 --- a/internal/compiler/program.go +++ b/internal/compiler/program.go @@ -688,6 +688,10 @@ func (p *Program) verifyCompilerOptions() { createRemovedOptionDiagnostic("alwaysStrict", "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/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..a18ef89afc8 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:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,6 +34,11 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... +project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. + +4 "moduleResolution": "node", +   ~~~~~~ + 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 +49,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:4 + //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -82,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","../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 +109,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/files-containing-json-file.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/files-containing-json-file.js index 5e5b6d641fd..cc9381b29bf 100644 --- a/testdata/baselines/reference/tsbuild/resolveJsonModule/files-containing-json-file.js +++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/files-containing-json-file.js @@ -25,7 +25,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: Success +ExitStatus:: DiagnosticsPresent_OutputsGenerated Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,6 +34,11 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... +project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. + +4 "moduleResolution": "node", +   ~~~~~~ + 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/src/index.d.ts @@ -45,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:4 + //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -87,10 +95,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":[[2,3]],"fileNames":["lib.es2025.full.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/index.d.ts"} +{"version":"FakeTSVersion","errors":true,"root":[[2,3]],"fileNames":["lib.es2025.full.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./src/index.d.ts"} //// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "errors": true, "root": [ { "files": [ @@ -160,14 +169,19 @@ exports.default = hello_json_1.default.hello; "../src/hello.json" ] }, + "semanticDiagnosticsPerFile": [ + "lib.es2025.full.d.ts", + "../src/hello.json", + "../src/index.ts" + ], "latestChangedDtsFile": "./src/index.d.ts", - "size": 1444 + "size": 1495 } 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:: (stored at emit) /home/src/workspaces/solution/project/src/index.ts 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..5e7527e26e2 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:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,6 +34,11 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... +project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. + +4 "moduleResolution": "node", +   ~~~~~~ + 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 +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:4 + //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -82,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/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 +109,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-and-files.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-and-files.js index c68c300898b..a9a783a2b6c 100644 --- a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-and-files.js +++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-and-files.js @@ -25,7 +25,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: Success +ExitStatus:: DiagnosticsPresent_OutputsGenerated Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,6 +34,11 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... +project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. + +4 "moduleResolution": "node", +   ~~~~~~ + 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/src/index.d.ts @@ -45,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:4 + //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -87,10 +95,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":[[2,3]],"fileNames":["lib.es2025.full.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/index.d.ts"} +{"version":"FakeTSVersion","errors":true,"root":[[2,3]],"fileNames":["lib.es2025.full.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./src/index.d.ts"} //// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "errors": true, "root": [ { "files": [ @@ -160,14 +169,19 @@ exports.default = hello_json_1.default.hello; "../src/hello.json" ] }, + "semanticDiagnosticsPerFile": [ + "lib.es2025.full.d.ts", + "../src/hello.json", + "../src/index.ts" + ], "latestChangedDtsFile": "./src/index.d.ts", - "size": 1444 + "size": 1495 } 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:: (stored at emit) /home/src/workspaces/solution/project/src/index.ts 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..c652d638476 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:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,6 +34,11 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... +project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. + +4 "moduleResolution": "node", +   ~~~~~~ + 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 +49,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:4 + //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -82,10 +90,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 +109,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-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 b2edf3b7d35..dd099581bde 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 @@ -25,7 +25,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: Success +ExitStatus:: DiagnosticsPresent_OutputsGenerated Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,6 +34,11 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... +project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. + +4 "moduleResolution": "node", +   ~~~~~~ + 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/src/index.d.ts @@ -45,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:4 + //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -87,10 +95,11 @@ exports.default = index_json_1.default.hello; } //// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2025.full.d.ts","../src/index.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"fe545b3049ca1f2ad9aac3a6ebf9aebb-import hello from \"./index.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/index.d.ts"} +{"version":"FakeTSVersion","errors":true,"root":[[2,3]],"fileNames":["lib.es2025.full.d.ts","../src/index.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"fe545b3049ca1f2ad9aac3a6ebf9aebb-import hello from \"./index.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./src/index.d.ts"} //// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "errors": true, "root": [ { "files": [ @@ -160,14 +169,19 @@ exports.default = index_json_1.default.hello; "../src/index.json" ] }, + "semanticDiagnosticsPerFile": [ + "lib.es2025.full.d.ts", + "../src/index.json", + "../src/index.ts" + ], "latestChangedDtsFile": "./src/index.d.ts", - "size": 1444 + "size": 1495 } 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:: (stored at emit) /home/src/workspaces/solution/project/src/index.ts 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..ba765c36c90 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:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,6 +34,11 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... +project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. + +4 "moduleResolution": "node", +   ~~~~~~ + 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 +49,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:4 + //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -82,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","../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 +109,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-of-json-along-with-other-include.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include.js index e3c08a957e4..f3cc9652b60 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 @@ -25,7 +25,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: Success +ExitStatus:: DiagnosticsPresent_OutputsGenerated Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,6 +34,11 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... +project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. + +4 "moduleResolution": "node", +   ~~~~~~ + 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/src/index.d.ts @@ -45,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:4 + //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -87,10 +95,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":[[2,3]],"fileNames":["lib.es2025.full.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/index.d.ts"} +{"version":"FakeTSVersion","errors":true,"root":[[2,3]],"fileNames":["lib.es2025.full.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./src/index.d.ts"} //// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "errors": true, "root": [ { "files": [ @@ -160,14 +169,19 @@ exports.default = hello_json_1.default.hello; "../src/hello.json" ] }, + "semanticDiagnosticsPerFile": [ + "lib.es2025.full.d.ts", + "../src/hello.json", + "../src/index.ts" + ], "latestChangedDtsFile": "./src/index.d.ts", - "size": 1444 + "size": 1495 } 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:: (stored at emit) /home/src/workspaces/solution/project/src/index.ts 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..27a81c7f64d 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:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,6 +34,11 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... +project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. + +4 "moduleResolution": "node", +   ~~~~~~ + 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 +48,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:4 + //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -81,10 +89,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 +102,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-not-in-rootDir-non-composite.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-not-in-rootDir-non-composite.js index aff29af5df8..4227fd13bf7 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 @@ -25,7 +25,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: Success +ExitStatus:: DiagnosticsPresent_OutputsGenerated Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,6 +34,11 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... +project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. + +4 "moduleResolution": "node", +   ~~~~~~ + TSFILE: /home/src/workspaces/solution/project/dist/index.js TSFILE: /home/src/workspaces/solution/project/tsconfig.tsbuildinfo ../../tslibs/TS/Lib/lib.es2025.full.d.ts @@ -42,6 +47,9 @@ project/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:4 + //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -75,10 +83,11 @@ const hello_json_1 = __importDefault(require("../hello.json")); exports.default = hello_json_1.default.hello; //// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","root":["./src/index.ts"]} +{"version":"FakeTSVersion","errors":true,"root":["./src/index.ts"]} //// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "errors": true, "root": [ { "files": [ @@ -87,12 +96,12 @@ exports.default = hello_json_1.default.hello; "original": "./src/index.ts" } ], - "size": 53 + "size": 67 } project/tsconfig.json:: SemanticDiagnostics:: -*refresh* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts -*refresh* /home/src/workspaces/solution/project/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/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-not-in-rootDir.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-not-in-rootDir.js index 4e9168cda6e..ef8b804fcae 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 @@ -25,7 +25,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: Success +ExitStatus:: DiagnosticsPresent_OutputsGenerated Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,6 +34,11 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... +project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. + +4 "moduleResolution": "node", +   ~~~~~~ + TSFILE: /home/src/workspaces/solution/project/dist/index.js TSFILE: /home/src/workspaces/solution/project/dist/index.d.ts TSFILE: /home/src/workspaces/solution/project/tsconfig.tsbuildinfo @@ -43,6 +48,9 @@ project/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:4 + //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -80,10 +88,11 @@ const hello_json_1 = __importDefault(require("../hello.json")); exports.default = hello_json_1.default.hello; //// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","root":[3],"fileNames":["lib.es2025.full.d.ts","./hello.json","./src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"a4ada5a36528c3fb01d6f98af94bc507-import hello from \"../hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./dist","rootDir":"./src","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./dist/index.d.ts"} +{"version":"FakeTSVersion","errors":true,"root":[3],"fileNames":["lib.es2025.full.d.ts","./hello.json","./src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"a4ada5a36528c3fb01d6f98af94bc507-import hello from \"../hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./dist","rootDir":"./src","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./dist/index.d.ts"} //// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "errors": true, "root": [ { "files": [ @@ -150,14 +159,19 @@ exports.default = hello_json_1.default.hello; "./hello.json" ] }, + "semanticDiagnosticsPerFile": [ + "lib.es2025.full.d.ts", + "./hello.json", + "./src/index.ts" + ], "latestChangedDtsFile": "./dist/index.d.ts", - "size": 1458 + "size": 1509 } project/tsconfig.json:: SemanticDiagnostics:: -*refresh* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts -*refresh* /home/src/workspaces/solution/project/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/hello.json +*not cached* /home/src/workspaces/solution/project/src/index.ts Signatures:: (stored at emit) /home/src/workspaces/solution/project/src/index.ts 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..37b0cabc47c 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:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,6 +34,11 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... +project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. + +4 "moduleResolution": "node", +   ~~~~~~ + 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 +47,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:4 + //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -75,10 +83,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 +96,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/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 f0bda2c5b98..f7199e5de6c 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 @@ -25,7 +25,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: Success +ExitStatus:: DiagnosticsPresent_OutputsGenerated Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,6 +34,11 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... +project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. + +4 "moduleResolution": "node", +   ~~~~~~ + TSFILE: /home/src/workspaces/solution/project/dist/src/index.js TSFILE: /home/src/workspaces/solution/project/dist/src/index.d.ts TSFILE: /home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo @@ -43,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:4 + //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -80,10 +88,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":[3],"fileNames":["lib.es2025.full.d.ts","../../hello.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"6f9721ccc194272bc2b0e0566ab15e63-import hello from \"../../hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/index.d.ts"} +{"version":"FakeTSVersion","errors":true,"root":[3],"fileNames":["lib.es2025.full.d.ts","../../hello.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"6f9721ccc194272bc2b0e0566ab15e63-import hello from \"../../hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./src/index.d.ts"} //// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "errors": true, "root": [ { "files": [ @@ -149,14 +158,19 @@ exports.default = hello_json_1.default.hello; "../../hello.json" ] }, + "semanticDiagnosticsPerFile": [ + "lib.es2025.full.d.ts", + "../../hello.json", + "../src/index.ts" + ], "latestChangedDtsFile": "./src/index.d.ts", - "size": 1443 + "size": 1494 } 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:: (stored at emit) /home/src/workspaces/solution/project/src/index.ts 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..3fbbb668316 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 @@ -25,7 +25,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: Success +ExitStatus:: DiagnosticsPresent_OutputsGenerated Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,6 +34,11 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... +project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. + +4 "moduleResolution": "node", +   ~~~~~~ + TSFILE: /home/src/workspaces/solution/project/src/index.js TSFILE: /home/src/workspaces/solution/project/tsconfig.tsbuildinfo ../../tslibs/TS/Lib/lib.es2025.full.d.ts @@ -42,6 +47,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:4 + //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -75,10 +83,11 @@ const hello_json_1 = __importDefault(require("./hello.json")); exports.default = hello_json_1.default.hello; //// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","root":["./src/index.ts"]} +{"version":"FakeTSVersion","errors":true,"root":["./src/index.ts"]} //// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "errors": true, "root": [ { "files": [ @@ -87,12 +96,12 @@ exports.default = hello_json_1.default.hello; "original": "./src/index.ts" } ], - "size": 53 + "size": 67 } 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-without-outDir.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-without-outDir.js index 2251af60a17..3bd4ee36f89 100644 --- a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-without-outDir.js +++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-without-outDir.js @@ -25,7 +25,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: Success +ExitStatus:: DiagnosticsPresent_OutputsGenerated Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,6 +34,11 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... +project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. + +4 "moduleResolution": "node", +   ~~~~~~ + TSFILE: /home/src/workspaces/solution/project/src/index.js TSFILE: /home/src/workspaces/solution/project/src/index.d.ts TSFILE: /home/src/workspaces/solution/project/tsconfig.tsbuildinfo @@ -43,6 +48,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:4 + //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -80,10 +88,11 @@ const hello_json_1 = __importDefault(require("./hello.json")); exports.default = hello_json_1.default.hello; //// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","root":[3],"fileNames":["lib.es2025.full.d.ts","./src/hello.json","./src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"skipDefaultLibCheck":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/index.d.ts"} +{"version":"FakeTSVersion","errors":true,"root":[3],"fileNames":["lib.es2025.full.d.ts","./src/hello.json","./src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"skipDefaultLibCheck":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./src/index.d.ts"} //// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "errors": true, "root": [ { "files": [ @@ -148,14 +157,19 @@ exports.default = hello_json_1.default.hello; "./src/hello.json" ] }, + "semanticDiagnosticsPerFile": [ + "lib.es2025.full.d.ts", + "./src/hello.json", + "./src/index.ts" + ], "latestChangedDtsFile": "./src/index.d.ts", - "size": 1424 + "size": 1475 } 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:: (stored at emit) /home/src/workspaces/solution/project/src/index.ts diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only.js index 61b28f003e5..8e14910d383 100644 --- a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only.js +++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only.js @@ -34,10 +34,10 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/src/index.ts:1:19 - error TS6307: File '/home/src/workspaces/solution/project/src/hello.json' is not listed within the file list of project '/home/src/workspaces/solution/project/tsconfig.json'. Projects must list all files or use an 'include' pattern. +project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. -1 import hello from "./hello.json" -   ~~~~~~~~~~~~~~ +4 "moduleResolution": "node", +   ~~~~~~ TSFILE: /home/src/workspaces/solution/project/dist/src/hello.json TSFILE: /home/src/workspaces/solution/project/dist/src/index.js @@ -50,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/src/index.ts:1 +Found 1 error in project/tsconfig.json:4 //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// @@ -94,7 +94,7 @@ 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","errors":true,"root":[3],"fileNames":["lib.es2025.full.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/index.d.ts"} +{"version":"FakeTSVersion","errors":true,"root":[3],"fileNames":["lib.es2025.full.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./src/index.d.ts"} //// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", @@ -164,14 +164,19 @@ exports.default = hello_json_1.default.hello; "../src/hello.json" ] }, + "semanticDiagnosticsPerFile": [ + "lib.es2025.full.d.ts", + "../src/hello.json", + "../src/index.ts" + ], "latestChangedDtsFile": "./src/index.d.ts", - "size": 1454 + "size": 1491 } 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:: (stored at emit) /home/src/workspaces/solution/project/src/index.ts diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap-non-composite.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap-non-composite.js index a557389eaa4..5b78020748d 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:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,6 +34,11 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... +project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. + +4 "moduleResolution": "node", +   ~~~~~~ + 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 +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:4 + //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -85,10 +93,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 +112,57 @@ 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:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json -[HH:MM:SS AM] Project 'project/tsconfig.json' is up to date because newest input 'project/src/index.ts' is older than output 'project/dist/src/hello.json' +[HH:MM:SS AM] Project 'project/tsconfig.json' is out of date because buildinfo file 'project/dist/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project/tsconfig.json'... + +project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. + +4 "moduleResolution": "node", +   ~~~~~~ + +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:4 +//// [/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/tsbuild/resolveJsonModule/sourcemap.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap.js index 3e216a70e83..7a47d59945c 100644 --- a/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap.js +++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap.js @@ -25,7 +25,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: Success +ExitStatus:: DiagnosticsPresent_OutputsGenerated Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,6 +34,11 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... +project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. + +4 "moduleResolution": "node", +   ~~~~~~ + 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 @@ -46,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:4 + //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -90,10 +98,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":[[2,3]],"fileNames":["lib.es2025.full.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/index.d.ts"} +{"version":"FakeTSVersion","errors":true,"root":[[2,3]],"fileNames":["lib.es2025.full.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./src/index.d.ts"} //// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "errors": true, "root": [ { "files": [ @@ -164,15 +173,20 @@ exports.default = hello_json_1.default.hello; "../src/hello.json" ] }, + "semanticDiagnosticsPerFile": [ + "lib.es2025.full.d.ts", + "../src/hello.json", + "../src/index.ts" + ], "latestChangedDtsFile": "./src/index.d.ts", - "size": 1461 + "size": 1512 } 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:: (stored at emit) /home/src/workspaces/solution/project/src/index.ts @@ -180,11 +194,34 @@ Signatures:: Edit [0]:: no change tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: Success +ExitStatus:: DiagnosticsPresent_OutputsGenerated Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json -[HH:MM:SS AM] Project 'project/tsconfig.json' is up to date because newest input 'project/src/index.ts' is older than output 'project/dist/tsconfig.tsbuildinfo' +[HH:MM:SS AM] Project 'project/tsconfig.json' is out of date because buildinfo file 'project/dist/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project/tsconfig.json'... + +project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. + +4 "moduleResolution": "node", +   ~~~~~~ + +../../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:4 +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/tsbuild/resolveJsonModule/without-outDir-non-composite.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/without-outDir-non-composite.js index 48d54833ebf..a67a0957840 100644 --- a/testdata/baselines/reference/tsbuild/resolveJsonModule/without-outDir-non-composite.js +++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/without-outDir-non-composite.js @@ -25,7 +25,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: Success +ExitStatus:: DiagnosticsPresent_OutputsGenerated Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,6 +34,11 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... +project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. + +4 "moduleResolution": "node", +   ~~~~~~ + TSFILE: /home/src/workspaces/solution/project/src/index.js TSFILE: /home/src/workspaces/solution/project/tsconfig.tsbuildinfo ../../tslibs/TS/Lib/lib.es2025.full.d.ts @@ -43,6 +48,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:4 + //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -76,10 +84,11 @@ const hello_json_1 = __importDefault(require("./hello.json")); exports.default = hello_json_1.default.hello; //// [/home/src/workspaces/solution/project/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/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "errors": true, "root": [ { "files": [ @@ -94,25 +103,53 @@ exports.default = hello_json_1.default.hello; "original": "./src/hello.json" } ], - "size": 72 + "size": 86 } 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:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json -[HH:MM:SS AM] Project 'project/tsconfig.json' is up to date because newest input 'project/src/index.ts' is older than output 'project/src/index.js' +[HH:MM:SS AM] Project 'project/tsconfig.json' is out of date because buildinfo file 'project/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project/tsconfig.json'... + +project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. + +4 "moduleResolution": "node", +   ~~~~~~ + +TSFILE: /home/src/workspaces/solution/project/src/index.js +TSFILE: /home/src/workspaces/solution/project/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:4 +//// [/home/src/workspaces/solution/project/src/index.js] *rewrite with same content* +//// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo] *rewrite with same content* +//// [/home/src/workspaces/solution/project/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/tsbuild/resolveJsonModule/without-outDir.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/without-outDir.js index 27749f0145c..f1d302509ad 100644 --- a/testdata/baselines/reference/tsbuild/resolveJsonModule/without-outDir.js +++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/without-outDir.js @@ -25,7 +25,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: Success +ExitStatus:: DiagnosticsPresent_OutputsGenerated Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,6 +34,11 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... +project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. + +4 "moduleResolution": "node", +   ~~~~~~ + TSFILE: /home/src/workspaces/solution/project/src/index.js TSFILE: /home/src/workspaces/solution/project/src/index.d.ts TSFILE: /home/src/workspaces/solution/project/tsconfig.tsbuildinfo @@ -44,6 +49,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:4 + //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -81,10 +89,11 @@ const hello_json_1 = __importDefault(require("./hello.json")); exports.default = hello_json_1.default.hello; //// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2025.full.d.ts","./src/hello.json","./src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"skipDefaultLibCheck":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/index.d.ts"} +{"version":"FakeTSVersion","errors":true,"root":[[2,3]],"fileNames":["lib.es2025.full.d.ts","./src/hello.json","./src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"skipDefaultLibCheck":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./src/index.d.ts"} //// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", + "errors": true, "root": [ { "files": [ @@ -153,15 +162,20 @@ exports.default = hello_json_1.default.hello; "./src/hello.json" ] }, + "semanticDiagnosticsPerFile": [ + "lib.es2025.full.d.ts", + "./src/hello.json", + "./src/index.ts" + ], "latestChangedDtsFile": "./src/index.d.ts", - "size": 1428 + "size": 1479 } 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:: (stored at emit) /home/src/workspaces/solution/project/src/index.ts @@ -169,11 +183,34 @@ Signatures:: Edit [0]:: no change tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: Success +ExitStatus:: DiagnosticsPresent_OutputsGenerated Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json -[HH:MM:SS AM] Project 'project/tsconfig.json' is up to date because newest input 'project/src/index.ts' is older than output 'project/tsconfig.tsbuildinfo' +[HH:MM:SS AM] Project 'project/tsconfig.json' is out of date because buildinfo file 'project/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project 'project/tsconfig.json'... + +project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. + +4 "moduleResolution": "node", +   ~~~~~~ + +../../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:4 +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/moduleResolution/pnpm-style-layout.js b/testdata/baselines/reference/tsc/moduleResolution/pnpm-style-layout.js index d5ec252f4f5..38b4663e48e 100644 --- a/testdata/baselines/reference/tsc/moduleResolution/pnpm-style-layout.js +++ b/testdata/baselines/reference/tsc/moduleResolution/pnpm-style-layout.js @@ -268,6 +268,11 @@ Resolving real path for '/home/src/projects/component-type-checker/node_modules/ 3 "target": "es5",    ~~~~~ +tsconfig.json:6:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. + +6 "moduleResolution": "node", +   ~~~~~~ + ../../../../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 +289,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:3 +Found 2 errors in the same file, starting at: tsconfig.json:3 //// [/home/src/projects/component-type-checker/packages/app/dist/src/app.js] *new* import { createButton } from "@component-type-checker/button"; From 3dd2c9c891878d07cfd9fa1a5675089de67d38cd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 04:43:44 +0000 Subject: [PATCH 3/4] Update tests to not use moduleResolution node10, remove it from test configs instead Co-authored-by: jakebailey <5341706+jakebailey@users.noreply.github.com> --- internal/execute/tsctests/tsc_test.go | 1 - internal/execute/tsctests/tscbuild_test.go | 1 - ...iles-containing-json-file-non-composite.js | 22 ++----- .../files-containing-json-file.js | 27 ++------- .../include-and-files-non-composite.js | 22 ++----- .../resolveJsonModule/include-and-files.js | 27 ++------- ...file-name-matches-ts-file-non-composite.js | 22 ++----- ...r-include-and-file-name-matches-ts-file.js | 27 ++------- ...-along-with-other-include-non-composite.js | 22 ++----- ...nclude-of-json-along-with-other-include.js | 27 ++------- .../include-only-non-composite.js | 22 ++----- ...-with-json-not-in-rootDir-non-composite.js | 22 ++----- .../include-only-with-json-not-in-rootDir.js | 27 ++------- ...t-outside-configDirectory-non-composite.js | 22 ++----- ...out-rootDir-but-outside-configDirectory.js | 27 ++------- ...clude-only-without-outDir-non-composite.js | 22 ++----- .../include-only-without-outDir.js | 27 ++------- .../tsbuild/resolveJsonModule/include-only.js | 24 +++----- .../sourcemap-non-composite.js | 58 +++---------------- .../tsbuild/resolveJsonModule/sourcemap.js | 54 +++-------------- .../without-outDir-non-composite.js | 54 +++-------------- .../resolveJsonModule/without-outDir.js | 54 +++-------------- .../tsc/moduleResolution/pnpm-style-layout.js | 8 +-- 23 files changed, 132 insertions(+), 487 deletions(-) diff --git a/internal/execute/tsctests/tsc_test.go b/internal/execute/tsctests/tsc_test.go index e395a43d973..962b2551432 100644 --- a/internal/execute/tsctests/tsc_test.go +++ b/internal/execute/tsctests/tsc_test.go @@ -2615,7 +2615,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 15efd12dbdd..6954f9df9f0 100644 --- a/internal/execute/tsctests/tscbuild_test.go +++ b/internal/execute/tsctests/tscbuild_test.go @@ -2632,7 +2632,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 a18ef89afc8..4a3f773518a 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, @@ -25,7 +24,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: DiagnosticsPresent_OutputsGenerated +ExitStatus:: Success Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,11 +33,6 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. - -4 "moduleResolution": "node", -   ~~~~~~ - 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 @@ -49,9 +43,6 @@ 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:4 - //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -90,11 +81,10 @@ 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","errors":true,"root":["../src/index.ts","../src/hello.json"]} +{"version":"FakeTSVersion","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": [ @@ -109,12 +99,12 @@ exports.default = hello_json_1.default.hello; "original": "../src/hello.json" } ], - "size": 88 + "size": 74 } 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 +*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 Signatures:: 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 cc9381b29bf..61ba7d8df6d 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, @@ -25,7 +24,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: DiagnosticsPresent_OutputsGenerated +ExitStatus:: Success Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,11 +33,6 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. - -4 "moduleResolution": "node", -   ~~~~~~ - 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/src/index.d.ts @@ -50,9 +44,6 @@ 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:4 - //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -95,11 +86,10 @@ 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","errors":true,"root":[[2,3]],"fileNames":["lib.es2025.full.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./src/index.d.ts"} +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2025.full.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/index.d.ts"} //// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", - "errors": true, "root": [ { "files": [ @@ -169,19 +159,14 @@ exports.default = hello_json_1.default.hello; "../src/hello.json" ] }, - "semanticDiagnosticsPerFile": [ - "lib.es2025.full.d.ts", - "../src/hello.json", - "../src/index.ts" - ], "latestChangedDtsFile": "./src/index.d.ts", - "size": 1495 + "size": 1444 } 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 +*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 Signatures:: (stored at emit) /home/src/workspaces/solution/project/src/index.ts 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 5e7527e26e2..3f573d4f1b2 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, @@ -25,7 +24,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: DiagnosticsPresent_OutputsGenerated +ExitStatus:: Success Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,11 +33,6 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. - -4 "moduleResolution": "node", -   ~~~~~~ - 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 @@ -49,9 +43,6 @@ 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:4 - //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -90,11 +81,10 @@ 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","errors":true,"root":["../src/hello.json","../src/index.ts"]} +{"version":"FakeTSVersion","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": [ @@ -109,12 +99,12 @@ exports.default = hello_json_1.default.hello; "original": "../src/index.ts" } ], - "size": 88 + "size": 74 } 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 +*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 Signatures:: diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-and-files.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-and-files.js index a9a783a2b6c..ba515872c1e 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, @@ -25,7 +24,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: DiagnosticsPresent_OutputsGenerated +ExitStatus:: Success Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,11 +33,6 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. - -4 "moduleResolution": "node", -   ~~~~~~ - 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/src/index.d.ts @@ -50,9 +44,6 @@ 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:4 - //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -95,11 +86,10 @@ 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","errors":true,"root":[[2,3]],"fileNames":["lib.es2025.full.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./src/index.d.ts"} +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2025.full.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/index.d.ts"} //// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", - "errors": true, "root": [ { "files": [ @@ -169,19 +159,14 @@ exports.default = hello_json_1.default.hello; "../src/hello.json" ] }, - "semanticDiagnosticsPerFile": [ - "lib.es2025.full.d.ts", - "../src/hello.json", - "../src/index.ts" - ], "latestChangedDtsFile": "./src/index.d.ts", - "size": 1495 + "size": 1444 } 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 +*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 Signatures:: (stored at emit) /home/src/workspaces/solution/project/src/index.ts 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 c652d638476..12592f51737 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, @@ -25,7 +24,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: DiagnosticsPresent_OutputsGenerated +ExitStatus:: Success Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,11 +33,6 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. - -4 "moduleResolution": "node", -   ~~~~~~ - 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 @@ -49,9 +43,6 @@ 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:4 - //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -90,11 +81,10 @@ exports.default = index_json_1.default.hello; } //// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","errors":true,"root":["../src/index.ts","../src/index.json"]} +{"version":"FakeTSVersion","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": [ @@ -109,12 +99,12 @@ exports.default = index_json_1.default.hello; "original": "../src/index.json" } ], - "size": 88 + "size": 74 } project/tsconfig.json:: SemanticDiagnostics:: -*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 +*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 Signatures:: 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 dd099581bde..a1cd8850641 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, @@ -25,7 +24,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: DiagnosticsPresent_OutputsGenerated +ExitStatus:: Success Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,11 +33,6 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. - -4 "moduleResolution": "node", -   ~~~~~~ - 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/src/index.d.ts @@ -50,9 +44,6 @@ 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:4 - //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -95,11 +86,10 @@ exports.default = index_json_1.default.hello; } //// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","errors":true,"root":[[2,3]],"fileNames":["lib.es2025.full.d.ts","../src/index.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"fe545b3049ca1f2ad9aac3a6ebf9aebb-import hello from \"./index.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./src/index.d.ts"} +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2025.full.d.ts","../src/index.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"fe545b3049ca1f2ad9aac3a6ebf9aebb-import hello from \"./index.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/index.d.ts"} //// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", - "errors": true, "root": [ { "files": [ @@ -169,19 +159,14 @@ exports.default = index_json_1.default.hello; "../src/index.json" ] }, - "semanticDiagnosticsPerFile": [ - "lib.es2025.full.d.ts", - "../src/index.json", - "../src/index.ts" - ], "latestChangedDtsFile": "./src/index.d.ts", - "size": 1495 + "size": 1444 } project/tsconfig.json:: SemanticDiagnostics:: -*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 +*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 Signatures:: (stored at emit) /home/src/workspaces/solution/project/src/index.ts 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 ba765c36c90..0f9fadc601b 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, @@ -25,7 +24,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: DiagnosticsPresent_OutputsGenerated +ExitStatus:: Success Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,11 +33,6 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. - -4 "moduleResolution": "node", -   ~~~~~~ - 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 @@ -49,9 +43,6 @@ 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:4 - //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -90,11 +81,10 @@ 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","errors":true,"root":["../src/index.ts","../src/hello.json"]} +{"version":"FakeTSVersion","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": [ @@ -109,12 +99,12 @@ exports.default = hello_json_1.default.hello; "original": "../src/hello.json" } ], - "size": 88 + "size": 74 } 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 +*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 Signatures:: 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 f3cc9652b60..fefd6783e2e 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, @@ -25,7 +24,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: DiagnosticsPresent_OutputsGenerated +ExitStatus:: Success Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,11 +33,6 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. - -4 "moduleResolution": "node", -   ~~~~~~ - 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/src/index.d.ts @@ -50,9 +44,6 @@ 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:4 - //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -95,11 +86,10 @@ 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","errors":true,"root":[[2,3]],"fileNames":["lib.es2025.full.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./src/index.d.ts"} +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2025.full.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/index.d.ts"} //// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", - "errors": true, "root": [ { "files": [ @@ -169,19 +159,14 @@ exports.default = hello_json_1.default.hello; "../src/hello.json" ] }, - "semanticDiagnosticsPerFile": [ - "lib.es2025.full.d.ts", - "../src/hello.json", - "../src/index.ts" - ], "latestChangedDtsFile": "./src/index.d.ts", - "size": 1495 + "size": 1444 } 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 +*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 Signatures:: (stored at emit) /home/src/workspaces/solution/project/src/index.ts 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 27a81c7f64d..579d2217f9d 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, @@ -25,7 +24,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: DiagnosticsPresent_OutputsGenerated +ExitStatus:: Success Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,11 +33,6 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. - -4 "moduleResolution": "node", -   ~~~~~~ - 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 @@ -48,9 +42,6 @@ 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:4 - //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -89,11 +80,10 @@ 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","errors":true,"root":["../src/index.ts"]} +{"version":"FakeTSVersion","root":["../src/index.ts"]} //// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", - "errors": true, "root": [ { "files": [ @@ -102,12 +92,12 @@ exports.default = hello_json_1.default.hello; "original": "../src/index.ts" } ], - "size": 68 + "size": 54 } 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 +*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 Signatures:: 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 4227fd13bf7..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, @@ -25,7 +24,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: DiagnosticsPresent_OutputsGenerated +ExitStatus:: Success Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,11 +33,6 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. - -4 "moduleResolution": "node", -   ~~~~~~ - TSFILE: /home/src/workspaces/solution/project/dist/index.js TSFILE: /home/src/workspaces/solution/project/tsconfig.tsbuildinfo ../../tslibs/TS/Lib/lib.es2025.full.d.ts @@ -47,9 +41,6 @@ project/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:4 - //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -83,11 +74,10 @@ const hello_json_1 = __importDefault(require("../hello.json")); exports.default = hello_json_1.default.hello; //// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","errors":true,"root":["./src/index.ts"]} +{"version":"FakeTSVersion","root":["./src/index.ts"]} //// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", - "errors": true, "root": [ { "files": [ @@ -96,12 +86,12 @@ exports.default = hello_json_1.default.hello; "original": "./src/index.ts" } ], - "size": 67 + "size": 53 } project/tsconfig.json:: SemanticDiagnostics:: -*not cached* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts -*not cached* /home/src/workspaces/solution/project/hello.json -*not cached* /home/src/workspaces/solution/project/src/index.ts +*refresh* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts +*refresh* /home/src/workspaces/solution/project/hello.json +*refresh* /home/src/workspaces/solution/project/src/index.ts Signatures:: 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 ef8b804fcae..16a5cba346a 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, @@ -25,7 +24,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: DiagnosticsPresent_OutputsGenerated +ExitStatus:: Success Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,11 +33,6 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. - -4 "moduleResolution": "node", -   ~~~~~~ - TSFILE: /home/src/workspaces/solution/project/dist/index.js TSFILE: /home/src/workspaces/solution/project/dist/index.d.ts TSFILE: /home/src/workspaces/solution/project/tsconfig.tsbuildinfo @@ -48,9 +42,6 @@ project/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:4 - //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -88,11 +79,10 @@ const hello_json_1 = __importDefault(require("../hello.json")); exports.default = hello_json_1.default.hello; //// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","errors":true,"root":[3],"fileNames":["lib.es2025.full.d.ts","./hello.json","./src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"a4ada5a36528c3fb01d6f98af94bc507-import hello from \"../hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./dist","rootDir":"./src","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./dist/index.d.ts"} +{"version":"FakeTSVersion","root":[3],"fileNames":["lib.es2025.full.d.ts","./hello.json","./src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"a4ada5a36528c3fb01d6f98af94bc507-import hello from \"../hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./dist","rootDir":"./src","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./dist/index.d.ts"} //// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", - "errors": true, "root": [ { "files": [ @@ -159,19 +149,14 @@ exports.default = hello_json_1.default.hello; "./hello.json" ] }, - "semanticDiagnosticsPerFile": [ - "lib.es2025.full.d.ts", - "./hello.json", - "./src/index.ts" - ], "latestChangedDtsFile": "./dist/index.d.ts", - "size": 1509 + "size": 1458 } project/tsconfig.json:: SemanticDiagnostics:: -*not cached* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts -*not cached* /home/src/workspaces/solution/project/hello.json -*not cached* /home/src/workspaces/solution/project/src/index.ts +*refresh* /home/src/tslibs/TS/Lib/lib.es2025.full.d.ts +*refresh* /home/src/workspaces/solution/project/hello.json +*refresh* /home/src/workspaces/solution/project/src/index.ts Signatures:: (stored at emit) /home/src/workspaces/solution/project/src/index.ts 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 37b0cabc47c..a4d1d056528 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, @@ -25,7 +24,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: DiagnosticsPresent_OutputsGenerated +ExitStatus:: Success Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,11 +33,6 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. - -4 "moduleResolution": "node", -   ~~~~~~ - 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 @@ -47,9 +41,6 @@ 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:4 - //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -83,11 +74,10 @@ 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","errors":true,"root":["../src/index.ts"]} +{"version":"FakeTSVersion","root":["../src/index.ts"]} //// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", - "errors": true, "root": [ { "files": [ @@ -96,12 +86,12 @@ exports.default = hello_json_1.default.hello; "original": "../src/index.ts" } ], - "size": 68 + "size": 54 } project/tsconfig.json:: SemanticDiagnostics:: -*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 +*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 Signatures:: 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 f7199e5de6c..4ac0e72269a 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, @@ -25,7 +24,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: DiagnosticsPresent_OutputsGenerated +ExitStatus:: Success Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,11 +33,6 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. - -4 "moduleResolution": "node", -   ~~~~~~ - TSFILE: /home/src/workspaces/solution/project/dist/src/index.js TSFILE: /home/src/workspaces/solution/project/dist/src/index.d.ts TSFILE: /home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo @@ -48,9 +42,6 @@ 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:4 - //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -88,11 +79,10 @@ 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","errors":true,"root":[3],"fileNames":["lib.es2025.full.d.ts","../../hello.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"6f9721ccc194272bc2b0e0566ab15e63-import hello from \"../../hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./src/index.d.ts"} +{"version":"FakeTSVersion","root":[3],"fileNames":["lib.es2025.full.d.ts","../../hello.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"6f9721ccc194272bc2b0e0566ab15e63-import hello from \"../../hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/index.d.ts"} //// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", - "errors": true, "root": [ { "files": [ @@ -158,19 +148,14 @@ exports.default = hello_json_1.default.hello; "../../hello.json" ] }, - "semanticDiagnosticsPerFile": [ - "lib.es2025.full.d.ts", - "../../hello.json", - "../src/index.ts" - ], "latestChangedDtsFile": "./src/index.d.ts", - "size": 1494 + "size": 1443 } project/tsconfig.json:: SemanticDiagnostics:: -*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 +*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 Signatures:: (stored at emit) /home/src/workspaces/solution/project/src/index.ts 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 3fbbb668316..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, @@ -25,7 +24,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: DiagnosticsPresent_OutputsGenerated +ExitStatus:: Success Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,11 +33,6 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. - -4 "moduleResolution": "node", -   ~~~~~~ - TSFILE: /home/src/workspaces/solution/project/src/index.js TSFILE: /home/src/workspaces/solution/project/tsconfig.tsbuildinfo ../../tslibs/TS/Lib/lib.es2025.full.d.ts @@ -47,9 +41,6 @@ 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:4 - //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -83,11 +74,10 @@ const hello_json_1 = __importDefault(require("./hello.json")); exports.default = hello_json_1.default.hello; //// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","errors":true,"root":["./src/index.ts"]} +{"version":"FakeTSVersion","root":["./src/index.ts"]} //// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", - "errors": true, "root": [ { "files": [ @@ -96,12 +86,12 @@ exports.default = hello_json_1.default.hello; "original": "./src/index.ts" } ], - "size": 67 + "size": 53 } 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 +*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 Signatures:: 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 3bd4ee36f89..74263efffef 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, @@ -25,7 +24,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: DiagnosticsPresent_OutputsGenerated +ExitStatus:: Success Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,11 +33,6 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. - -4 "moduleResolution": "node", -   ~~~~~~ - TSFILE: /home/src/workspaces/solution/project/src/index.js TSFILE: /home/src/workspaces/solution/project/src/index.d.ts TSFILE: /home/src/workspaces/solution/project/tsconfig.tsbuildinfo @@ -48,9 +42,6 @@ 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:4 - //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -88,11 +79,10 @@ const hello_json_1 = __importDefault(require("./hello.json")); exports.default = hello_json_1.default.hello; //// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","errors":true,"root":[3],"fileNames":["lib.es2025.full.d.ts","./src/hello.json","./src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"skipDefaultLibCheck":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./src/index.d.ts"} +{"version":"FakeTSVersion","root":[3],"fileNames":["lib.es2025.full.d.ts","./src/hello.json","./src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"skipDefaultLibCheck":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/index.d.ts"} //// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", - "errors": true, "root": [ { "files": [ @@ -157,19 +147,14 @@ exports.default = hello_json_1.default.hello; "./src/hello.json" ] }, - "semanticDiagnosticsPerFile": [ - "lib.es2025.full.d.ts", - "./src/hello.json", - "./src/index.ts" - ], "latestChangedDtsFile": "./src/index.d.ts", - "size": 1475 + "size": 1424 } 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 +*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 Signatures:: (stored at emit) /home/src/workspaces/solution/project/src/index.ts diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only.js index 8e14910d383..90ae89b68ea 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, @@ -34,10 +33,10 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. +project/src/index.ts:1:19 - error TS6307: File '/home/src/workspaces/solution/project/src/hello.json' is not listed within the file list of project '/home/src/workspaces/solution/project/tsconfig.json'. Projects must list all files or use an 'include' pattern. -4 "moduleResolution": "node", -   ~~~~~~ +1 import hello from "./hello.json" +   ~~~~~~~~~~~~~~ TSFILE: /home/src/workspaces/solution/project/dist/src/hello.json TSFILE: /home/src/workspaces/solution/project/dist/src/index.js @@ -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:4 +Found 1 error in project/src/index.ts:1 //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// @@ -94,7 +93,7 @@ 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","errors":true,"root":[3],"fileNames":["lib.es2025.full.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./src/index.d.ts"} +{"version":"FakeTSVersion","errors":true,"root":[3],"fileNames":["lib.es2025.full.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/index.d.ts"} //// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", @@ -164,19 +163,14 @@ exports.default = hello_json_1.default.hello; "../src/hello.json" ] }, - "semanticDiagnosticsPerFile": [ - "lib.es2025.full.d.ts", - "../src/hello.json", - "../src/index.ts" - ], "latestChangedDtsFile": "./src/index.d.ts", - "size": 1491 + "size": 1454 } 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 +*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 Signatures:: (stored at emit) /home/src/workspaces/solution/project/src/index.ts diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap-non-composite.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap-non-composite.js index 5b78020748d..03ef47ea480 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, @@ -25,7 +24,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: DiagnosticsPresent_OutputsGenerated +ExitStatus:: Success Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,11 +33,6 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. - -4 "moduleResolution": "node", -   ~~~~~~ - 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 @@ -50,9 +44,6 @@ 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:4 - //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -93,11 +84,10 @@ 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","errors":true,"root":["../src/index.ts","../src/hello.json"]} +{"version":"FakeTSVersion","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": [ @@ -112,57 +102,25 @@ exports.default = hello_json_1.default.hello; "original": "../src/hello.json" } ], - "size": 88 + "size": 74 } 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 +*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 Signatures:: Edit [0]:: no change tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: DiagnosticsPresent_OutputsGenerated +ExitStatus:: Success Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json -[HH:MM:SS AM] Project 'project/tsconfig.json' is out of date because buildinfo file 'project/dist/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project 'project/tsconfig.json'... - -project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. - -4 "moduleResolution": "node", -   ~~~~~~ - -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:4 +[HH:MM:SS AM] Project 'project/tsconfig.json' is up to date because newest input 'project/src/index.ts' is older than output 'project/dist/src/hello.json' -//// [/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/tsbuild/resolveJsonModule/sourcemap.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap.js index 7a47d59945c..384f8f9daa3 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, @@ -25,7 +24,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: DiagnosticsPresent_OutputsGenerated +ExitStatus:: Success Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,11 +33,6 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. - -4 "moduleResolution": "node", -   ~~~~~~ - 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 @@ -51,9 +45,6 @@ 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:4 - //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -98,11 +89,10 @@ 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","errors":true,"root":[[2,3]],"fileNames":["lib.es2025.full.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./src/index.d.ts"} +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2025.full.d.ts","../src/hello.json","../src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/index.d.ts"} //// [/home/src/workspaces/solution/project/dist/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", - "errors": true, "root": [ { "files": [ @@ -173,20 +163,15 @@ exports.default = hello_json_1.default.hello; "../src/hello.json" ] }, - "semanticDiagnosticsPerFile": [ - "lib.es2025.full.d.ts", - "../src/hello.json", - "../src/index.ts" - ], "latestChangedDtsFile": "./src/index.d.ts", - "size": 1512 + "size": 1461 } 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 +*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 Signatures:: (stored at emit) /home/src/workspaces/solution/project/src/index.ts @@ -194,34 +179,11 @@ Signatures:: Edit [0]:: no change tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: DiagnosticsPresent_OutputsGenerated +ExitStatus:: Success Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json -[HH:MM:SS AM] Project 'project/tsconfig.json' is out of date because buildinfo file 'project/dist/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project 'project/tsconfig.json'... - -project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. - -4 "moduleResolution": "node", -   ~~~~~~ - -../../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:4 +[HH:MM:SS AM] Project 'project/tsconfig.json' is up to date because newest input 'project/src/index.ts' is older than output 'project/dist/tsconfig.tsbuildinfo' -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/tsbuild/resolveJsonModule/without-outDir-non-composite.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/without-outDir-non-composite.js index a67a0957840..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, @@ -25,7 +24,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: DiagnosticsPresent_OutputsGenerated +ExitStatus:: Success Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,11 +33,6 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. - -4 "moduleResolution": "node", -   ~~~~~~ - TSFILE: /home/src/workspaces/solution/project/src/index.js TSFILE: /home/src/workspaces/solution/project/tsconfig.tsbuildinfo ../../tslibs/TS/Lib/lib.es2025.full.d.ts @@ -48,9 +42,6 @@ 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:4 - //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -84,11 +75,10 @@ const hello_json_1 = __importDefault(require("./hello.json")); exports.default = hello_json_1.default.hello; //// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","errors":true,"root":["./src/index.ts","./src/hello.json"]} +{"version":"FakeTSVersion","root":["./src/index.ts","./src/hello.json"]} //// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", - "errors": true, "root": [ { "files": [ @@ -103,53 +93,25 @@ exports.default = hello_json_1.default.hello; "original": "./src/hello.json" } ], - "size": 86 + "size": 72 } 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 +*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 Signatures:: Edit [0]:: no change tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: DiagnosticsPresent_OutputsGenerated +ExitStatus:: Success Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json -[HH:MM:SS AM] Project 'project/tsconfig.json' is out of date because buildinfo file 'project/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project 'project/tsconfig.json'... - -project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. - -4 "moduleResolution": "node", -   ~~~~~~ - -TSFILE: /home/src/workspaces/solution/project/src/index.js -TSFILE: /home/src/workspaces/solution/project/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:4 +[HH:MM:SS AM] Project 'project/tsconfig.json' is up to date because newest input 'project/src/index.ts' is older than output 'project/src/index.js' -//// [/home/src/workspaces/solution/project/src/index.js] *rewrite with same content* -//// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo] *rewrite with same content* -//// [/home/src/workspaces/solution/project/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/tsbuild/resolveJsonModule/without-outDir.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/without-outDir.js index f1d302509ad..bea427b28a6 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, @@ -25,7 +24,7 @@ export default hello.hello } tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: DiagnosticsPresent_OutputsGenerated +ExitStatus:: Success Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json @@ -34,11 +33,6 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. - -4 "moduleResolution": "node", -   ~~~~~~ - TSFILE: /home/src/workspaces/solution/project/src/index.js TSFILE: /home/src/workspaces/solution/project/src/index.d.ts TSFILE: /home/src/workspaces/solution/project/tsconfig.tsbuildinfo @@ -49,9 +43,6 @@ 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:4 - //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// interface Boolean {} @@ -89,11 +80,10 @@ const hello_json_1 = __importDefault(require("./hello.json")); exports.default = hello_json_1.default.hello; //// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo] *new* -{"version":"FakeTSVersion","errors":true,"root":[[2,3]],"fileNames":["lib.es2025.full.d.ts","./src/hello.json","./src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"skipDefaultLibCheck":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./src/index.d.ts"} +{"version":"FakeTSVersion","root":[[2,3]],"fileNames":["lib.es2025.full.d.ts","./src/hello.json","./src/index.ts"],"fileInfos":[{"version":"8859c12c614ce56ba9a18e58384a198f-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ninterface SymbolConstructor {\n (desc?: string | number): symbol;\n for(name: string): symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"18e7247c85a6a2e7a4ec2e284716edd8-{\n \"hello\": \"world\"\n}"},{"version":"c15eb6733af1bd811cd113368bb377e5-import hello from \"./hello.json\"\nexport default hello.hello","signature":"a44184f4ac1ed50126ac624c885b51a8-declare const _default: string;\nexport default _default;\n","impliedNodeFormat":1}],"fileIdsList":[[2]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"skipDefaultLibCheck":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/index.d.ts"} //// [/home/src/workspaces/solution/project/tsconfig.tsbuildinfo.readable.baseline.txt] *new* { "version": "FakeTSVersion", - "errors": true, "root": [ { "files": [ @@ -162,20 +152,15 @@ exports.default = hello_json_1.default.hello; "./src/hello.json" ] }, - "semanticDiagnosticsPerFile": [ - "lib.es2025.full.d.ts", - "./src/hello.json", - "./src/index.ts" - ], "latestChangedDtsFile": "./src/index.d.ts", - "size": 1479 + "size": 1428 } 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 +*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 Signatures:: (stored at emit) /home/src/workspaces/solution/project/src/index.ts @@ -183,34 +168,11 @@ Signatures:: Edit [0]:: no change tsgo --b project --v --explainFiles --listEmittedFiles -ExitStatus:: DiagnosticsPresent_OutputsGenerated +ExitStatus:: Success Output:: [HH:MM:SS AM] Projects in this build: * project/tsconfig.json -[HH:MM:SS AM] Project 'project/tsconfig.json' is out of date because buildinfo file 'project/tsconfig.tsbuildinfo' indicates that program needs to report errors. - -[HH:MM:SS AM] Building project 'project/tsconfig.json'... - -project/tsconfig.json:4:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. - -4 "moduleResolution": "node", -   ~~~~~~ - -../../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:4 +[HH:MM:SS AM] Project 'project/tsconfig.json' is up to date because newest input 'project/src/index.ts' is older than output 'project/tsconfig.tsbuildinfo' -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/moduleResolution/pnpm-style-layout.js b/testdata/baselines/reference/tsc/moduleResolution/pnpm-style-layout.js index 38b4663e48e..45008f3ea09 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"], @@ -268,11 +267,6 @@ Resolving real path for '/home/src/projects/component-type-checker/node_modules/ 3 "target": "es5",    ~~~~~ -tsconfig.json:6:29 - error TS5108: Option 'moduleResolution=node10' has been removed. Please remove it from your configuration. - -6 "moduleResolution": "node", -   ~~~~~~ - ../../../../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 @@ -289,7 +283,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 2 errors in the same file, starting at: tsconfig.json:3 +Found 1 error in tsconfig.json:3 //// [/home/src/projects/component-type-checker/packages/app/dist/src/app.js] *new* import { createButton } from "@component-type-checker/button"; From 53e641dcaf3f94c030e23a906dc3d66389eda765 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Wed, 25 Mar 2026 09:27:25 -0700 Subject: [PATCH 4/4] Update baselines --- .../files-containing-json-file-non-composite.js | 6 +++--- .../include-and-files-non-composite.js | 6 +++--- ...de-and-file-name-matches-ts-file-non-composite.js | 6 +++--- ...of-json-along-with-other-include-non-composite.js | 6 +++--- .../resolveJsonModule/include-only-non-composite.js | 6 +++--- ...tDir-but-outside-configDirectory-non-composite.js | 6 +++--- .../resolveJsonModule/sourcemap-non-composite.js | 12 ++++++------ .../tsc/moduleResolution/pnpm-style-layout.js | 4 ++-- 8 files changed, 26 insertions(+), 26 deletions(-) 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 6390175d005..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 @@ -33,10 +33,10 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:9: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. +project/tsconfig.json:8: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. -9 "outDir": "dist", +8 "outDir": "dist",    ~~~~~~~~ TSFILE: /home/src/workspaces/solution/project/dist/src/hello.json @@ -50,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:9 +Found 1 error in project/tsconfig.json:8 //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// 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 a16764a7a22..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 @@ -33,10 +33,10 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:9: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. +project/tsconfig.json:8: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. -9 "outDir": "dist", +8 "outDir": "dist",    ~~~~~~~~ TSFILE: /home/src/workspaces/solution/project/dist/src/hello.json @@ -50,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:9 +Found 1 error in project/tsconfig.json:8 //// [/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-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 c85880a5986..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 @@ -33,10 +33,10 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:9: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. +project/tsconfig.json:8: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. -9 "outDir": "dist", +8 "outDir": "dist",    ~~~~~~~~ TSFILE: /home/src/workspaces/solution/project/dist/src/index.json @@ -50,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:9 +Found 1 error in project/tsconfig.json:8 //// [/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-non-composite.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-non-composite.js index 321cd89b56a..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 @@ -33,10 +33,10 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:9: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. +project/tsconfig.json:8: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. -9 "outDir": "dist", +8 "outDir": "dist",    ~~~~~~~~ TSFILE: /home/src/workspaces/solution/project/dist/src/hello.json @@ -50,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:9 +Found 1 error in project/tsconfig.json:8 //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// 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 af59459ad2e..374bc890651 100644 --- a/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-non-composite.js +++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-non-composite.js @@ -33,10 +33,10 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:9: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. +project/tsconfig.json:8: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. -9 "outDir": "dist", +8 "outDir": "dist",    ~~~~~~~~ TSFILE: /home/src/workspaces/solution/project/dist/src/hello.json @@ -49,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:9 +Found 1 error in project/tsconfig.json:8 //// [/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-non-composite.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-without-rootDir-but-outside-configDirectory-non-composite.js index 890f5281ec1..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 @@ -33,10 +33,10 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:9: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. +project/tsconfig.json:8: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. -9 "outDir": "dist", +8 "outDir": "dist",    ~~~~~~~~ TSFILE: /home/src/workspaces/solution/project/dist/src/index.js @@ -48,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:9 +Found 1 error in project/tsconfig.json:8 //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// diff --git a/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap-non-composite.js b/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap-non-composite.js index af7a07e3bf4..d40fa043398 100644 --- a/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap-non-composite.js +++ b/testdata/baselines/reference/tsbuild/resolveJsonModule/sourcemap-non-composite.js @@ -33,10 +33,10 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:9: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. +project/tsconfig.json:8: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. -9 "outDir": "dist", +8 "outDir": "dist",    ~~~~~~~~ TSFILE: /home/src/workspaces/solution/project/dist/src/hello.json @@ -51,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:9 +Found 1 error in project/tsconfig.json:8 //// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib* /// @@ -135,10 +135,10 @@ Output:: [HH:MM:SS AM] Building project 'project/tsconfig.json'... -project/tsconfig.json:9: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. +project/tsconfig.json:8: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. -9 "outDir": "dist", +8 "outDir": "dist",    ~~~~~~~~ TSFILE: /home/src/workspaces/solution/project/dist/src/hello.json @@ -153,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:9 +Found 1 error in project/tsconfig.json:8 //// [/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/tsc/moduleResolution/pnpm-style-layout.js b/testdata/baselines/reference/tsc/moduleResolution/pnpm-style-layout.js index 335712e1ab0..9828bd77ad0 100644 --- a/testdata/baselines/reference/tsc/moduleResolution/pnpm-style-layout.js +++ b/testdata/baselines/reference/tsc/moduleResolution/pnpm-style-layout.js @@ -247,10 +247,10 @@ Resolving real path for '/home/src/projects/component-type-checker/node_modules/ 3 "target": "es5",    ~~~~~ -tsconfig.json:7: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. +tsconfig.json:6: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. -7 "outDir": "dist", +6 "outDir": "dist",    ~~~~~~~~ ../../../../tslibs/TS/Lib/lib.es5.d.ts