diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 82e566184bd28..6a3f4ed86bdd7 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -678,6 +678,8 @@ namespace ts { base64decode?(input: string): string; base64encode?(input: string): string; /*@internal*/ bufferFrom?(input: string, encoding?: string): Buffer; + // For testing + /*@internal*/ now?(): Date; } export interface FileWatcher { diff --git a/src/compiler/tsbuild.ts b/src/compiler/tsbuild.ts index 69b90135fd056..2f152d294a769 100644 --- a/src/compiler/tsbuild.ts +++ b/src/compiler/tsbuild.ts @@ -316,7 +316,7 @@ namespace ts { */ export function createBuilderStatusReporter(system: System, pretty?: boolean): DiagnosticReporter { return diagnostic => { - let output = pretty ? `[${formatColorAndReset(new Date().toLocaleTimeString(), ForegroundColorEscapeSequences.Grey)}] ` : `${new Date().toLocaleTimeString()} - `; + let output = pretty ? `[${formatColorAndReset(getLocaleTimeString(system), ForegroundColorEscapeSequences.Grey)}] ` : `${getLocaleTimeString(system)} - `; output += `${flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)}${system.newLine + system.newLine}`; system.write(output); }; diff --git a/src/compiler/watch.ts b/src/compiler/watch.ts index 652b85d000d50..06871fc9cacdb 100644 --- a/src/compiler/watch.ts +++ b/src/compiler/watch.ts @@ -54,6 +54,15 @@ namespace ts { : newLine; } + /** + * Get locale specific time based on whether we are in test mode + */ + export function getLocaleTimeString(system: System) { + return !system.now ? + new Date().toLocaleTimeString() : + system.now().toLocaleTimeString("en-US", { timeZone: "UTC" }); + } + /** * Create a function that reports watch status by writing to the system and handles the formating of the diagnostic */ @@ -61,7 +70,7 @@ namespace ts { return pretty ? (diagnostic, newLine, options) => { clearScreenIfNotWatchingForFileChanges(system, diagnostic, options); - let output = `[${formatColorAndReset(new Date().toLocaleTimeString(), ForegroundColorEscapeSequences.Grey)}] `; + let output = `[${formatColorAndReset(getLocaleTimeString(system), ForegroundColorEscapeSequences.Grey)}] `; output += `${flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)}${newLine + newLine}`; system.write(output); } : @@ -72,7 +81,7 @@ namespace ts { output += newLine; } - output += `${new Date().toLocaleTimeString()} - `; + output += `${getLocaleTimeString(system)} - `; output += `${flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)}${getPlainDiagnosticFollowingNewLines(diagnostic, newLine)}`; system.write(output); diff --git a/src/harness/fakes.ts b/src/harness/fakes.ts index 63426bddb4839..adcaef55471ca 100644 --- a/src/harness/fakes.ts +++ b/src/harness/fakes.ts @@ -140,7 +140,7 @@ namespace fakes { } public createHash(data: string): string { - return data; + return `${ts.generateDjb2Hash(data)}-${data}`; } public realpath(path: string) { @@ -164,6 +164,10 @@ namespace fakes { return undefined; } } + + now() { + return new Date(this.vfs.time()); + } } /** @@ -520,39 +524,51 @@ ${indentText}${text}`; export const version = "FakeTSVersion"; - export class SolutionBuilderHost extends CompilerHost implements ts.SolutionBuilderHost { - createProgram: ts.CreateProgram; - - constructor(sys: System | vfs.FileSystem, options?: ts.CompilerOptions, setParentNodes?: boolean, createProgram?: ts.CreateProgram) { - super(sys, options, setParentNodes); - this.createProgram = createProgram || ts.createEmitAndSemanticDiagnosticsBuilderProgram; - } - - readFile(path: string) { - const value = super.readFile(path); + export function patchSolutionBuilderHost(host: ts.SolutionBuilderHost, sys: System) { + const originalReadFile = host.readFile; + host.readFile = (path, encoding) => { + const value = originalReadFile.call(host, path, encoding); if (!value || !ts.isBuildInfoFile(path)) return value; const buildInfo = ts.getBuildInfo(value); ts.Debug.assert(buildInfo.version === version); buildInfo.version = ts.version; return ts.getBuildInfoText(buildInfo); + }; + + if (host.writeFile) { + const originalWriteFile = host.writeFile; + host.writeFile = (fileName, content, writeByteOrderMark) => { + if (!ts.isBuildInfoFile(fileName)) return originalWriteFile.call(host, fileName, content, writeByteOrderMark); + const buildInfo = ts.getBuildInfo(content); + sanitizeBuildInfoProgram(buildInfo); + buildInfo.version = version; + originalWriteFile.call(host, fileName, ts.getBuildInfoText(buildInfo), writeByteOrderMark); + }; + } + + ts.Debug.assert(host.now === undefined); + host.now = () => new Date(sys.vfs.time()); + ts.Debug.assertDefined(host.createHash); + } + + export class SolutionBuilderHost extends CompilerHost implements ts.SolutionBuilderHost { + createProgram: ts.CreateProgram; + + private constructor(sys: System | vfs.FileSystem, options?: ts.CompilerOptions, setParentNodes?: boolean, createProgram?: ts.CreateProgram) { + super(sys, options, setParentNodes); + this.createProgram = createProgram || ts.createEmitAndSemanticDiagnosticsBuilderProgram; } - public writeFile(fileName: string, content: string, writeByteOrderMark: boolean) { - if (!ts.isBuildInfoFile(fileName)) return super.writeFile(fileName, content, writeByteOrderMark); - const buildInfo = ts.getBuildInfo(content); - sanitizeBuildInfoProgram(buildInfo); - buildInfo.version = version; - super.writeFile(fileName, ts.getBuildInfoText(buildInfo), writeByteOrderMark); + static create(sys: System | vfs.FileSystem, options?: ts.CompilerOptions, setParentNodes?: boolean, createProgram?: ts.CreateProgram) { + const host = new SolutionBuilderHost(sys, options, setParentNodes, createProgram); + patchSolutionBuilderHost(host, host.sys); + return host; } createHash(data: string) { return `${ts.generateDjb2Hash(data)}-${data}`; } - now() { - return new Date(this.sys.vfs.time()); - } - diagnostics: SolutionBuilderDiagnostic[] = []; reportDiagnostic(diagnostic: ts.Diagnostic) { diff --git a/src/testRunner/tsconfig.json b/src/testRunner/tsconfig.json index 6d0c83fa953eb..14544ce0bc171 100644 --- a/src/testRunner/tsconfig.json +++ b/src/testRunner/tsconfig.json @@ -38,6 +38,7 @@ "unittests/services/extract/helpers.ts", "unittests/tsbuild/helpers.ts", + "unittests/tsc/helpers.ts", "unittests/tscWatch/helpers.ts", "unittests/tsserver/helpers.ts", diff --git a/src/testRunner/unittests/tsbuild/amdModulesWithOut.ts b/src/testRunner/unittests/tsbuild/amdModulesWithOut.ts index 8a62972288d7c..fdcf748cf2cf5 100644 --- a/src/testRunner/unittests/tsbuild/amdModulesWithOut.ts +++ b/src/testRunner/unittests/tsbuild/amdModulesWithOut.ts @@ -1,7 +1,6 @@ namespace ts { describe("unittests:: tsbuild:: outFile:: on amd modules with --out", () => { let outFileFs: vfs.FileSystem; - const { time, tick } = getTime(); const enum project { lib, app } function relName(path: string) { return path.slice(1); } type Sources = [string, readonly string[]]; @@ -25,54 +24,52 @@ namespace ts { ] ]; before(() => { - outFileFs = loadProjectFromDisk("tests/projects/amdModulesWithOut", time); + outFileFs = loadProjectFromDisk("tests/projects/amdModulesWithOut"); }); after(() => { outFileFs = undefined!; }); interface VerifyOutFileScenarioInput { - scenario: string; - modifyFs: (fs: vfs.FileSystem) => void; + subScenario: string; + modifyFs?: (fs: vfs.FileSystem) => void; modifyAgainFs?: (fs: vfs.FileSystem) => void; } function verifyOutFileScenario({ - scenario, + subScenario, modifyFs, modifyAgainFs }: VerifyOutFileScenarioInput) { - verifyTsbuildOutput({ - scenario, - projFs: () => outFileFs, - time, - tick, - proj: "amdModulesWithOut", - rootNames: ["/src/app"], + verifyTscIncrementalEdits({ + scenario: "amdModulesWithOut", + subScenario, + fs: () => outFileFs, + commandLineArgs: ["--b", "/src/app", "--verbose"], baselineSourceMap: true, - initialBuild: { - modifyFs - }, - incrementalDtsUnchangedBuild: { - modifyFs: fs => appendText(fs, relName(sources[project.lib][source.ts][1]), "console.log(x);") - }, - incrementalHeaderChangedBuild: modifyAgainFs ? { - modifyFs: modifyAgainFs - } : undefined, - baselineOnly: true + modifyFs, + incrementalScenarios: [ + { + buildKind: BuildKind.IncrementalDtsUnchanged, + modifyFs: fs => appendText(fs, relName(sources[project.lib][source.ts][1]), "console.log(x);") + }, + ...(modifyAgainFs ? [{ + buildKind: BuildKind.IncrementalHeadersChange, + modifyFs: modifyAgainFs + }] : emptyArray), + ] }); } describe("Prepend output with .tsbuildinfo", () => { verifyOutFileScenario({ - scenario: "modules and globals mixed in amd", - modifyFs: noop + subScenario: "modules and globals mixed in amd", }); // Prologues describe("Prologues", () => { verifyOutFileScenario({ - scenario: "multiple prologues in all projects", + subScenario: "multiple prologues in all projects", modifyFs: fs => { enableStrict(fs, sources[project.lib][source.config]); addTestPrologue(fs, sources[project.lib][source.ts][0], `"myPrologue"`); @@ -90,7 +87,7 @@ namespace ts { describe("Shebang", () => { // changes declaration because its emitted in .d.ts file verifyOutFileScenario({ - scenario: "shebang in all projects", + subScenario: "shebang in all projects", modifyFs: fs => { addShebang(fs, "lib", "file0"); addShebang(fs, "lib", "file1"); @@ -102,7 +99,7 @@ namespace ts { // emitHelpers describe("emitHelpers", () => { verifyOutFileScenario({ - scenario: "multiple emitHelpers in all projects", + subScenario: "multiple emitHelpers in all projects", modifyFs: fs => { addSpread(fs, "lib", "file0"); addRest(fs, "lib", "file1"); @@ -117,7 +114,7 @@ namespace ts { describe("triple slash refs", () => { // changes declaration because its emitted in .d.ts file verifyOutFileScenario({ - scenario: "triple slash refs in all projects", + subScenario: "triple slash refs in all projects", modifyFs: fs => { addTripleSlashRef(fs, "lib", "file0"); addTripleSlashRef(fs, "app", "file4"); @@ -161,7 +158,7 @@ ${internal} export enum internalEnum { a, b, c }`); // Verify initial + incremental edits verifyOutFileScenario({ - scenario: "stripInternal", + subScenario: "stripInternal", modifyFs: stripInternalScenario, modifyAgainFs: fs => replaceText(fs, sources[project.lib][source.ts][1], `export const`, `/*@internal*/ export const`), }); @@ -175,26 +172,13 @@ ${internal} export enum internalEnum { a, b, c }`); replaceText(fs, sources[project.app][source.ts][0], "file1", "lib/file1"); } - verifyTsbuildOutput({ - scenario: "when the module resolution finds original source file", - projFs: () => outFileFs, - time, - tick, - proj: "amdModulesWithOut", - rootNames: ["/src/app"], + verifyTsc({ + scenario: "amdModulesWithOut", + subScenario: "when the module resolution finds original source file", + fs: () => outFileFs, + commandLineArgs: ["-b", "/src/app", "--verbose"], + modifyFs, baselineSourceMap: true, - initialBuild: { - modifyFs, - expectedDiagnostics: [ - getExpectedDiagnosticForProjectsInBuild("src/lib/tsconfig.json", "src/app/tsconfig.json"), - [Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, "src/lib/tsconfig.json", "src/module.js"], - [Diagnostics.Building_project_0, sources[project.lib][source.config]], - [Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, "src/app/tsconfig.json", "src/app/module.js"], - [Diagnostics.Building_project_0, sources[project.app][source.config]], - ] - }, - baselineOnly: true, - verifyDiagnostics: true }); }); }); diff --git a/src/testRunner/unittests/tsbuild/containerOnlyReferenced.ts b/src/testRunner/unittests/tsbuild/containerOnlyReferenced.ts index 425dbf2e20f2e..f621d956621c3 100644 --- a/src/testRunner/unittests/tsbuild/containerOnlyReferenced.ts +++ b/src/testRunner/unittests/tsbuild/containerOnlyReferenced.ts @@ -19,7 +19,7 @@ namespace ts { it("verify that subsequent builds after initial build doesnt build anything", () => { const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); createSolutionBuilder(host, ["/src"], { verbose: true }).build(); host.assertDiagnosticMessages( getExpectedDiagnosticForProjectsInBuild("src/src/folder/tsconfig.json", "src/src/folder2/tsconfig.json", "src/src/tsconfig.json", "src/tests/tsconfig.json", "src/tsconfig.json"), diff --git a/src/testRunner/unittests/tsbuild/demo.ts b/src/testRunner/unittests/tsbuild/demo.ts index c345ad1e372db..c8a597368ffc0 100644 --- a/src/testRunner/unittests/tsbuild/demo.ts +++ b/src/testRunner/unittests/tsbuild/demo.ts @@ -1,10 +1,8 @@ namespace ts { describe("unittests:: tsbuild:: on demo project", () => { let projFs: vfs.FileSystem; - const { time } = getTime(); - before(() => { - projFs = loadProjectFromDisk("tests/projects/demo", time); + projFs = loadProjectFromDisk("tests/projects/demo"); }); after(() => { @@ -49,7 +47,7 @@ namespace ts { function verifyBuild({ modifyDiskLayout, expectedExitStatus, expectedDiagnostics, expectedOutputs, notExpectedOutputs }: VerifyBuild) { const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); modifyDiskLayout(fs); const builder = createSolutionBuilder(host, ["/src/tsconfig.json"], { verbose: true }); const exitStatus = builder.build(); diff --git a/src/testRunner/unittests/tsbuild/emitDeclarationOnly.ts b/src/testRunner/unittests/tsbuild/emitDeclarationOnly.ts index e9ce4b46024d4..e7dff56ab9fa9 100644 --- a/src/testRunner/unittests/tsbuild/emitDeclarationOnly.ts +++ b/src/testRunner/unittests/tsbuild/emitDeclarationOnly.ts @@ -1,85 +1,53 @@ namespace ts { describe("unittests:: tsbuild:: on project with emitDeclarationOnly set to true", () => { let projFs: vfs.FileSystem; - const { time, tick } = getTime(); before(() => { - projFs = loadProjectFromDisk("tests/projects/emitDeclarationOnly", time); + projFs = loadProjectFromDisk("tests/projects/emitDeclarationOnly"); }); after(() => { projFs = undefined!; }); function verifyEmitDeclarationOnly(disableMap?: true) { - verifyTsbuildOutput({ - scenario: `only dts output in circular import project with emitDeclarationOnly${disableMap ? "" : " and declarationMap"}`, - projFs: () => projFs, - time, - tick, - proj: "emitDeclarationOnly", - rootNames: ["/src"], - initialBuild: { - modifyFs: disableMap ? - (fs => replaceText(fs, "/src/tsconfig.json", `"declarationMap": true,`, "")) : - noop, - expectedDiagnostics: [ - getExpectedDiagnosticForProjectsInBuild("src/tsconfig.json"), - [Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, "src/tsconfig.json", "src/lib/a.d.ts"], - [Diagnostics.Building_project_0, "/src/tsconfig.json"] - ] - }, - incrementalDtsChangedBuild: { + verifyTscIncrementalEdits({ + subScenario: `only dts output in circular import project with emitDeclarationOnly${disableMap ? "" : " and declarationMap"}`, + fs: () => projFs, + scenario: "emitDeclarationOnly", + commandLineArgs: ["--b", "/src", "--verbose"], + modifyFs: disableMap ? + (fs => replaceText(fs, "/src/tsconfig.json", `"declarationMap": true,`, "")) : + undefined, + incrementalScenarios: [{ + buildKind: BuildKind.IncrementalDtsChange, modifyFs: fs => replaceText(fs, "/src/src/a.ts", "b: B;", "b: B; foo: any;"), - expectedDiagnostics: [ - getExpectedDiagnosticForProjectsInBuild("src/tsconfig.json"), - [Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, "src/tsconfig.json", "src/lib/a.d.ts", "src/src/a.ts"], - [Diagnostics.Building_project_0, "/src/tsconfig.json"] - ] - }, - baselineOnly: true, - verifyDiagnostics: true + }], }); } verifyEmitDeclarationOnly(); verifyEmitDeclarationOnly(/*disableMap*/ true); - verifyTsbuildOutput({ - scenario: `only dts output in non circular imports project with emitDeclarationOnly`, - projFs: () => projFs, - time, - tick, - proj: "emitDeclarationOnly", - rootNames: ["/src"], - initialBuild: { - modifyFs: fs => { - fs.rimrafSync("/src/src/index.ts"); - replaceText(fs, "/src/src/a.ts", `import { B } from "./b";`, `export class B { prop = "hello"; }`); - }, - expectedDiagnostics: [ - getExpectedDiagnosticForProjectsInBuild("src/tsconfig.json"), - [Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, "src/tsconfig.json", "src/lib/a.d.ts"], - [Diagnostics.Building_project_0, "/src/tsconfig.json"] - ] + verifyTscIncrementalEdits({ + subScenario: `only dts output in non circular imports project with emitDeclarationOnly`, + fs: () => projFs, + scenario: "emitDeclarationOnly", + commandLineArgs: ["--b", "/src", "--verbose"], + modifyFs: fs => { + fs.rimrafSync("/src/src/index.ts"); + replaceText(fs, "/src/src/a.ts", `import { B } from "./b";`, `export class B { prop = "hello"; }`); }, - incrementalDtsChangedBuild: { - modifyFs: fs => replaceText(fs, "/src/src/a.ts", "b: B;", "b: B; foo: any;"), - expectedDiagnostics: [ - getExpectedDiagnosticForProjectsInBuild("src/tsconfig.json"), - [Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, "src/tsconfig.json", "src/lib/a.d.ts", "src/src/a.ts"], - [Diagnostics.Building_project_0, "/src/tsconfig.json"] - ] - }, - incrementalDtsUnchangedBuild: { - modifyFs: fs => replaceText(fs, "/src/src/a.ts", "export interface A {", `class C { } + incrementalScenarios: [ + { + buildKind: BuildKind.IncrementalDtsChange, + modifyFs: fs => replaceText(fs, "/src/src/a.ts", "b: B;", "b: B; foo: any;"), + + }, + { + buildKind: BuildKind.IncrementalDtsUnchanged, + modifyFs: fs => replaceText(fs, "/src/src/a.ts", "export interface A {", `class C { } export interface A {`), - expectedDiagnostics: [ - getExpectedDiagnosticForProjectsInBuild("src/tsconfig.json"), - [Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, "src/tsconfig.json", "src/lib/a.d.ts", "src/src/a.ts"], - [Diagnostics.Building_project_0, "/src/tsconfig.json"], - [Diagnostics.Updating_unchanged_output_timestamps_of_project_0, "/src/tsconfig.json"] - ] - }, - baselineOnly: true, - verifyDiagnostics: true + + }, + ], }); }); } diff --git a/src/testRunner/unittests/tsbuild/emptyFiles.ts b/src/testRunner/unittests/tsbuild/emptyFiles.ts index a2e7aedf29058..6e09b5871f936 100644 --- a/src/testRunner/unittests/tsbuild/emptyFiles.ts +++ b/src/testRunner/unittests/tsbuild/emptyFiles.ts @@ -10,7 +10,7 @@ namespace ts { describe("unittests:: tsbuild - empty files option in tsconfig", () => { it("has empty files diagnostic when files is empty and no references are provided", () => { const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, ["/src/no-references"], { dry: false, force: false, verbose: false }); host.clearDiagnostics(); @@ -26,7 +26,7 @@ namespace ts { it("does not have empty files diagnostic when files is empty and references are provided", () => { const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, ["/src/with-references"], { dry: false, force: false, verbose: false }); host.clearDiagnostics(); diff --git a/src/testRunner/unittests/tsbuild/graphOrdering.ts b/src/testRunner/unittests/tsbuild/graphOrdering.ts index d2fa94abd0392..79ddd80d67bde 100644 --- a/src/testRunner/unittests/tsbuild/graphOrdering.ts +++ b/src/testRunner/unittests/tsbuild/graphOrdering.ts @@ -17,7 +17,7 @@ namespace ts { before(() => { const fs = new vfs.FileSystem(false); - host = new fakes.SolutionBuilderHost(fs); + host = fakes.SolutionBuilderHost.create(fs); writeProjects(fs, ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J"], deps); }); diff --git a/src/testRunner/unittests/tsbuild/helpers.ts b/src/testRunner/unittests/tsbuild/helpers.ts index 126b8d2f7d5b2..b21c60a861709 100644 --- a/src/testRunner/unittests/tsbuild/helpers.ts +++ b/src/testRunner/unittests/tsbuild/helpers.ts @@ -113,9 +113,11 @@ interface Symbol { } `; + /** + * Load project from disk into /src folder + */ export function loadProjectFromDisk( root: string, - time?: vfs.FileSystemOptions["time"], libContentToAppend?: string ): vfs.FileSystem { const resolver = vfs.createResolver(Harness.IO); @@ -125,22 +127,22 @@ interface Symbol { }, cwd: "/", meta: { defaultLibLocation: "/lib" }, - time }); addLibAndMakeReadonly(fs, libContentToAppend); return fs; } + /** + * All the files must be in /src + */ export function loadProjectFromFiles( files: vfs.FileSet, - time?: vfs.FileSystemOptions["time"], libContentToAppend?: string ): vfs.FileSystem { const fs = new vfs.FileSystem(/*ignoreCase*/ true, { files, cwd: "/", meta: { defaultLibLocation: "/lib" }, - time }); addLibAndMakeReadonly(fs, libContentToAppend); return fs; @@ -152,6 +154,26 @@ interface Symbol { fs.makeReadonly(); } + /** + * Gets the FS mountuing existing fs's /src and /lib folder + */ + export function getFsWithTime(baseFs: vfs.FileSystem) { + const { time, tick } = getTime(); + const host = new fakes.System(baseFs) as any as vfs.FileSystemResolverHost; + host.getWorkspaceRoot = notImplemented; + const resolver = vfs.createResolver(host); + const fs = new vfs.FileSystem(/*ignoreCase*/ true, { + files: { + ["/src"]: new vfs.Mount("/src", resolver), + ["/lib"]: new vfs.Mount("/lib", resolver) + }, + cwd: "/", + meta: { defaultLibLocation: "/lib" }, + time + }); + return { fs, time, tick }; + } + export function verifyOutputsPresent(fs: vfs.FileSystem, outputs: readonly string[]) { for (const output of outputs) { assert(fs.existsSync(output), `Expect file ${output} to exist`); @@ -164,7 +186,7 @@ interface Symbol { } } - function generateSourceMapBaselineFiles(fs: vfs.FileSystem, mapFileNames: Iterator) { + export function generateSourceMapBaselineFiles(fs: vfs.FileSystem, mapFileNames: Iterator) { while (true) { const { value: mapFile, done } = mapFileNames.next(); if (done) break; @@ -230,251 +252,117 @@ interface Symbol { } } - export interface BuildInput { - fs: vfs.FileSystem; - tick: () => void; - rootNames: readonly string[]; - modifyFs: (fs: vfs.FileSystem) => void; - baselineSourceMap?: true; - baselineBuildInfo?: true; - } - - export function tscBuild({ fs, tick, rootNames, modifyFs, baselineSourceMap, baselineBuildInfo }: BuildInput) { - const actualReadFileMap = createMap(); - modifyFs(fs); - tick(); - - const host = new fakes.SolutionBuilderHost(fs); - const writtenFiles = createMap(); - const originalWriteFile = host.writeFile; - host.writeFile = (fileName, content, writeByteOrderMark) => { - assert.isFalse(writtenFiles.has(fileName)); - writtenFiles.set(fileName, true); - return originalWriteFile.call(host, fileName, content, writeByteOrderMark); - }; - const builder = createSolutionBuilder(host, rootNames, { dry: false, force: false, verbose: true }); - host.clearDiagnostics(); - const originalReadFile = host.readFile; - host.readFile = path => { - // Dont record libs - if (path.startsWith("/src/")) { - actualReadFileMap.set(path, (actualReadFileMap.get(path) || 0) + 1); - } - return originalReadFile.call(host, path); - }; - builder.build(); - if (baselineSourceMap) generateSourceMapBaselineFiles(fs, mapDefinedIterator(writtenFiles.keys(), f => f.endsWith(".map") ? f : undefined)); - if (baselineBuildInfo) { - let expectedBuildInfoFiles: BuildInfoSectionBaselineFiles[] | undefined; - for (const { options } of builder.getAllParsedConfigs()) { - const out = options.outFile || options.out; - if (out) { - const { jsFilePath, declarationFilePath, buildInfoPath } = getOutputPathsForBundle(options, /*forceDts*/ false); - if (buildInfoPath && writtenFiles.has(buildInfoPath)) { - (expectedBuildInfoFiles || (expectedBuildInfoFiles = [])).push( - [buildInfoPath, jsFilePath, declarationFilePath] - ); - } + export function baselineBuildInfo( + configs: readonly ParsedCommandLine[], + fs: vfs.FileSystem, + writtenFiles: Map + ) { + let expectedBuildInfoFiles: BuildInfoSectionBaselineFiles[] | undefined; + for (const { options } of configs) { + const out = options.outFile || options.out; + if (out) { + const { jsFilePath, declarationFilePath, buildInfoPath } = getOutputPathsForBundle(options, /*forceDts*/ false); + if (buildInfoPath && writtenFiles.has(buildInfoPath)) { + (expectedBuildInfoFiles || (expectedBuildInfoFiles = [])).push( + [buildInfoPath, jsFilePath, declarationFilePath] + ); } } - if (expectedBuildInfoFiles) generateBuildInfoSectionBaselineFiles(fs, expectedBuildInfoFiles); - } - fs.makeReadonly(); - return { fs, actualReadFileMap, host, builder, writtenFiles }; - } - - function generateBaseline(fs: vfs.FileSystem, proj: string, scenario: string, subScenario: string, baseFs: vfs.FileSystem) { - const patch = fs.diff(baseFs, { includeChangedFileWithSameContent: true }); - // eslint-disable-next-line no-null/no-null - Harness.Baseline.runBaseline(`tsbuild/${proj}/${subScenario.split(" ").join("-")}/${scenario.split(" ").join("-")}.js`, patch ? vfs.formatPatch(patch) : null); - } - - function verifyReadFileCalls(actualReadFileMap: Map, expectedReadFiles: ReadonlyMap) { - TestFSWithWatch.verifyMapSize("readFileCalls", actualReadFileMap, arrayFrom(expectedReadFiles.keys())); - expectedReadFiles.forEach((expected, expectedFile) => { - const actual = actualReadFileMap.get(expectedFile); - assert.equal(actual, expected, `Mismatch in read file call number for: ${expectedFile} -Not in Actual: ${JSON.stringify(arrayFrom(mapDefinedIterator(expectedReadFiles.keys(), f => actualReadFileMap.has(f) ? undefined : f)))} -Mismatch Actual(path, actual, expected): ${JSON.stringify(arrayFrom(mapDefinedIterator(actualReadFileMap.entries(), ([p, v]) => expectedReadFiles.get(p) !== v ? [p, v, expectedReadFiles.get(p) || 0] : undefined)))}`); - }); - } - - export function getReadFilesMap(filesReadOnce: readonly string[], ...filesWithTwoReadCalls: string[]) { - const map = arrayToMap(filesReadOnce, identity, () => 1); - for (const fileWithTwoReadCalls of filesWithTwoReadCalls) { - map.set(fileWithTwoReadCalls, 2); } - return map; + if (expectedBuildInfoFiles) generateBuildInfoSectionBaselineFiles(fs, expectedBuildInfoFiles); } - export interface ExpectedBuildOutput { - expectedDiagnostics?: readonly fakes.ExpectedDiagnostic[]; - expectedReadFiles?: ReadonlyMap; + export interface TscIncremental { + buildKind: BuildKind; + modifyFs: (fs: vfs.FileSystem) => void; + subScenario?: string; } - export interface BuildState extends ExpectedBuildOutput { - modifyFs: (fs: vfs.FileSystem) => void; + export interface VerifyTsBuildInput extends TscCompile { + incrementalScenarios: TscIncremental[]; } - export interface VerifyTsBuildInput { - scenario: string; - projFs: () => vfs.FileSystem; - time: () => number; - tick: () => void; - proj: string; - rootNames: readonly string[]; - initialBuild: BuildState; - incrementalDtsChangedBuild?: BuildState; - incrementalDtsUnchangedBuild?: BuildState; - incrementalHeaderChangedBuild?: BuildState; - baselineOnly?: true; - verifyDiagnostics?: true; - baselineSourceMap?: true; - } - - export function verifyTsbuildOutput({ - scenario, projFs, time, tick, proj, rootNames, - baselineOnly, verifyDiagnostics, baselineSourceMap, - initialBuild, incrementalDtsChangedBuild, incrementalDtsUnchangedBuild, incrementalHeaderChangedBuild + export function verifyTscIncrementalEdits({ + subScenario, fs, scenario, commandLineArgs, + baselineSourceMap, modifyFs, baselineReadFileCalls, + incrementalScenarios }: VerifyTsBuildInput) { - describe(`tsc --b ${proj}:: ${scenario}`, () => { - let fs: vfs.FileSystem; - let actualReadFileMap: Map; - let firstBuildTime: number; - let host: fakes.SolutionBuilderHost; - let initialWrittenFiles: Map; + describe(`tsc --b ${scenario}:: ${subScenario}`, () => { + let tick: () => void; + let sys: TscCompileSystem; before(() => { - const result = tscBuild({ - fs: projFs().shadow(), - tick, - rootNames, - modifyFs: initialBuild.modifyFs, + let baseFs: vfs.FileSystem; + ({ fs: baseFs, tick } = getFsWithTime(fs())); + sys = tscCompile({ + scenario, + subScenario, + fs: () => baseFs.makeReadonly(), + commandLineArgs, + modifyFs: fs => { + if (modifyFs) modifyFs(fs); + tick(); + }, baselineSourceMap, - baselineBuildInfo: true, + baselineReadFileCalls }); - ({ fs, actualReadFileMap, host, writtenFiles: initialWrittenFiles } = result); - firstBuildTime = time(); + Debug.assert(!!incrementalScenarios.length, `${scenario}/${subScenario}:: No incremental scenarios, you probably want to use verifyTsc instead.`); }); after(() => { - fs = undefined!; - actualReadFileMap = undefined!; - host = undefined!; - initialWrittenFiles = undefined!; + sys = undefined!; + tick = undefined!; }); describe("initialBuild", () => { - if (!baselineOnly || verifyDiagnostics) { - it(`verify diagnostics`, () => { - host.assertDiagnosticMessages(...(initialBuild.expectedDiagnostics || emptyArray)); - }); - } - it(`Generates files matching the baseline`, () => { - generateBaseline(fs, proj, scenario, "initial Build", projFs()); - }); - if (!baselineOnly) { - it("verify readFile calls", () => { - verifyReadFileCalls(actualReadFileMap, Debug.assertDefined(initialBuild.expectedReadFiles)); - }); - } + verifyTscBaseline(() => sys); }); - function incrementalBuild(subScenario: string, incrementalModifyFs: (fs: vfs.FileSystem) => void, incrementalExpectedDiagnostics: readonly fakes.ExpectedDiagnostic[] | undefined, incrementalExpectedReadFiles: ReadonlyMap | undefined) { - describe(subScenario, () => { - let newFs: vfs.FileSystem; - let actualReadFileMap: Map; - let host: fakes.SolutionBuilderHost; - let beforeBuildTime: number; - let afterBuildTime: number; + for (const { buildKind, modifyFs, subScenario: incrementalSubScenario } of incrementalScenarios) { + describe(incrementalSubScenario || buildKind, () => { + let newSys: TscCompileSystem; before(() => { - const lastProjectOutput = last(arrayFrom(initialWrittenFiles.keys())); - beforeBuildTime = fs.statSync(lastProjectOutput).mtimeMs; - tick(); - newFs = fs.shadow(); + Debug.assert(buildKind !== BuildKind.Initial, "Incremental edit cannot be initial compilation"); tick(); - ({ actualReadFileMap, host } = tscBuild({ - fs: newFs, - tick, - rootNames, - modifyFs: incrementalModifyFs, + newSys = tscCompile({ + scenario, + subScenario: incrementalSubScenario || subScenario, + buildKind, + fs: () => sys.vfs, + commandLineArgs, + modifyFs: fs => { + tick(); + modifyFs(fs); + tick(); + }, baselineSourceMap, - baselineBuildInfo: true, - })); - afterBuildTime = newFs.statSync(lastProjectOutput).mtimeMs; + baselineReadFileCalls + }); }); after(() => { - newFs = undefined!; - actualReadFileMap = undefined!; - host = undefined!; - }); - it("verify build output times", () => { - assert.equal(beforeBuildTime, firstBuildTime, "First build timestamp is correct"); - assert.equal(afterBuildTime, time(), "Second build timestamp is correct"); - }); - if (!baselineOnly || verifyDiagnostics) { - it(`verify diagnostics`, () => { - host.assertDiagnosticMessages(...(incrementalExpectedDiagnostics || emptyArray)); - }); - } - else { - // Build should pass without errors if not verifying diagnostics - it(`verify no errors`, () => { - host.assertErrors(/*empty*/); - }); - } - it(`Generates files matching the baseline`, () => { - generateBaseline(newFs, proj, scenario, subScenario, fs); + newSys = undefined!; }); - if (!baselineOnly) { - it("verify readFile calls", () => { - verifyReadFileCalls(actualReadFileMap, Debug.assertDefined(incrementalExpectedReadFiles)); - }); - } + verifyTscBaseline(() => newSys); it(`Verify emit output file text is same when built clean`, () => { - const { fs, writtenFiles } = tscBuild({ - fs: newFs.shadow(), - tick, - rootNames, + const sys = tscCompile({ + scenario, + subScenario, + fs: () => newSys.vfs, + commandLineArgs, modifyFs: fs => { + tick(); // Delete output files - const host = new fakes.SolutionBuilderHost(fs); - const builder = createSolutionBuilder(host, rootNames, { clean: true }); + const host = fakes.SolutionBuilderHost.create(fs); + const builder = createSolutionBuilder(host, commandLineArgs, { clean: true }); builder.clean(); }, }); - for (const outputFile of arrayFrom(writtenFiles.keys())) { - const expectedText = fs.existsSync(outputFile) ? fs.readFileSync(outputFile, "utf8") : undefined; - const actualText = newFs.existsSync(outputFile) ? newFs.readFileSync(outputFile, "utf8") : undefined; + for (const outputFile of arrayFrom(sys.writtenFiles.keys())) { + const expectedText = sys.readFile(outputFile); + const actualText = newSys.readFile(outputFile); assert.equal(actualText, expectedText, `File: ${outputFile}`); } }); }); } - if (incrementalDtsChangedBuild) { - incrementalBuild( - "incremental declaration changes", - incrementalDtsChangedBuild.modifyFs, - incrementalDtsChangedBuild.expectedDiagnostics, - incrementalDtsChangedBuild.expectedReadFiles, - ); - } - - if (incrementalDtsUnchangedBuild) { - incrementalBuild( - "incremental declaration doesnt change", - incrementalDtsUnchangedBuild.modifyFs, - incrementalDtsUnchangedBuild.expectedDiagnostics, - incrementalDtsUnchangedBuild.expectedReadFiles - ); - } - - if (incrementalHeaderChangedBuild) { - incrementalBuild( - "incremental headers change without dts changes", - incrementalHeaderChangedBuild.modifyFs, - incrementalHeaderChangedBuild.expectedDiagnostics, - incrementalHeaderChangedBuild.expectedReadFiles - ); - } }); } diff --git a/src/testRunner/unittests/tsbuild/inferredTypeFromTransitiveModule.ts b/src/testRunner/unittests/tsbuild/inferredTypeFromTransitiveModule.ts index 5383b7d32be1a..eb3658d14ccaa 100644 --- a/src/testRunner/unittests/tsbuild/inferredTypeFromTransitiveModule.ts +++ b/src/testRunner/unittests/tsbuild/inferredTypeFromTransitiveModule.ts @@ -1,82 +1,51 @@ namespace ts { describe("unittests:: tsbuild:: inferredTypeFromTransitiveModule::", () => { let projFs: vfs.FileSystem; - const { time, tick } = getTime(); before(() => { - projFs = loadProjectFromDisk("tests/projects/inferredTypeFromTransitiveModule", time); + projFs = loadProjectFromDisk("tests/projects/inferredTypeFromTransitiveModule"); }); after(() => { projFs = undefined!; }); - verifyTsbuildOutput({ - scenario: "inferred type from transitive module", - projFs: () => projFs, - time, - tick, - proj: "inferredTypeFromTransitiveModule", - rootNames: ["/src"], - initialBuild: { - modifyFs: noop, - expectedDiagnostics: [ - getExpectedDiagnosticForProjectsInBuild("src/tsconfig.json"), - [Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, "src/tsconfig.json", "src/obj/bar.js"], - [Diagnostics.Building_project_0, "/src/tsconfig.json"] - ] - }, - incrementalDtsChangedBuild: { + verifyTscIncrementalEdits({ + scenario: "inferredTypeFromTransitiveModule", + subScenario: "inferred type from transitive module", + fs: () => projFs, + commandLineArgs: ["--b", "/src", "--verbose"], + incrementalScenarios: [{ + buildKind: BuildKind.IncrementalDtsChange, modifyFs: changeBarParam, - expectedDiagnostics: [ - getExpectedDiagnosticForProjectsInBuild("src/tsconfig.json"), - [Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, "src/tsconfig.json", "src/obj/bar.js", "src/bar.ts"], - [Diagnostics.Building_project_0, "/src/tsconfig.json"], - [Diagnostics.Updating_unchanged_output_timestamps_of_project_0, "/src/tsconfig.json"] - ] - }, - baselineOnly: true, - verifyDiagnostics: true + }], }); - verifyTsbuildOutput({ - scenario: "inferred type from transitive module with isolatedModules", - projFs: () => projFs, - time, - tick, - proj: "inferredTypeFromTransitiveModule", - rootNames: ["/src"], - initialBuild: { modifyFs: changeToIsolatedModules }, - incrementalDtsChangedBuild: { modifyFs: changeBarParam }, - baselineOnly: true, + verifyTscIncrementalEdits({ + subScenario: "inferred type from transitive module with isolatedModules", + fs: () => projFs, + scenario: "inferredTypeFromTransitiveModule", + commandLineArgs: ["--b", "/src", "--verbose"], + modifyFs: changeToIsolatedModules, + incrementalScenarios: [{ + buildKind: BuildKind.IncrementalDtsChange, + modifyFs: changeBarParam + }] }); - it("reports errors in files affected by change in signature", () => { - const { fs, host } = tscBuild({ - fs: projFs.shadow(), - tick, - rootNames: ["/src"], - modifyFs: fs => { - changeToIsolatedModules(fs); - appendText(fs, "/src/lazyIndex.ts", ` + verifyTscIncrementalEdits({ + scenario: "inferredTypeFromTransitiveModule", + subScenario: "reports errors in files affected by change in signature with isolatedModules", + fs: () => projFs, + commandLineArgs: ["--b", "/src", "--verbose"], + modifyFs: fs => { + changeToIsolatedModules(fs); + appendText(fs, "/src/lazyIndex.ts", ` import { default as bar } from './bar'; bar("hello");`); - } - }); - host.assertErrors(/*empty*/); - - tick(); - const { fs: newFs, host: newHost, writtenFiles } = tscBuild({ - fs: fs.shadow(), - tick, - rootNames: ["/src"], + }, + incrementalScenarios: [{ + buildKind: BuildKind.IncrementalDtsChange, modifyFs: changeBarParam - }); - // Has errors - newHost.assertErrors({ - message: [Diagnostics.Expected_0_arguments_but_got_1, 0, 1], - location: expectedLocationIndexOf(newFs, "/src/lazyIndex.ts", `"hello"`) - }); - // No written files - assert.equal(writtenFiles.size, 0); + }] }); }); diff --git a/src/testRunner/unittests/tsbuild/lateBoundSymbol.ts b/src/testRunner/unittests/tsbuild/lateBoundSymbol.ts index 02224b3fa8877..f2cbfca320ebc 100644 --- a/src/testRunner/unittests/tsbuild/lateBoundSymbol.ts +++ b/src/testRunner/unittests/tsbuild/lateBoundSymbol.ts @@ -1,40 +1,22 @@ namespace ts { describe("unittests:: tsbuild:: lateBoundSymbol:: interface is merged and contains late bound member", () => { let projFs: vfs.FileSystem; - const { time, tick } = getTime(); before(() => { - projFs = loadProjectFromDisk("tests/projects/lateBoundSymbol", time); + projFs = loadProjectFromDisk("tests/projects/lateBoundSymbol"); }); after(() => { projFs = undefined!; // Release the contents }); - verifyTsbuildOutput({ - scenario: "interface is merged and contains late bound member", - projFs: () => projFs, - time, - tick, - proj: "lateBoundSymbol", - rootNames: ["/src/tsconfig.json"], - initialBuild: { - modifyFs: noop, - expectedDiagnostics: [ - getExpectedDiagnosticForProjectsInBuild("src/tsconfig.json"), - [Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, "src/tsconfig.json", "src/src/hkt.js"], - [Diagnostics.Building_project_0, "/src/tsconfig.json"] - ] - }, - incrementalDtsUnchangedBuild: { + verifyTscIncrementalEdits({ + subScenario: "interface is merged and contains late bound member", + fs: () => projFs, + scenario: "lateBoundSymbol", + commandLineArgs: ["--b", "/src/tsconfig.json", "--verbose"], + incrementalScenarios: [{ + buildKind: BuildKind.IncrementalDtsUnchanged, modifyFs: fs => replaceText(fs, "/src/src/main.ts", "const x = 10;", ""), - expectedDiagnostics: [ - getExpectedDiagnosticForProjectsInBuild("src/tsconfig.json"), - [Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, "src/tsconfig.json", "src/src/hkt.js", "src/src/main.ts"], - [Diagnostics.Building_project_0, "/src/tsconfig.json"], - [Diagnostics.Updating_unchanged_output_timestamps_of_project_0, "/src/tsconfig.json"] - ] - }, - baselineOnly: true, - verifyDiagnostics: true + }] }); }); } diff --git a/src/testRunner/unittests/tsbuild/missingExtendedFile.ts b/src/testRunner/unittests/tsbuild/missingExtendedFile.ts index 907ed9202fa07..7fa3352da268b 100644 --- a/src/testRunner/unittests/tsbuild/missingExtendedFile.ts +++ b/src/testRunner/unittests/tsbuild/missingExtendedFile.ts @@ -3,7 +3,7 @@ namespace ts { it("unittests:: tsbuild - when tsconfig extends the missing file", () => { const projFs = loadProjectFromDisk("tests/projects/missingExtendedConfig"); const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, ["/src/tsconfig.json"], {}); builder.build(); host.assertDiagnosticMessages( diff --git a/src/testRunner/unittests/tsbuild/moduleSpecifiers.ts b/src/testRunner/unittests/tsbuild/moduleSpecifiers.ts index 86328788a3bd9..81d8e170e5d71 100644 --- a/src/testRunner/unittests/tsbuild/moduleSpecifiers.ts +++ b/src/testRunner/unittests/tsbuild/moduleSpecifiers.ts @@ -1,16 +1,16 @@ namespace ts { // https://github.com/microsoft/TypeScript/issues/31696 describe("unittests:: tsbuild:: moduleSpecifiers:: synthesized module specifiers to referenced projects resolve correctly", () => { - let projFs: vfs.FileSystem; - const { time, tick } = getTime(); - before(() => { - projFs = loadProjectFromFiles({ - "/src/common/nominal.ts": utils.dedent` + verifyTsc({ + scenario: "moduleSpecifiers", + subScenario: `synthesized module specifiers resolve correctly`, + fs: () => loadProjectFromFiles({ + "/src/solution/common/nominal.ts": utils.dedent` export declare type Nominal = T & { [Symbol.species]: Name; }; `, - "/src/common/tsconfig.json": utils.dedent` + "/src/solution/common/tsconfig.json": utils.dedent` { "extends": "../../tsconfig.base.json", "compilerOptions": { @@ -18,12 +18,12 @@ namespace ts { }, "include": ["nominal.ts"] }`, - "/src/sub-project/index.ts": utils.dedent` + "/src/solution/sub-project/index.ts": utils.dedent` import { Nominal } from '../common/nominal'; export type MyNominal = Nominal; `, - "/src/sub-project/tsconfig.json": utils.dedent` + "/src/solution/sub-project/tsconfig.json": utils.dedent` { "extends": "../../tsconfig.base.json", "compilerOptions": { @@ -34,7 +34,7 @@ namespace ts { ], "include": ["./index.ts"] }`, - "/src/sub-project-2/index.ts": utils.dedent` + "/src/solution/sub-project-2/index.ts": utils.dedent` import { MyNominal } from '../sub-project/index'; const variable = { @@ -45,7 +45,7 @@ namespace ts { return 'key'; } `, - "/src/sub-project-2/tsconfig.json": utils.dedent` + "/src/solution/sub-project-2/tsconfig.json": utils.dedent` { "extends": "../../tsconfig.base.json", "compilerOptions": { @@ -56,7 +56,7 @@ namespace ts { ], "include": ["./index.ts"] }`, - "/src/tsconfig.json": utils.dedent` + "/src/solution/tsconfig.json": utils.dedent` { "compilerOptions": { "composite": true @@ -67,7 +67,7 @@ namespace ts { ], "include": [] }`, - "/tsconfig.base.json": utils.dedent` + "/src/tsconfig.base.json": utils.dedent` { "compilerOptions": { "skipLibCheck": true, @@ -75,31 +75,17 @@ namespace ts { "outDir": "lib", } }`, - "/tsconfig.json": utils.dedent`{ + "/src/tsconfig.json": utils.dedent`{ "compilerOptions": { "composite": true }, "references": [ - { "path": "./src" } + { "path": "./solution" } ], "include": [] }` - }, time, symbolLibContent); - }); - after(() => { - projFs = undefined!; - }); - verifyTsbuildOutput({ - scenario: `synthesized module specifiers resolve correctly`, - projFs: () => projFs, - time, - tick, - proj: "moduleSpecifiers", - rootNames: ["/"], - initialBuild: { - modifyFs: noop, - }, - baselineOnly: true + }, symbolLibContent), + commandLineArgs: ["-b", "/src", "--verbose"] }); }); } diff --git a/src/testRunner/unittests/tsbuild/outFile.ts b/src/testRunner/unittests/tsbuild/outFile.ts index fa89e4a8ae957..20cbe05a3c1cb 100644 --- a/src/testRunner/unittests/tsbuild/outFile.ts +++ b/src/testRunner/unittests/tsbuild/outFile.ts @@ -56,7 +56,6 @@ namespace ts { ] ]; const relSources = sources.map(([config, sources]) => [relName(config), sources.map(relName)]) as any as [Sources, Sources, Sources]; - const { time, tick } = getTime(); let expectedOutputFiles = [ ...outputFiles[project.first], ...outputFiles[project.second], @@ -71,242 +70,78 @@ namespace ts { [Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, relSources[project.third][source.config], relOutputFiles[project.third][ext.js]], [Diagnostics.Building_project_0, sources[project.third][source.config]] ]; - let initialExpectedReadFiles: ReadonlyMap = getReadFilesMap( - [ - // Configs - sources[project.first][source.config], - sources[project.second][source.config], - sources[project.third][source.config], - - // Source files - ...sources[project.first][source.ts], - ...sources[project.second][source.ts], - ...sources[project.third][source.ts], - - // outputs - ...outputFiles[project.first], - ...outputFiles[project.second], - ] - ); - - let dtsChangedExpectedDiagnostics: readonly fakes.ExpectedDiagnostic[] = [ - getExpectedDiagnosticForProjectsInBuild(relSources[project.first][source.config], relSources[project.second][source.config], relSources[project.third][source.config]), - [Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, relSources[project.first][source.config], relOutputFiles[project.first][ext.js], relSources[project.first][source.ts][part.one]], - [Diagnostics.Building_project_0, sources[project.first][source.config]], - [Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2, relSources[project.second][source.config], relSources[project.second][source.ts][part.one], relOutputFiles[project.second][ext.js]], - [Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, relSources[project.third][source.config], relOutputFiles[project.third][ext.js], "src/first"], - [Diagnostics.Building_project_0, sources[project.third][source.config]] - ]; - let dtsChangedExpectedReadFiles: ReadonlyMap = getReadFilesMap( - [ - // Configs - sources[project.first][source.config], - sources[project.second][source.config], - sources[project.third][source.config], - - // Source files - ...sources[project.first][source.ts], - ...sources[project.third][source.ts], - - // outputs - ...outputFiles[project.first], - ...outputFiles[project.second], - outputFiles[project.third][ext.dts], - ], - outputFiles[project.first][ext.dts], // dts changes so once read old content, and once new (to emit third) - ); - - let dtsChangedExpectedDiagnosticsDependOrdered: readonly fakes.ExpectedDiagnostic[] = [ - getExpectedDiagnosticForProjectsInBuild(relSources[project.first][source.config], relSources[project.second][source.config], relSources[project.third][source.config]), - [Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, relSources[project.first][source.config], relOutputFiles[project.first][ext.js], relSources[project.first][source.ts][part.one]], - [Diagnostics.Building_project_0, sources[project.first][source.config]], - [Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, relSources[project.second][source.config], relOutputFiles[project.second][ext.js], "src/first"], - [Diagnostics.Building_project_0, sources[project.second][source.config]], - [Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, relSources[project.third][source.config], relOutputFiles[project.third][ext.js], "src/second"], - [Diagnostics.Building_project_0, sources[project.third][source.config]] - ]; - let dtsChangedExpectedReadFilesDependOrdered: ReadonlyMap = getDtsChangedReadFilesDependOrdered(); - - let dtsUnchangedExpectedDiagnostics: readonly fakes.ExpectedDiagnostic[] = [ - getExpectedDiagnosticForProjectsInBuild(relSources[project.first][source.config], relSources[project.second][source.config], relSources[project.third][source.config]), - [Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, relSources[project.first][source.config], relOutputFiles[project.first][ext.js], relSources[project.first][source.ts][part.one]], - [Diagnostics.Building_project_0, sources[project.first][source.config]], - [Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2, relSources[project.second][source.config], relSources[project.second][source.ts][part.one], relOutputFiles[project.second][ext.js]], - [Diagnostics.Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed, relSources[project.third][source.config], "src/first"], - [Diagnostics.Updating_output_of_project_0, sources[project.third][source.config]], - [Diagnostics.Updating_unchanged_output_timestamps_of_project_0, sources[project.third][source.config]], - ]; - let dtsUnchangedExpectedReadFiles: ReadonlyMap = getReadFilesMap( - [ - // Configs - sources[project.first][source.config], - sources[project.second][source.config], - sources[project.third][source.config], - - // Source files - ...sources[project.first][source.ts], - - // outputs to prepend - ...outputFiles[project.first], - ...outputFiles[project.second], - ...outputFiles[project.third], - ] - ); - - let dtsUnchangedExpectedDiagnosticsDependOrdered: readonly fakes.ExpectedDiagnostic[] = [ - getExpectedDiagnosticForProjectsInBuild(relSources[project.first][source.config], relSources[project.second][source.config], relSources[project.third][source.config]), - [Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, relSources[project.first][source.config], relOutputFiles[project.first][ext.js], relSources[project.first][source.ts][part.one]], - [Diagnostics.Building_project_0, sources[project.first][source.config]], - [Diagnostics.Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed, relSources[project.second][source.config], "src/first"], - [Diagnostics.Updating_output_of_project_0, sources[project.second][source.config]], - [Diagnostics.Updating_unchanged_output_timestamps_of_project_0, sources[project.second][source.config]], - [Diagnostics.Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed, relSources[project.third][source.config], "src/second"], - [Diagnostics.Updating_output_of_project_0, sources[project.third][source.config]], - [Diagnostics.Updating_unchanged_output_timestamps_of_project_0, sources[project.third][source.config]], - ]; - let dtsUnchangedExpectedReadFilesDependOrdered: ReadonlyMap = getDtsUnchangedExpectedReadFilesDependOrdered(); - before(() => { - outFileFs = loadProjectFromDisk("tests/projects/outfile-concat", time); + outFileFs = loadProjectFromDisk("tests/projects/outfile-concat"); }); after(() => { outFileFs = undefined!; expectedOutputFiles = undefined!; initialExpectedDiagnostics = undefined!; - initialExpectedReadFiles = undefined!; - dtsChangedExpectedDiagnostics = undefined!; - dtsChangedExpectedReadFiles = undefined!; - dtsChangedExpectedDiagnosticsDependOrdered = undefined!; - dtsChangedExpectedReadFilesDependOrdered = undefined!; - dtsUnchangedExpectedDiagnostics = undefined!; - dtsUnchangedExpectedReadFiles = undefined!; - dtsUnchangedExpectedDiagnosticsDependOrdered = undefined!; - dtsUnchangedExpectedReadFilesDependOrdered = undefined!; }); function createSolutionBuilder(host: fakes.SolutionBuilderHost, baseOptions?: BuildOptions) { return ts.createSolutionBuilder(host, ["/src/third"], { dry: false, force: false, verbose: true, ...(baseOptions || {}) }); } - function getInitialExpectedReadFiles(additionalSourceFiles?: readonly string[]) { - if (!additionalSourceFiles) return initialExpectedReadFiles; - const expectedReadFiles = cloneMap(initialExpectedReadFiles); - for (const path of additionalSourceFiles) { - expectedReadFiles.set(path, 1); - } - return expectedReadFiles; - } - - function getDtsChangedReadFilesDependOrdered() { - const value = cloneMap(dtsChangedExpectedReadFiles); - for (const path of sources[project.second][source.ts]) { - value.set(path, 1); - } - value.set(outputFiles[project.second][ext.dts], 2); // dts changes so once read old content, and once new (to emit third) - return value; - } - - function getDtsChangedReadFiles(dependOrdered?: boolean, additionalSourceFiles?: readonly string[]) { - const value = dependOrdered ? dtsChangedExpectedReadFilesDependOrdered : dtsChangedExpectedReadFiles; - if (!additionalSourceFiles) return value; - const expectedReadFiles = cloneMap(value); - for (const path of additionalSourceFiles) { - expectedReadFiles.set(path, 1); - } - return expectedReadFiles; - } - - function getDtsUnchangedExpectedReadFilesDependOrdered() { - const value = cloneMap(dtsUnchangedExpectedReadFiles); - // Since this changes too - for (const path of outputFiles[project.second]) { - value.set(path, 2); - } - return value; - } - - function getDtsUnchangedReadFiles(dependOrdered?: boolean, additionalSourceFiles?: readonly string[]) { - const value = dependOrdered ? dtsUnchangedExpectedReadFilesDependOrdered : dtsUnchangedExpectedReadFiles; - if (!additionalSourceFiles || additionalSourceFiles.length !== 3) return value; - const expectedReadFiles = cloneMap(value); - // Additional source Files - expectedReadFiles.set(additionalSourceFiles[project.first], 1); - return expectedReadFiles; - } - interface VerifyOutFileScenarioInput { - scenario: string; - modifyFs: (fs: vfs.FileSystem) => void; + subScenario: string; + modifyFs?: (fs: vfs.FileSystem) => void; modifyAgainFs?: (fs: vfs.FileSystem) => void; - additionalSourceFiles?: readonly string[]; - dependOrdered?: true; ignoreDtsChanged?: true; ignoreDtsUnchanged?: true; baselineOnly?: true; } function verifyOutFileScenario({ - scenario, + subScenario, modifyFs, modifyAgainFs, - additionalSourceFiles, - dependOrdered, ignoreDtsChanged, ignoreDtsUnchanged, baselineOnly }: VerifyOutFileScenarioInput) { - const initialExpectedReadFiles = !baselineOnly ? getInitialExpectedReadFiles(additionalSourceFiles) : undefined; - const dtsChangedReadFiles = !baselineOnly && !ignoreDtsChanged ? getDtsChangedReadFiles(dependOrdered, additionalSourceFiles) : undefined; - const dtsUnchanged: ExpectedBuildOutput | undefined = !baselineOnly && (!ignoreDtsUnchanged || !modifyAgainFs) ? { - expectedDiagnostics: dependOrdered ? - dtsUnchangedExpectedDiagnosticsDependOrdered : - dtsUnchangedExpectedDiagnostics, - expectedReadFiles: getDtsUnchangedReadFiles(dependOrdered, additionalSourceFiles) - } : undefined; - - verifyTsbuildOutput({ - scenario, - projFs: () => outFileFs, - time, - tick, - proj: "outfile-concat", - rootNames: ["/src/third"], - baselineSourceMap: true, - initialBuild: { - modifyFs, - expectedDiagnostics: initialExpectedDiagnostics, - expectedReadFiles: initialExpectedReadFiles - }, - incrementalDtsChangedBuild: !ignoreDtsChanged ? { + const incrementalScenarios: TscIncremental[] = []; + if (!ignoreDtsChanged) { + incrementalScenarios.push({ + buildKind: BuildKind.IncrementalDtsChange, modifyFs: fs => replaceText(fs, relSources[project.first][source.ts][part.one], "Hello", "Hola"), - expectedDiagnostics: dependOrdered ? - dtsChangedExpectedDiagnosticsDependOrdered : - dtsChangedExpectedDiagnostics, - expectedReadFiles: dtsChangedReadFiles - } : undefined, - incrementalDtsUnchangedBuild: !ignoreDtsUnchanged ? { + }); + } + if (!ignoreDtsUnchanged) { + incrementalScenarios.push({ + buildKind: BuildKind.IncrementalDtsUnchanged, modifyFs: fs => appendText(fs, relSources[project.first][source.ts][part.one], "console.log(s);"), - expectedDiagnostics: dtsUnchanged && dtsUnchanged.expectedDiagnostics, - expectedReadFiles: dtsUnchanged && dtsUnchanged.expectedReadFiles - } : undefined, - incrementalHeaderChangedBuild: modifyAgainFs ? { - modifyFs: modifyAgainFs, - expectedDiagnostics: dtsUnchanged && dtsUnchanged.expectedDiagnostics, - expectedReadFiles: dtsUnchanged && dtsUnchanged.expectedReadFiles - } : undefined, - baselineOnly - }); + }); + } + if (modifyAgainFs) { + incrementalScenarios.push({ + buildKind: BuildKind.IncrementalHeadersChange, + modifyFs: modifyAgainFs + }); + } + const input: VerifyTsBuildInput = { + subScenario, + fs: () => outFileFs, + scenario: "outfile-concat", + commandLineArgs: ["--b", "/src/third", "--verbose"], + baselineSourceMap: true, + modifyFs, + baselineReadFileCalls: !baselineOnly, + incrementalScenarios, + }; + return incrementalScenarios.length ? + verifyTscIncrementalEdits(input) : + verifyTsc(input); } // Verify initial + incremental edits verifyOutFileScenario({ - scenario: "baseline sectioned sourcemaps", - modifyFs: noop + subScenario: "baseline sectioned sourcemaps", }); // Verify baseline with build info + dts unChanged verifyOutFileScenario({ - scenario: "when final project is not composite but uses project references", + subScenario: "when final project is not composite but uses project references", modifyFs: fs => replaceText(fs, sources[project.third][source.config], `"composite": true,`, ""), ignoreDtsChanged: true, baselineOnly: true @@ -314,7 +149,7 @@ namespace ts { // Verify baseline with build info verifyOutFileScenario({ - scenario: "when final project is not composite but incremental", + subScenario: "when final project is not composite but incremental", modifyFs: fs => replaceText(fs, sources[project.third][source.config], `"composite": true,`, `"incremental": true,`), ignoreDtsChanged: true, ignoreDtsUnchanged: true, @@ -323,7 +158,7 @@ namespace ts { // Verify baseline with build info verifyOutFileScenario({ - scenario: "when final project specifies tsBuildInfoFile", + subScenario: "when final project specifies tsBuildInfoFile", modifyFs: fs => replaceText(fs, sources[project.third][source.config], `"composite": true,`, `"composite": true, "tsBuildInfoFile": "./thirdjs/output/third.tsbuildinfo",`), ignoreDtsChanged: true, @@ -338,7 +173,7 @@ namespace ts { ...outputFiles[project.second], ...outputFiles[project.third] ]; - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host); builder.build(); host.assertDiagnosticMessages(...initialExpectedDiagnostics); @@ -354,13 +189,13 @@ namespace ts { }); it("verify buildInfo absence results in new build", () => { - const fs = outFileFs.shadow(); + const { fs, tick } = getFsWithTime(outFileFs); const expectedOutputs = [ ...outputFiles[project.first], ...outputFiles[project.second], ...outputFiles[project.third] ]; - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); let builder = createSolutionBuilder(host); builder.build(); host.assertDiagnosticMessages(...initialExpectedDiagnostics); @@ -368,7 +203,11 @@ namespace ts { verifyOutputsPresent(fs, expectedOutputs); // Delete bundle info host.clearDiagnostics(); + + tick(); host.deleteFile(outputFiles[project.first][ext.buildinfo]); + tick(); + builder = createSolutionBuilder(host); builder.build(); host.assertDiagnosticMessages( @@ -384,7 +223,7 @@ namespace ts { it("verify that if incremental is set to false, tsbuildinfo is not generated", () => { const fs = outFileFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); replaceText(fs, sources[project.third][source.config], `"composite": true,`, ""); const builder = createSolutionBuilder(host); builder.build(); @@ -395,14 +234,16 @@ namespace ts { }); it("rebuilds completely when version in tsbuildinfo doesnt match ts version", () => { - const fs = outFileFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const { fs, tick } = getFsWithTime(outFileFs); + const host = fakes.SolutionBuilderHost.create(fs); let builder = createSolutionBuilder(host); builder.build(); host.assertDiagnosticMessages(...initialExpectedDiagnostics); host.clearDiagnostics(); + tick(); builder = createSolutionBuilder(host); changeCompilerVersion(host); + tick(); builder.build(); host.assertDiagnosticMessages( getExpectedDiagnosticForProjectsInBuild(relSources[project.first][source.config], relSources[project.second][source.config], relSources[project.third][source.config]), @@ -416,12 +257,12 @@ namespace ts { }); it("rebuilds completely when command line incremental flag changes between non dts changes", () => { - const fs = outFileFs.shadow(); + const { fs, tick } = getFsWithTime(outFileFs); // Make non composite third project replaceText(fs, sources[project.third][source.config], `"composite": true,`, ""); // Build with command line incremental - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); let builder = createSolutionBuilder(host, { incremental: true }); builder.build(); host.assertDiagnosticMessages(...initialExpectedDiagnostics); @@ -460,7 +301,7 @@ namespace ts { it("builds till project specified", () => { const fs = outFileFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, { verbose: false }); const result = builder.build(sources[project.second][source.config]); host.assertDiagnosticMessages(/*empty*/); @@ -473,7 +314,7 @@ namespace ts { it("cleans till project specified", () => { const fs = outFileFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, { verbose: false }); builder.build(); const result = builder.clean(sources[project.second][source.config]); @@ -490,7 +331,7 @@ namespace ts { describe("Prologues", () => { // Verify initial + incremental edits verifyOutFileScenario({ - scenario: "strict in all projects", + subScenario: "strict in all projects", modifyFs: fs => { enableStrict(fs, sources[project.first][source.config]); enableStrict(fs, sources[project.second][source.config]); @@ -501,7 +342,7 @@ namespace ts { // Verify ignore dtsChanged verifyOutFileScenario({ - scenario: "strict in one dependency", + subScenario: "strict in one dependency", modifyFs: fs => enableStrict(fs, sources[project.second][source.config]), modifyAgainFs: fs => addTestPrologue(fs, "src/first/first_PART1.ts", `"myPrologue"`), ignoreDtsChanged: true, @@ -510,7 +351,7 @@ namespace ts { // Verify initial + incremental edits - sourcemap verification verifyOutFileScenario({ - scenario: "multiple prologues in all projects", + subScenario: "multiple prologues in all projects", modifyFs: fs => { enableStrict(fs, sources[project.first][source.config]); addTestPrologue(fs, sources[project.first][source.ts][part.one], `"myPrologue"`); @@ -526,7 +367,7 @@ namespace ts { // Verify ignore dtsChanged verifyOutFileScenario({ - scenario: "multiple prologues in different projects", + subScenario: "multiple prologues in different projects", modifyFs: fs => { enableStrict(fs, sources[project.first][source.config]); addTestPrologue(fs, sources[project.second][source.ts][part.one], `"myPrologue"`); @@ -544,7 +385,7 @@ namespace ts { // changes declaration because its emitted in .d.ts file // Verify initial + incremental edits verifyOutFileScenario({ - scenario: "shebang in all projects", + subScenario: "shebang in all projects", modifyFs: fs => { addShebang(fs, "first", "first_PART1"); addShebang(fs, "first", "first_part2"); @@ -555,7 +396,7 @@ namespace ts { // Verify ignore dtsChanged verifyOutFileScenario({ - scenario: "shebang in only one dependency project", + subScenario: "shebang in only one dependency project", modifyFs: fs => addShebang(fs, "second", "second_part1"), ignoreDtsChanged: true, baselineOnly: true @@ -566,7 +407,7 @@ namespace ts { describe("emitHelpers", () => { // Verify initial + incremental edits verifyOutFileScenario({ - scenario: "emitHelpers in all projects", + subScenario: "emitHelpers in all projects", modifyFs: fs => { addRest(fs, "first", "first_PART1"); addRest(fs, "second", "second_part1"); @@ -577,7 +418,7 @@ namespace ts { // Verify ignore dtsChanged verifyOutFileScenario({ - scenario: "emitHelpers in only one dependency project", + subScenario: "emitHelpers in only one dependency project", modifyFs: fs => { addStubFoo(fs, "first", "first_PART1"); addRest(fs, "second", "second_part1"); @@ -589,7 +430,7 @@ namespace ts { // Verify ignore dtsChanged verifyOutFileScenario({ - scenario: "multiple emitHelpers in all projects", + subScenario: "multiple emitHelpers in all projects", modifyFs: fs => { addRest(fs, "first", "first_PART1"); addSpread(fs, "first", "first_part3"); @@ -605,7 +446,7 @@ namespace ts { // Verify ignore dtsChanged verifyOutFileScenario({ - scenario: "multiple emitHelpers in different projects", + subScenario: "multiple emitHelpers in different projects", modifyFs: fs => { addRest(fs, "first", "first_PART1"); addSpread(fs, "second", "second_part1"); @@ -622,24 +463,18 @@ namespace ts { // changes declaration because its emitted in .d.ts file // Verify initial + incremental edits verifyOutFileScenario({ - scenario: "triple slash refs in all projects", + subScenario: "triple slash refs in all projects", modifyFs: fs => { addTripleSlashRef(fs, "first", "first_part2"); addTripleSlashRef(fs, "second", "second_part1"); addTripleSlashRef(fs, "third", "third_part1"); - }, - additionalSourceFiles: [ - getTripleSlashRef("first"), getTripleSlashRef("second"), getTripleSlashRef("third") - ] + } }); // Verify ignore dtsChanged verifyOutFileScenario({ - scenario: "triple slash refs in one project", + subScenario: "triple slash refs in one project", modifyFs: fs => addTripleSlashRef(fs, "second", "second_part1"), - additionalSourceFiles: [ - getTripleSlashRef("second") - ], ignoreDtsChanged: true, baselineOnly: true }); @@ -698,14 +533,14 @@ ${internal} enum internalEnum { a, b, c }`); // Verify initial + incremental edits verifyOutFileScenario({ - scenario: "stripInternal", + subScenario: "stripInternal", modifyFs: stripInternalScenario, modifyAgainFs: fs => replaceText(fs, sources[project.first][source.ts][part.one], `/*@internal*/ interface`, "interface"), }); // Verify ignore dtsChanged verifyOutFileScenario({ - scenario: "stripInternal with comments emit enabled", + subScenario: "stripInternal with comments emit enabled", modifyFs: fs => stripInternalScenario(fs, /*removeCommentsDisabled*/ true), modifyAgainFs: fs => replaceText(fs, sources[project.first][source.ts][part.one], `/*@internal*/ interface`, "interface"), ignoreDtsChanged: true, @@ -714,7 +549,7 @@ ${internal} enum internalEnum { a, b, c }`); // Verify ignore dtsChanged verifyOutFileScenario({ - scenario: "stripInternal jsdoc style comment", + subScenario: "stripInternal jsdoc style comment", modifyFs: fs => stripInternalScenario(fs, /*removeCommentsDisabled*/ false, /*jsDocStyle*/ true), modifyAgainFs: fs => replaceText(fs, sources[project.first][source.ts][part.one], `/**@internal*/ interface`, "interface"), ignoreDtsChanged: true, @@ -723,7 +558,7 @@ ${internal} enum internalEnum { a, b, c }`); // Verify ignore dtsChanged verifyOutFileScenario({ - scenario: "stripInternal jsdoc style with comments emit enabled", + subScenario: "stripInternal jsdoc style with comments emit enabled", modifyFs: fs => stripInternalScenario(fs, /*removeCommentsDisabled*/ true, /*jsDocStyle*/ true), ignoreDtsChanged: true, baselineOnly: true @@ -743,37 +578,33 @@ ${internal} enum internalEnum { a, b, c }`); // Verify initial + incremental edits verifyOutFileScenario({ - scenario: "stripInternal when one-two-three are prepended in order", + subScenario: "stripInternal when one-two-three are prepended in order", modifyFs: stripInternalWithDependentOrder, modifyAgainFs: fs => replaceText(fs, sources[project.first][source.ts][part.one], `/*@internal*/ interface`, "interface"), - dependOrdered: true, }); // Verify ignore dtsChanged verifyOutFileScenario({ - scenario: "stripInternal with comments emit enabled when one-two-three are prepended in order", + subScenario: "stripInternal with comments emit enabled when one-two-three are prepended in order", modifyFs: fs => stripInternalWithDependentOrder(fs, /*removeCommentsDisabled*/ true), modifyAgainFs: fs => replaceText(fs, sources[project.first][source.ts][part.one], `/*@internal*/ interface`, "interface"), - dependOrdered: true, ignoreDtsChanged: true, baselineOnly: true }); // Verify ignore dtsChanged verifyOutFileScenario({ - scenario: "stripInternal jsdoc style comment when one-two-three are prepended in order", + subScenario: "stripInternal jsdoc style comment when one-two-three are prepended in order", modifyFs: fs => stripInternalWithDependentOrder(fs, /*removeCommentsDisabled*/ false, /*jsDocStyle*/ true), modifyAgainFs: fs => replaceText(fs, sources[project.first][source.ts][part.one], `/**@internal*/ interface`, "interface"), - dependOrdered: true, ignoreDtsChanged: true, baselineOnly: true }); // Verify ignore dtsChanged verifyOutFileScenario({ - scenario: "stripInternal jsdoc style with comments emit enabled when one-two-three are prepended in order", + subScenario: "stripInternal jsdoc style with comments emit enabled when one-two-three are prepended in order", modifyFs: fs => stripInternalWithDependentOrder(fs, /*removeCommentsDisabled*/ true, /*jsDocStyle*/ true), - dependOrdered: true, ignoreDtsChanged: true, baselineOnly: true }); @@ -781,7 +612,7 @@ ${internal} enum internalEnum { a, b, c }`); // only baseline verifyOutFileScenario({ - scenario: "stripInternal baseline when internal is inside another internal", + subScenario: "stripInternal baseline when internal is inside another internal", modifyFs: fs => { stripInternalOfThird(fs); prependText(fs, sources[project.first][source.ts][part.one], `namespace ts { @@ -820,7 +651,7 @@ ${internal} enum internalEnum { a, b, c }`); // only baseline verifyOutFileScenario({ - scenario: "stripInternal when few members of enum are internal", + subScenario: "stripInternal when few members of enum are internal", modifyFs: fs => { stripInternalOfThird(fs); prependText(fs, sources[project.first][source.ts][part.one], `enum TokenFlags { @@ -860,7 +691,7 @@ ${internal} enum internalEnum { a, b, c }`); // Verify ignore dtsChanged verifyOutFileScenario({ - scenario: "when source files are empty in the own file", + subScenario: "when source files are empty in the own file", modifyFs: makeThirdEmptySourceFile, ignoreDtsChanged: true, baselineOnly: true @@ -868,7 +699,7 @@ ${internal} enum internalEnum { a, b, c }`); // only baseline verifyOutFileScenario({ - scenario: "declarationMap and sourceMap disabled", + subScenario: "declarationMap and sourceMap disabled", modifyFs: fs => { makeThirdEmptySourceFile(fs); replaceText(fs, sources[project.third][source.config], `"composite": true,`, ""); @@ -898,7 +729,7 @@ ${internal} enum internalEnum { a, b, c }`); replaceText(fs, sources[project.second][source.config], `"outFile": "../2/second-output.js",`, ""); replaceText(fs, sources[project.third][source.config], `"outFile": "./thirdjs/output/third-output.js",`, ""); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host); builder.build(); host.assertDiagnosticMessages( diff --git a/src/testRunner/unittests/tsbuild/referencesWithRootDirInParent.ts b/src/testRunner/unittests/tsbuild/referencesWithRootDirInParent.ts index 79cc34ce01628..d81e5f3f947d6 100644 --- a/src/testRunner/unittests/tsbuild/referencesWithRootDirInParent.ts +++ b/src/testRunner/unittests/tsbuild/referencesWithRootDirInParent.ts @@ -16,7 +16,7 @@ namespace ts { "/src/dist/main/b.js", "/src/dist/main/b.d.ts" ]; const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, ["/src/src/main", "/src/src/other"], {}); builder.build(); host.assertDiagnosticMessages(/*empty*/); @@ -34,7 +34,7 @@ namespace ts { ]; const fs = projFs.shadow(); replaceText(fs, "/src/tsconfig.base.json", `"rootDir": "./src/",`, ""); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, ["/src/src/main"], { verbose: true }); builder.build(); host.assertDiagnosticMessages( @@ -69,7 +69,7 @@ namespace ts { fs.writeFileSync("/src/src/other/tsconfig.json", JSON.stringify({ compilerOptions: { composite: true, outDir: "../../dist/" }, })); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, ["/src/src/main"], { verbose: true }); builder.build(); host.assertDiagnosticMessages( @@ -105,7 +105,7 @@ namespace ts { fs.writeFileSync("/src/src/other/tsconfig.other.json", JSON.stringify({ compilerOptions: { composite: true, outDir: "../../dist/" }, })); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, ["/src/src/main/tsconfig.main.json"], { verbose: true }); builder.build(); host.assertDiagnosticMessages( diff --git a/src/testRunner/unittests/tsbuild/resolveJsonModule.ts b/src/testRunner/unittests/tsbuild/resolveJsonModule.ts index f1ea08324f6eb..71ae0d4c86e80 100644 --- a/src/testRunner/unittests/tsbuild/resolveJsonModule.ts +++ b/src/testRunner/unittests/tsbuild/resolveJsonModule.ts @@ -1,10 +1,9 @@ namespace ts { describe("unittests:: tsbuild:: with resolveJsonModule option on project resolveJsonModuleAndComposite", () => { let projFs: vfs.FileSystem; - const { time, tick } = getTime(); const allExpectedOutputs = ["/src/dist/src/index.js", "/src/dist/src/index.d.ts", "/src/dist/src/hello.json"]; before(() => { - projFs = loadProjectFromDisk("tests/projects/resolveJsonModuleAndComposite", time); + projFs = loadProjectFromDisk("tests/projects/resolveJsonModuleAndComposite"); }); after(() => { @@ -17,7 +16,7 @@ namespace ts { } function verifyProjectWithResolveJsonModuleWithFs(fs: vfs.FileSystem, configFile: string, allExpectedOutputs: readonly string[], ...expectedDiagnosticMessages: fakes.ExpectedDiagnostic[]) { - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, [configFile], { dry: false, force: false, verbose: false }); builder.build(); host.assertDiagnosticMessages(...expectedDiagnosticMessages); @@ -65,10 +64,10 @@ export default hello.hello`); }); it("with resolveJsonModule and sourceMap", () => { - const fs = projFs.shadow(); + const { fs, tick } = getFsWithTime(projFs); const configFile = "src/tsconfig_withFiles.json"; replaceText(fs, configFile, `"composite": true,`, `"composite": true, "sourceMap": true,`); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); let builder = createSolutionBuilder(host, [configFile], { verbose: true }); builder.build(); host.assertDiagnosticMessages( @@ -88,10 +87,10 @@ export default hello.hello`); }); it("with resolveJsonModule and without outDir", () => { - const fs = projFs.shadow(); + const { fs, tick } = getFsWithTime(projFs); const configFile = "src/tsconfig_withFiles.json"; replaceText(fs, configFile, `"outDir": "dist",`, ""); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); let builder = createSolutionBuilder(host, [configFile], { verbose: true }); builder.build(); host.assertDiagnosticMessages( @@ -112,10 +111,9 @@ export default hello.hello`); }); describe("unittests:: tsbuild:: with resolveJsonModule option on project importJsonFromProjectReference", () => { - const { time, tick } = getTime(); let projFs: vfs.FileSystem; before(() => { - projFs = loadProjectFromDisk("tests/projects/importJsonFromProjectReference", time); + projFs = loadProjectFromDisk("tests/projects/importJsonFromProjectReference"); }); after(() => { @@ -124,11 +122,11 @@ export default hello.hello`); it("when importing json module from project reference", () => { const expectedOutput = "/src/main/index.js"; - const fs = projFs.shadow(); + const { fs, tick } = getFsWithTime(projFs); const configFile = "src/tsconfig.json"; const stringsConfigFile = "src/strings/tsconfig.json"; const mainConfigFile = "src/main/tsconfig.json"; - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); let builder = createSolutionBuilder(host, [configFile], { verbose: true }); builder.build(); host.assertDiagnosticMessages( diff --git a/src/testRunner/unittests/tsbuild/sample.ts b/src/testRunner/unittests/tsbuild/sample.ts index d95ba5e514a2c..1a27a624197e0 100644 --- a/src/testRunner/unittests/tsbuild/sample.ts +++ b/src/testRunner/unittests/tsbuild/sample.ts @@ -1,14 +1,13 @@ namespace ts { describe("unittests:: tsbuild:: on 'sample1' project", () => { let projFs: vfs.FileSystem; - const { time, tick } = getTime(); const testsOutputs = ["/src/tests/index.js", "/src/tests/index.d.ts", "/src/tests/tsconfig.tsbuildinfo"]; const logicOutputs = ["/src/logic/index.js", "/src/logic/index.js.map", "/src/logic/index.d.ts", "/src/logic/tsconfig.tsbuildinfo"]; const coreOutputs = ["/src/core/index.js", "/src/core/index.d.ts", "/src/core/index.d.ts.map", "/src/core/tsconfig.tsbuildinfo"]; const allExpectedOutputs = [...testsOutputs, ...logicOutputs, ...coreOutputs]; before(() => { - projFs = loadProjectFromDisk("tests/projects/sample1", time); + projFs = loadProjectFromDisk("tests/projects/sample1"); }); after(() => { @@ -18,7 +17,7 @@ namespace ts { describe("sanity check of clean build of 'sample1' project", () => { it("can build the sample project 'sample1' without error", () => { const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, ["/src/tests"], { dry: false, force: false, verbose: false }); host.clearDiagnostics(); @@ -36,7 +35,7 @@ namespace ts { references: [{ path: "../core" }] })); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, ["/src/tests"], {}); builder.build(); host.assertDiagnosticMessages(/*empty*/); @@ -52,7 +51,7 @@ namespace ts { references: [{ path: "../core" }] })); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, ["/src/tests"], {}); builder.build(); host.assertDiagnosticMessages(/*empty*/); @@ -64,7 +63,7 @@ namespace ts { it("builds correctly when project is not composite or doesnt have any references", () => { const fs = projFs.shadow(); replaceText(fs, "/src/core/tsconfig.json", `"composite": true,`, ""); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, ["/src/core"], { verbose: true }); builder.build(); host.assertDiagnosticMessages( @@ -79,7 +78,7 @@ namespace ts { describe("dry builds", () => { it("doesn't write any files in a dry build", () => { const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, ["/src/tests"], { dry: true, force: false, verbose: false }); builder.build(); host.assertDiagnosticMessages( @@ -93,8 +92,8 @@ namespace ts { }); it("indicates that it would skip builds during a dry build", () => { - const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const { fs, tick } = getFsWithTime(projFs); + const host = fakes.SolutionBuilderHost.create(fs); let builder = createSolutionBuilder(host, ["/src/tests"], { dry: false, force: false, verbose: false }); builder.build(); @@ -114,7 +113,7 @@ namespace ts { describe("clean builds", () => { it("removes all files it built", () => { const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, ["/src/tests"], { dry: false, force: false, verbose: false }); builder.build(); @@ -136,7 +135,7 @@ namespace ts { it("cleans till project specified", () => { const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, ["/src/tests"], {}); builder.build(); const result = builder.clean("/src/logic"); @@ -148,7 +147,7 @@ namespace ts { it("cleaning project in not build order doesnt throw error", () => { const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, ["/src/tests"], {}); builder.build(); const result = builder.clean("/src/logic2"); @@ -160,8 +159,8 @@ namespace ts { describe("force builds", () => { it("always builds under --force", () => { - const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const { fs, time, tick } = getFsWithTime(projFs); + const host = fakes.SolutionBuilderHost.create(fs); let builder = createSolutionBuilder(host, ["/src/tests"], { dry: false, force: true, verbose: false }); builder.build(); @@ -187,8 +186,8 @@ namespace ts { describe("can detect when and what to rebuild", () => { function initializeWithBuild(opts?: BuildOptions) { - const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const { fs, tick } = getFsWithTime(projFs); + const host = fakes.SolutionBuilderHost.create(fs); let builder = createSolutionBuilder(host, ["/src/tests"], { verbose: true }); builder.build(); host.clearDiagnostics(); @@ -199,7 +198,7 @@ namespace ts { it("Builds the project", () => { const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, ["/src/tests"], { verbose: true }); builder.build(); host.assertDiagnosticMessages( @@ -273,8 +272,8 @@ namespace ts { }); it("does not rebuild if there is no program and bundle in the ts build info event if version doesnt match ts version", () => { - const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs, /*options*/ undefined, /*setParentNodes*/ undefined, createAbstractBuilder); + const { fs, tick } = getFsWithTime(projFs); + const host = fakes.SolutionBuilderHost.create(fs, /*options*/ undefined, /*setParentNodes*/ undefined, createAbstractBuilder); let builder = createSolutionBuilder(host, ["/src/tests"], { verbose: true }); builder.build(); host.assertDiagnosticMessages( @@ -329,10 +328,10 @@ namespace ts { }); it("rebuilds when extended config file changes", () => { - const fs = projFs.shadow(); + const { fs, tick } = getFsWithTime(projFs); fs.writeFileSync("/src/tests/tsconfig.base.json", JSON.stringify({ compilerOptions: { target: "es3" } })); replaceText(fs, "/src/tests/tsconfig.json", `"references": [`, `"extends": "./tsconfig.base.json", "references": [`); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); let builder = createSolutionBuilder(host, ["/src/tests"], { verbose: true }); builder.build(); host.assertDiagnosticMessages( @@ -360,7 +359,7 @@ namespace ts { it("builds till project specified", () => { const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, ["/src/tests"], {}); const result = builder.build("/src/logic"); host.assertDiagnosticMessages(/*empty*/); @@ -371,7 +370,7 @@ namespace ts { it("building project in not build order doesnt throw error", () => { const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, ["/src/tests"], {}); const result = builder.build("/src/logic2"); host.assertDiagnosticMessages(/*empty*/); @@ -386,7 +385,7 @@ namespace ts { } const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, ["/src/tests"], {}); verifyBuildNextResult({ project: "/src/core/tsconfig.json" as ResolvedConfigFileName, @@ -420,7 +419,7 @@ namespace ts { it("building using buildReferencedProject", () => { const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, ["/src/tests"], { verbose: true }); builder.buildReferences("/src/tests"); host.assertDiagnosticMessages( @@ -438,7 +437,7 @@ namespace ts { describe("downstream-blocked compilations", () => { it("won't build downstream projects if upstream projects have errors", () => { const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, ["/src/tests"], { dry: false, force: false, verbose: true }); // Induce an error in the middle project @@ -462,8 +461,8 @@ namespace ts { describe("project invalidation", () => { it("invalidates projects correctly", () => { - const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const { fs, time, tick } = getFsWithTime(projFs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, ["/src/tests"], { dry: false, force: false, verbose: false }); builder.build(); @@ -518,7 +517,7 @@ export class cNew {}`); describe("lists files", () => { it("listFiles", () => { const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, ["/src/tests"], { listFiles: true }); builder.build(); assert.deepEqual(host.traces, [ @@ -545,7 +544,7 @@ export class cNew {}`); it("listEmittedFiles", () => { const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); const builder = createSolutionBuilder(host, ["/src/tests"], { listEmittedFiles: true }); builder.build(); assert.deepEqual(host.traces, [ @@ -568,266 +567,73 @@ export class cNew {}`); }); describe("emit output", () => { - const initialBuild: BuildState = { - modifyFs: noop, - expectedDiagnostics: [ - getExpectedDiagnosticForProjectsInBuild("src/core/tsconfig.json", "src/logic/tsconfig.json", "src/tests/tsconfig.json"), - [Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, "src/core/tsconfig.json", "src/core/anotherModule.js"], - [Diagnostics.Building_project_0, "/src/core/tsconfig.json"], - [Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, "src/logic/tsconfig.json", "src/logic/index.js"], - [Diagnostics.Building_project_0, "/src/logic/tsconfig.json"], - [Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, "src/tests/tsconfig.json", "src/tests/index.js"], - [Diagnostics.Building_project_0, "/src/tests/tsconfig.json"] - ], - expectedReadFiles: getReadFilesMap( - [ - // Configs - "/src/core/tsconfig.json", - "/src/logic/tsconfig.json", - "/src/tests/tsconfig.json", - - // Source files - "/src/core/anotherModule.ts", - "/src/core/index.ts", - "/src/core/some_decl.d.ts", - "/src/logic/index.ts", - "/src/tests/index.ts", - - // Modules of generated files - "/src/core/anotherModule.d.ts", - "/src/core/index.d.ts", - "/src/logic/index.d.ts", - - // build info - "/src/core/tsconfig.tsbuildinfo", - "/src/logic/tsconfig.tsbuildinfo", - "/src/tests/tsconfig.tsbuildinfo" - ] - ) - }; - verifyTsbuildOutput({ - scenario: "sample", - projFs: () => projFs, - time, - tick, - proj: "sample1", - rootNames: ["/src/tests"], + verifyTscIncrementalEdits({ + subScenario: "sample", + fs: () => projFs, + scenario: "sample1", + commandLineArgs: ["--b", "/src/tests", "--verbose"], baselineSourceMap: true, - initialBuild, - incrementalDtsChangedBuild: { - modifyFs: fs => appendText(fs, "/src/core/index.ts", ` + baselineReadFileCalls: true, + incrementalScenarios: [ + { + buildKind: BuildKind.IncrementalDtsChange, + modifyFs: fs => appendText(fs, "/src/core/index.ts", ` export class someClass { }`), - expectedDiagnostics: [ - // Emits only partial core instead of all outputs - getExpectedDiagnosticForProjectsInBuild("src/core/tsconfig.json", "src/logic/tsconfig.json", "src/tests/tsconfig.json"), - [Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, "src/core/tsconfig.json", "src/core/anotherModule.js", "src/core/index.ts"], - [Diagnostics.Building_project_0, "/src/core/tsconfig.json"], - [Diagnostics.Updating_unchanged_output_timestamps_of_project_0, "/src/core/tsconfig.json"], - [Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, "src/logic/tsconfig.json", "src/logic/index.js", "src/core"], - [Diagnostics.Building_project_0, "/src/logic/tsconfig.json"], - [Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, "src/tests/tsconfig.json", "src/tests/index.js", "src/core"], - [Diagnostics.Building_project_0, "/src/tests/tsconfig.json"], - ], - expectedReadFiles: getReadFilesMap( - [ - // Configs - "/src/core/tsconfig.json", - "/src/logic/tsconfig.json", - "/src/tests/tsconfig.json", - - // Source files - "/src/core/anotherModule.ts", - "/src/core/index.ts", - "/src/core/some_decl.d.ts", - "/src/logic/index.ts", - "/src/tests/index.ts", - - // Modules of generated files - "/src/core/anotherModule.d.ts", - "/src/core/index.d.ts", - "/src/logic/index.d.ts", - - // build info - "/src/core/tsconfig.tsbuildinfo", - "/src/logic/tsconfig.tsbuildinfo", - "/src/tests/tsconfig.tsbuildinfo", - - "/src/tests/index.d.ts", // to check if d.ts has changed - ], - "/src/core/index.d.ts", // to check if changed, and to build other projects after change - ), - }, - incrementalDtsUnchangedBuild: { - modifyFs: fs => appendText(fs, "/src/core/index.ts", ` + }, + { + buildKind: BuildKind.IncrementalDtsUnchanged, + modifyFs: fs => appendText(fs, "/src/core/index.ts", ` class someClass { }`), - expectedDiagnostics: [ - getExpectedDiagnosticForProjectsInBuild("src/core/tsconfig.json", "src/logic/tsconfig.json", "src/tests/tsconfig.json"), - [Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, "src/core/tsconfig.json", "src/core/anotherModule.js", "src/core/index.ts"], - [Diagnostics.Building_project_0, "/src/core/tsconfig.json"], - [Diagnostics.Updating_unchanged_output_timestamps_of_project_0, "/src/core/tsconfig.json"], - [Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies, "src/logic/tsconfig.json"], - [Diagnostics.Updating_output_timestamps_of_project_0, "/src/logic/tsconfig.json"], - [Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies, "src/tests/tsconfig.json"], - [Diagnostics.Updating_output_timestamps_of_project_0, "/src/tests/tsconfig.json"] - ], - expectedReadFiles: getReadFilesMap( - [ - // Configs - "/src/core/tsconfig.json", - "/src/logic/tsconfig.json", - "/src/tests/tsconfig.json", - - // Source files - "/src/core/anotherModule.ts", - "/src/core/index.ts", - "/src/core/some_decl.d.ts", - - // to check if changed - "/src/core/index.d.ts", - - // build info - "/src/core/tsconfig.tsbuildinfo", - "/src/logic/tsconfig.tsbuildinfo", - "/src/tests/tsconfig.tsbuildinfo", - ], - ) - }, - }); - - verifyTsbuildOutput({ - scenario: "when logic config changes declaration dir", - projFs: () => projFs, - time, - tick, - proj: "sample1", - rootNames: ["/src/tests"], - baselineSourceMap: true, - initialBuild, - incrementalDtsChangedBuild: { - modifyFs: fs => replaceText(fs, "/src/logic/tsconfig.json", `"declaration": true,`, `"declaration": true, + }, + { + subScenario: "when logic config changes declaration dir", + buildKind: BuildKind.IncrementalDtsChange, + modifyFs: fs => replaceText(fs, "/src/logic/tsconfig.json", `"declaration": true,`, `"declaration": true, "declarationDir": "decls",`), - expectedDiagnostics: [ - getExpectedDiagnosticForProjectsInBuild("src/core/tsconfig.json", "src/logic/tsconfig.json", "src/tests/tsconfig.json"), - [Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2, "src/core/tsconfig.json", "src/core/anotherModule.ts", "src/core/anotherModule.js"], - [Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, "src/logic/tsconfig.json", "src/logic/decls/index.d.ts"], - [Diagnostics.Building_project_0, "/src/logic/tsconfig.json"], - [Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, "src/tests/tsconfig.json", "src/tests/index.js", "src/logic"], - [Diagnostics.Building_project_0, "/src/tests/tsconfig.json"], - ], - expectedReadFiles: getReadFilesMap( - [ - // Configs - "/src/core/tsconfig.json", - "/src/logic/tsconfig.json", - "/src/tests/tsconfig.json", - - // Source files - "/src/logic/index.ts", - "/src/tests/index.ts", - - // Modules of generated files - "/src/core/anotherModule.d.ts", - "/src/core/index.d.ts", - "/src/logic/decls/index.d.ts", - - // build info - "/src/core/tsconfig.tsbuildinfo", - "/src/logic/tsconfig.tsbuildinfo", - "/src/tests/tsconfig.tsbuildinfo", - - "/src/tests/index.d.ts", // to check if d.ts has changed - ] - ) - }, + } + ], }); - verifyTsbuildOutput({ - scenario: "when logic specifies tsBuildInfoFile", - projFs: () => projFs, - time, - tick, - proj: "sample1", - rootNames: ["/src/tests"], - baselineSourceMap: true, - initialBuild: { - modifyFs: fs => replaceText(fs, "/src/logic/tsconfig.json", `"composite": true,`, `"composite": true, + verifyTsc({ + scenario: "sample1", + subScenario: "when logic specifies tsBuildInfoFile", + fs: () => projFs, + modifyFs: fs => replaceText(fs, "/src/logic/tsconfig.json", `"composite": true,`, `"composite": true, "tsBuildInfoFile": "ownFile.tsbuildinfo",`), - expectedDiagnostics: initialBuild.expectedDiagnostics, - expectedReadFiles: getReadFilesMap( - [ - // Configs - "/src/core/tsconfig.json", - "/src/logic/tsconfig.json", - "/src/tests/tsconfig.json", - - // Source files - "/src/core/anotherModule.ts", - "/src/core/index.ts", - "/src/core/some_decl.d.ts", - "/src/logic/index.ts", - "/src/tests/index.ts", - - // Modules of generated files - "/src/core/anotherModule.d.ts", - "/src/core/index.d.ts", - "/src/logic/index.d.ts", - - // build info - "/src/core/tsconfig.tsbuildinfo", - "/src/logic/ownFile.tsbuildinfo", - "/src/tests/tsconfig.tsbuildinfo" - ] - ) - }, + commandLineArgs: ["--b", "/src/tests", "--verbose"], + baselineSourceMap: true, + baselineReadFileCalls: true }); - verifyTsbuildOutput({ - scenario: "when declaration option changes", - projFs: () => projFs, - time, - tick, - proj: "sample1", - rootNames: ["/src/core"], - initialBuild: { - modifyFs: fs => fs.writeFileSync("/src/core/tsconfig.json", `{ + verifyTscIncrementalEdits({ + subScenario: "when declaration option changes", + fs: () => projFs, + scenario: "sample1", + commandLineArgs: ["--b", "/src/core", "--verbose"], + modifyFs: fs => fs.writeFileSync("/src/core/tsconfig.json", `{ "compilerOptions": { "incremental": true, "skipDefaultLibCheck": true } }`), - expectedDiagnostics: [ - getExpectedDiagnosticForProjectsInBuild("src/core/tsconfig.json"), - [Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, "src/core/tsconfig.json", "src/core/anotherModule.js"], - [Diagnostics.Building_project_0, "/src/core/tsconfig.json"], - ] - }, - incrementalDtsChangedBuild: { + incrementalScenarios: [{ + buildKind: BuildKind.IncrementalDtsChange, modifyFs: fs => replaceText(fs, "/src/core/tsconfig.json", `"incremental": true,`, `"incremental": true, "declaration": true,`), - expectedDiagnostics: [ - getExpectedDiagnosticForProjectsInBuild("src/core/tsconfig.json"), - [Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, "src/core/tsconfig.json", "src/core/anotherModule.d.ts"], - [Diagnostics.Building_project_0, "/src/core/tsconfig.json"] - ] - }, - baselineOnly: true, - verifyDiagnostics: true - }); - - verifyTsbuildOutput({ - scenario: "when target option changes", - projFs: () => projFs, - time, - tick, - proj: "sample1", - rootNames: ["/src/core"], - initialBuild: { - modifyFs: fs => { - fs.writeFileSync("/lib/lib.esnext.full.d.ts", `/// + }], + }); + + verifyTscIncrementalEdits({ + subScenario: "when target option changes", + fs: () => projFs, + scenario: "sample1", + commandLineArgs: ["--b", "/src/core", "--verbose"], + modifyFs: fs => { + fs.writeFileSync("/lib/lib.esnext.full.d.ts", `/// /// `); - fs.writeFileSync("/lib/lib.esnext.d.ts", libContent); - fs.writeFileSync("/lib/lib.d.ts", `/// + fs.writeFileSync("/lib/lib.esnext.d.ts", libContent); + fs.writeFileSync("/lib/lib.d.ts", `/// /// `); - fs.writeFileSync("/src/core/tsconfig.json", `{ + fs.writeFileSync("/src/core/tsconfig.json", `{ "compilerOptions": { "incremental": true, "listFiles": true, @@ -835,66 +641,36 @@ class someClass { }`), "target": "esnext", } }`); - }, - expectedDiagnostics: [ - getExpectedDiagnosticForProjectsInBuild("src/core/tsconfig.json"), - [Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, "src/core/tsconfig.json", "src/core/anotherModule.js"], - [Diagnostics.Building_project_0, "/src/core/tsconfig.json"], - ] }, - incrementalDtsChangedBuild: { + incrementalScenarios: [{ + buildKind: BuildKind.IncrementalDtsChange, modifyFs: fs => replaceText(fs, "/src/core/tsconfig.json", "esnext", "es5"), - expectedDiagnostics: [ - getExpectedDiagnosticForProjectsInBuild("src/core/tsconfig.json"), - [Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, "src/core/tsconfig.json", "src/core/anotherModule.js", "src/core/tsconfig.json"], - [Diagnostics.Building_project_0, "/src/core/tsconfig.json"] - ] - }, - baselineOnly: true, - verifyDiagnostics: true - }); - - verifyTsbuildOutput({ - scenario: "when module option changes", - projFs: () => projFs, - time, - tick, - proj: "sample1", - rootNames: ["/src/core"], - initialBuild: { - modifyFs: fs => fs.writeFileSync("/src/core/tsconfig.json", `{ + }], + }); + + verifyTscIncrementalEdits({ + subScenario: "when module option changes", + fs: () => projFs, + scenario: "sample1", + commandLineArgs: ["--b", "/src/core", "--verbose"], + modifyFs: fs => fs.writeFileSync("/src/core/tsconfig.json", `{ "compilerOptions": { "incremental": true, "module": "commonjs" } }`), - expectedDiagnostics: [ - getExpectedDiagnosticForProjectsInBuild("src/core/tsconfig.json"), - [Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, "src/core/tsconfig.json", "src/core/anotherModule.js"], - [Diagnostics.Building_project_0, "/src/core/tsconfig.json"], - ] - }, - incrementalDtsChangedBuild: { + incrementalScenarios: [{ + buildKind: BuildKind.IncrementalDtsChange, modifyFs: fs => replaceText(fs, "/src/core/tsconfig.json", `"module": "commonjs"`, `"module": "amd"`), - expectedDiagnostics: [ - getExpectedDiagnosticForProjectsInBuild("src/core/tsconfig.json"), - [Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, "src/core/tsconfig.json", "src/core/anotherModule.js", "src/core/tsconfig.json"], - [Diagnostics.Building_project_0, "/src/core/tsconfig.json"] - ] - }, - baselineOnly: true, - verifyDiagnostics: true - }); - - verifyTsbuildOutput({ - scenario: "when esModuleInterop option changes", - projFs: () => projFs, - time, - tick, - proj: "sample1", - rootNames: ["/src/tests"], - initialBuild: { - modifyFs: fs => fs.writeFileSync("/src/tests/tsconfig.json", `{ + }], + }); + + verifyTscIncrementalEdits({ + subScenario: "when esModuleInterop option changes", + fs: () => projFs, + scenario: "sample1", + commandLineArgs: ["--b", "/src/tests", "--verbose"], + modifyFs: fs => fs.writeFileSync("/src/tests/tsconfig.json", `{ "references": [ { "path": "../core" }, { "path": "../logic" } @@ -908,28 +684,10 @@ class someClass { }`), "esModuleInterop": false } }`), - expectedDiagnostics: [ - getExpectedDiagnosticForProjectsInBuild("src/core/tsconfig.json", "src/logic/tsconfig.json", "src/tests/tsconfig.json"), - [Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, "src/core/tsconfig.json", "src/core/anotherModule.js"], - [Diagnostics.Building_project_0, "/src/core/tsconfig.json"], - [Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, "src/logic/tsconfig.json", "src/logic/index.js"], - [Diagnostics.Building_project_0, "/src/logic/tsconfig.json"], - [Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, "src/tests/tsconfig.json", "src/tests/index.js"], - [Diagnostics.Building_project_0, "/src/tests/tsconfig.json"] - ] - }, - incrementalDtsChangedBuild: { + incrementalScenarios: [{ + buildKind: BuildKind.IncrementalDtsChange, modifyFs: fs => replaceText(fs, "/src/tests/tsconfig.json", `"esModuleInterop": false`, `"esModuleInterop": true`), - expectedDiagnostics: [ - getExpectedDiagnosticForProjectsInBuild("src/core/tsconfig.json", "src/logic/tsconfig.json", "src/tests/tsconfig.json"), - [Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2, "src/core/tsconfig.json", "src/core/anotherModule.ts", "src/core/anotherModule.js"], - [Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2, "src/logic/tsconfig.json", "src/logic/index.ts", "src/logic/index.js"], - [Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, "src/tests/tsconfig.json", "src/tests/index.js", "src/tests/tsconfig.json"], - [Diagnostics.Building_project_0, "/src/tests/tsconfig.json"] - ] - }, - baselineOnly: true, - verifyDiagnostics: true + }], }); }); }); diff --git a/src/testRunner/unittests/tsbuild/transitiveReferences.ts b/src/testRunner/unittests/tsbuild/transitiveReferences.ts index d661ba0c7980e..99fcd75d087e1 100644 --- a/src/testRunner/unittests/tsbuild/transitiveReferences.ts +++ b/src/testRunner/unittests/tsbuild/transitiveReferences.ts @@ -27,7 +27,7 @@ namespace ts { function verifyBuild(modifyDiskLayout: (fs: vfs.FileSystem) => void, allExpectedOutputs: readonly string[], expectedFileTraces: readonly string[], ...expectedDiagnostics: fakes.ExpectedDiagnostic[]) { const fs = projFs.shadow(); - const host = new fakes.SolutionBuilderHost(fs); + const host = fakes.SolutionBuilderHost.create(fs); modifyDiskLayout(fs); const builder = createSolutionBuilder(host, ["/src/tsconfig.c.json"], { listFiles: true }); builder.build(); diff --git a/src/testRunner/unittests/tsc/helpers.ts b/src/testRunner/unittests/tsc/helpers.ts new file mode 100644 index 0000000000000..ad1d64ac2853b --- /dev/null +++ b/src/testRunner/unittests/tsc/helpers.ts @@ -0,0 +1,243 @@ +namespace ts { + export type TscCompileSystem = fakes.System & { + writtenFiles: Map; + baseLine(): void; + }; + function executeCommandLine(sys: TscCompileSystem, commandLineArgs: readonly string[]) { + if (isBuild(commandLineArgs)) { + return performBuild(sys, commandLineArgs.slice(1)); + } + + const reportDiagnostic = createDiagnosticReporter(sys); + const commandLine = parseCommandLine(commandLineArgs, path => sys.readFile(path)); + if (commandLine.options.build) { + reportDiagnostic(createCompilerDiagnostic(Diagnostics.Option_build_must_be_the_first_command_line_argument)); + return sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); + } + + if (commandLine.errors.length > 0) { + commandLine.errors.forEach(reportDiagnostic); + return sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); + } + + let configFileName: string | undefined; + if (commandLine.options.project) { + if (commandLine.fileNames.length !== 0) { + reportDiagnostic(createCompilerDiagnostic(Diagnostics.Option_project_cannot_be_mixed_with_source_files_on_a_command_line)); + return sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); + } + + const fileOrDirectory = normalizePath(commandLine.options.project); + if (!fileOrDirectory /* current directory "." */ || sys.directoryExists(fileOrDirectory)) { + configFileName = combinePaths(fileOrDirectory, "tsconfig.json"); + if (!sys.fileExists(configFileName)) { + reportDiagnostic(createCompilerDiagnostic(Diagnostics.Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0, commandLine.options.project)); + return sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); + } + } + else { + configFileName = fileOrDirectory; + if (!sys.fileExists(configFileName)) { + reportDiagnostic(createCompilerDiagnostic(Diagnostics.The_specified_path_does_not_exist_Colon_0, commandLine.options.project)); + return sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); + } + } + } + else if (commandLine.fileNames.length === 0) { + const searchPath = normalizePath(sys.getCurrentDirectory()); + configFileName = findConfigFile(searchPath, sys.fileExists); + } + + Debug.assert(commandLine.fileNames.length !== 0 || !!configFileName); + + if (configFileName) { + const configParseResult = Debug.assertDefined(parseConfigFileWithSystem(configFileName, commandLine.options, sys, reportDiagnostic)); + if (isIncrementalCompilation(configParseResult.options)) { + performIncrementalCompilation(sys, configParseResult); + } + else { + performCompilation(sys, configParseResult); + } + } + else { + if (isIncrementalCompilation(commandLine.options)) { + performIncrementalCompilation(sys, commandLine); + } + else { + performCompilation(sys, commandLine); + } + } + } + + function createReportErrorSummary(sys: TscCompileSystem, options: CompilerOptions): ReportEmitErrorSummary | undefined { + return options.pretty ? + errorCount => sys.write(getErrorSummaryText(errorCount, sys.newLine)) : + undefined; + } + + function performCompilation(sys: TscCompileSystem, config: ParsedCommandLine) { + const { fileNames, options, projectReferences } = config; + const reportDiagnostic = createDiagnosticReporter(sys, options.pretty); + const host = createCompilerHostWorker(options, /*setParentPos*/ undefined, sys); + const currentDirectory = host.getCurrentDirectory(); + const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames()); + changeCompilerHostLikeToUseCache(host, fileName => toPath(fileName, currentDirectory, getCanonicalFileName)); + const program = createProgram({ + rootNames: fileNames, + options, + projectReferences, + host, + configFileParsingDiagnostics: getConfigFileParsingDiagnostics(config) + }); + const exitStatus = emitFilesAndReportErrorsAndGetExitStatus( + program, + reportDiagnostic, + s => sys.write(s + sys.newLine), + createReportErrorSummary(sys, options) + ); + baselineBuildInfo([config], sys.vfs, sys.writtenFiles); + return sys.exit(exitStatus); + } + + function performIncrementalCompilation(sys: TscCompileSystem, config: ParsedCommandLine) { + const reportDiagnostic = createDiagnosticReporter(sys, config.options.pretty); + const { options, fileNames, projectReferences } = config; + const exitCode = ts.performIncrementalCompilation({ + system: sys, + rootNames: fileNames, + options, + configFileParsingDiagnostics: getConfigFileParsingDiagnostics(config), + projectReferences, + reportDiagnostic, + reportErrorSummary: createReportErrorSummary(sys, options), + }); + baselineBuildInfo([config], sys.vfs, sys.writtenFiles); + return sys.exit(exitCode); + } + + function performBuild(sys: TscCompileSystem, args: string[]) { + const { buildOptions, projects, errors } = parseBuildCommand(args); + const reportDiagnostic = createDiagnosticReporter(sys, buildOptions.pretty); + + if (errors.length > 0) { + errors.forEach(reportDiagnostic); + return sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); + } + + Debug.assert(projects.length !== 0); + + const buildHost = createSolutionBuilderHost( + sys, + /*createProgram*/ undefined, + reportDiagnostic, + createBuilderStatusReporter(sys, buildOptions.pretty), + createReportErrorSummary(sys, buildOptions) + ); + fakes.patchSolutionBuilderHost(buildHost, sys); + const builder = createSolutionBuilder(buildHost, projects, buildOptions); + const exitCode = buildOptions.clean ? builder.clean() : builder.build(); + baselineBuildInfo(builder.getAllParsedConfigs(), sys.vfs, sys.writtenFiles); + return sys.exit(exitCode); + } + + function isBuild(commandLineArgs: readonly string[]) { + if (commandLineArgs.length > 0 && commandLineArgs[0].charCodeAt(0) === CharacterCodes.minus) { + const firstOption = commandLineArgs[0].slice(commandLineArgs[0].charCodeAt(1) === CharacterCodes.minus ? 2 : 1).toLowerCase(); + return firstOption === "build" || firstOption === "b"; + } + return false; + } + + export enum BuildKind { + Initial = "initial-build", + IncrementalDtsChange = "incremental-declaration-changes", + IncrementalDtsUnchanged = "incremental-declaration-doesnt-change", + IncrementalHeadersChange = "incremental-headers-change-without-dts-changes" + } + + export interface TscCompile { + scenario: string; + subScenario: string; + buildKind?: BuildKind; // Should be defined for tsc --b + fs: () => vfs.FileSystem; + commandLineArgs: readonly string[]; + + modifyFs?: (fs: vfs.FileSystem) => void; + baselineSourceMap?: boolean; + baselineReadFileCalls?: boolean; + } + + export function tscCompile(input: TscCompile) { + const baseFs = input.fs(); + const fs = baseFs.shadow(); + const { + scenario, subScenario, buildKind, + commandLineArgs, modifyFs, + baselineSourceMap, baselineReadFileCalls + } = input; + if (modifyFs) modifyFs(fs); + + // Create system + const sys = new fakes.System(fs, { executingFilePath: "/lib/tsc" }) as TscCompileSystem; + const writtenFiles = sys.writtenFiles = createMap(); + const originalWriteFile = sys.writeFile; + sys.writeFile = (fileName, content, writeByteOrderMark) => { + assert.isFalse(writtenFiles.has(fileName)); + writtenFiles.set(fileName, true); + return originalWriteFile.call(sys, fileName, content, writeByteOrderMark); + }; + const actualReadFileMap: MapLike = {}; + const originalReadFile = sys.readFile; + sys.readFile = path => { + // Dont record libs + if (path.startsWith("/src/")) { + actualReadFileMap[path] = (getProperty(actualReadFileMap, path) || 0) + 1; + } + return originalReadFile.call(sys, path); + }; + + sys.write(`${sys.getExecutingFilePath()} ${commandLineArgs.join(" ")}\n`); + sys.exit = exitCode => sys.exitCode = exitCode; + executeCommandLine(sys, commandLineArgs); + sys.write(`exitCode:: ${sys.exitCode}\n`); + if (baselineReadFileCalls) { + sys.write(`readFiles:: ${JSON.stringify(actualReadFileMap, /*replacer*/ undefined, " ")} `); + } + if (baselineSourceMap) generateSourceMapBaselineFiles(fs, mapDefinedIterator(writtenFiles.keys(), f => f.endsWith(".map") ? f : undefined)); + + // Baseline the errors + fs.writeFileSync(`/lib/${buildKind || BuildKind.Initial}Output.txt`, sys.output.join("")); + fs.makeReadonly(); + + sys.baseLine = () => { + const patch = fs.diff(baseFs, { includeChangedFileWithSameContent: true }); + // eslint-disable-next-line no-null/no-null + Harness.Baseline.runBaseline(`${isBuild(commandLineArgs) ? "tsbuild" : "tsc"}/${scenario}/${buildKind || BuildKind.Initial}/${subScenario.split(" ").join("-")}.js`, patch ? vfs.formatPatch(patch) : null); + }; + return sys; + } + + export function verifyTscBaseline(sys: () => TscCompileSystem) { + it(`Generates files matching the baseline`, () => { + sys().baseLine(); + }); + } + + export function verifyTsc(input: TscCompile) { + describe(input.scenario, () => { + describe(input.subScenario, () => { + let sys: TscCompileSystem; + before(() => { + sys = tscCompile({ + ...input, + fs: () => getFsWithTime(input.fs()).fs.makeReadonly() + }); + }); + after(() => { + sys = undefined!; + }); + verifyTscBaseline(() => sys); + }); + }); + } +} diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/modules-and-globals-mixed-in-amd.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/modules-and-globals-mixed-in-amd.js index 87ace04e448a9..156e26088e045 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/modules-and-globals-mixed-in-amd.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/modules-and-globals-mixed-in-amd.js @@ -1,3 +1,22 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/app --verbose +12:04:00 AM - Projects in this build: + * src/lib/tsconfig.json + * src/app/tsconfig.json + +12:04:00 AM - Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' + +12:04:00 AM - Building project '/src/lib/tsconfig.json'... + +12:04:00 AM - Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed + +12:04:00 AM - Updating output of project '/src/app/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/app/tsconfig.json'... + +exitCode:: 0 + + //// [/src/app/module.js] var myGlob = 20; define("file1", ["require", "exports"], function (require, exports) { diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js index 2b4e0a0a83817..e09e87242a1f9 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js @@ -1,3 +1,22 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/app --verbose +12:04:00 AM - Projects in this build: + * src/lib/tsconfig.json + * src/app/tsconfig.json + +12:04:00 AM - Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' + +12:04:00 AM - Building project '/src/lib/tsconfig.json'... + +12:04:00 AM - Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed + +12:04:00 AM - Updating output of project '/src/app/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/app/tsconfig.json'... + +exitCode:: 0 + + //// [/src/app/module.js] var __read = (this && this.__read) || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/multiple-prologues-in-all-projects.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/multiple-prologues-in-all-projects.js index f7252e6dcbc70..93a7cbf732608 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/multiple-prologues-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/multiple-prologues-in-all-projects.js @@ -1,3 +1,22 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/app --verbose +12:04:00 AM - Projects in this build: + * src/lib/tsconfig.json + * src/app/tsconfig.json + +12:04:00 AM - Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' + +12:04:00 AM - Building project '/src/lib/tsconfig.json'... + +12:04:00 AM - Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed + +12:04:00 AM - Updating output of project '/src/app/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/app/tsconfig.json'... + +exitCode:: 0 + + //// [/src/app/module.js] "use strict"; "myPrologue"; diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/shebang-in-all-projects.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/shebang-in-all-projects.js index 3cf10ffbe1968..e3daf15bcacd3 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/shebang-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/shebang-in-all-projects.js @@ -1,3 +1,22 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/app --verbose +12:04:00 AM - Projects in this build: + * src/lib/tsconfig.json + * src/app/tsconfig.json + +12:04:00 AM - Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' + +12:04:00 AM - Building project '/src/lib/tsconfig.json'... + +12:04:00 AM - Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed + +12:04:00 AM - Updating output of project '/src/app/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/app/tsconfig.json'... + +exitCode:: 0 + + //// [/src/app/module.js] #!someshebang lib file0 var myGlob = 20; diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/stripInternal.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/stripInternal.js index 4de45c6d0ecf5..6f6ca38435a80 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/stripInternal.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/stripInternal.js @@ -1,3 +1,22 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/app --verbose +12:04:00 AM - Projects in this build: + * src/lib/tsconfig.json + * src/app/tsconfig.json + +12:04:00 AM - Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' + +12:04:00 AM - Building project '/src/lib/tsconfig.json'... + +12:04:00 AM - Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed + +12:04:00 AM - Updating output of project '/src/app/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/app/tsconfig.json'... + +exitCode:: 0 + + //// [/src/app/module.js] /*@internal*/ var myGlob = 20; define("file1", ["require", "exports"], function (require, exports) { diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/triple-slash-refs-in-all-projects.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/triple-slash-refs-in-all-projects.js index 479ea723921a4..b07879caae0ce 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/triple-slash-refs-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/triple-slash-refs-in-all-projects.js @@ -1,3 +1,22 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/app --verbose +12:04:00 AM - Projects in this build: + * src/lib/tsconfig.json + * src/app/tsconfig.json + +12:04:00 AM - Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' + +12:04:00 AM - Building project '/src/lib/tsconfig.json'... + +12:04:00 AM - Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed + +12:04:00 AM - Updating output of project '/src/app/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/app/tsconfig.json'... + +exitCode:: 0 + + //// [/src/app/module.js] /// var file0Const = new libfile0(); diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js index 54c0b8fe21e20..27bdfed74214d 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js @@ -1,3 +1,22 @@ +//// [/lib/incremental-headers-change-without-dts-changesOutput.txt] +/lib/tsc --b /src/app --verbose +12:08:00 AM - Projects in this build: + * src/lib/tsconfig.json + * src/app/tsconfig.json + +12:08:00 AM - Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' + +12:08:00 AM - Building project '/src/lib/tsconfig.json'... + +12:08:00 AM - Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed + +12:08:00 AM - Updating output of project '/src/app/tsconfig.json'... + +12:08:00 AM - Updating unchanged output timestamps of project '/src/app/tsconfig.json'... + +exitCode:: 0 + + //// [/src/app/module.js] var __read = (this && this.__read) || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/multiple-prologues-in-all-projects.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/multiple-prologues-in-all-projects.js index ad401641be8a3..ae8b69e86b920 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/multiple-prologues-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/multiple-prologues-in-all-projects.js @@ -1,3 +1,22 @@ +//// [/lib/incremental-headers-change-without-dts-changesOutput.txt] +/lib/tsc --b /src/app --verbose +12:08:00 AM - Projects in this build: + * src/lib/tsconfig.json + * src/app/tsconfig.json + +12:08:00 AM - Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' + +12:08:00 AM - Building project '/src/lib/tsconfig.json'... + +12:08:00 AM - Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed + +12:08:00 AM - Updating output of project '/src/app/tsconfig.json'... + +12:08:00 AM - Updating unchanged output timestamps of project '/src/app/tsconfig.json'... + +exitCode:: 0 + + //// [/src/app/module.d.ts.map] {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../lib/file0.ts","../lib/file1.ts","../lib/file2.ts","../lib/global.ts","file3.ts","file4.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,KAAK,CAAC;;ICAlB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;;ICApB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;ACApB,QAAA,MAAM,WAAW,KAAK,CAAC;;ICAvB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;ACApB,QAAA,MAAM,KAAK,KAAK,CAAC"} diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/stripInternal.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/stripInternal.js index 218681bea8ffd..544b25a544dac 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/stripInternal.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/stripInternal.js @@ -1,3 +1,20 @@ +//// [/lib/incremental-headers-change-without-dts-changesOutput.txt] +/lib/tsc --b /src/app --verbose +12:08:00 AM - Projects in this build: + * src/lib/tsconfig.json + * src/app/tsconfig.json + +12:08:00 AM - Project 'src/lib/tsconfig.json' is out of date because oldest output 'src/lib/module.js' is older than newest input 'src/lib/file1.ts' + +12:08:00 AM - Building project '/src/lib/tsconfig.json'... + +12:08:00 AM - Project 'src/app/tsconfig.json' is out of date because output of its dependency 'src/lib' has changed + +12:08:00 AM - Updating output of project '/src/app/tsconfig.json'... + +exitCode:: 0 + + //// [/src/app/module.d.ts] declare module "file1" { export class normalC { diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/modules-and-globals-mixed-in-amd.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/modules-and-globals-mixed-in-amd.js similarity index 95% rename from tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/modules-and-globals-mixed-in-amd.js rename to tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/modules-and-globals-mixed-in-amd.js index 4106601d1e374..1e6b3c5f9d3bd 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/modules-and-globals-mixed-in-amd.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/modules-and-globals-mixed-in-amd.js @@ -1,3 +1,20 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/app --verbose +12:01:00 AM - Projects in this build: + * src/lib/tsconfig.json + * src/app/tsconfig.json + +12:01:00 AM - Project 'src/lib/tsconfig.json' is out of date because output file 'src/lib/module.js' does not exist + +12:01:00 AM - Building project '/src/lib/tsconfig.json'... + +12:01:00 AM - Project 'src/app/tsconfig.json' is out of date because output file 'src/app/module.js' does not exist + +12:01:00 AM - Building project '/src/app/tsconfig.json'... + +exitCode:: 0 + + //// [/src/app/module.d.ts] declare const myGlob = 20; declare module "file1" { diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/multiple-emitHelpers-in-all-projects.js similarity index 96% rename from tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/multiple-emitHelpers-in-all-projects.js rename to tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/multiple-emitHelpers-in-all-projects.js index eeb57b9cf9e56..4bef255a862de 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/multiple-emitHelpers-in-all-projects.js @@ -1,3 +1,20 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/app --verbose +12:01:00 AM - Projects in this build: + * src/lib/tsconfig.json + * src/app/tsconfig.json + +12:01:00 AM - Project 'src/lib/tsconfig.json' is out of date because output file 'src/lib/module.js' does not exist + +12:01:00 AM - Building project '/src/lib/tsconfig.json'... + +12:01:00 AM - Project 'src/app/tsconfig.json' is out of date because output file 'src/app/module.js' does not exist + +12:01:00 AM - Building project '/src/app/tsconfig.json'... + +exitCode:: 0 + + //// [/src/app/file3.ts] export const z = 30; import { x } from "file1";function forappfile3Rest() { diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/multiple-prologues-in-all-projects.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/multiple-prologues-in-all-projects.js similarity index 95% rename from tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/multiple-prologues-in-all-projects.js rename to tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/multiple-prologues-in-all-projects.js index 4835019b1f977..0a28b0c50032b 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/multiple-prologues-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/multiple-prologues-in-all-projects.js @@ -1,3 +1,20 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/app --verbose +12:01:00 AM - Projects in this build: + * src/lib/tsconfig.json + * src/app/tsconfig.json + +12:01:00 AM - Project 'src/lib/tsconfig.json' is out of date because output file 'src/lib/module.js' does not exist + +12:01:00 AM - Building project '/src/lib/tsconfig.json'... + +12:01:00 AM - Project 'src/app/tsconfig.json' is out of date because output file 'src/app/module.js' does not exist + +12:01:00 AM - Building project '/src/app/tsconfig.json'... + +exitCode:: 0 + + //// [/src/app/file3.ts] "myPrologue" export const z = 30; diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/shebang-in-all-projects.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/shebang-in-all-projects.js similarity index 95% rename from tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/shebang-in-all-projects.js rename to tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/shebang-in-all-projects.js index eb0407a5b1766..16c2c89eab939 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/shebang-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/shebang-in-all-projects.js @@ -1,3 +1,20 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/app --verbose +12:01:00 AM - Projects in this build: + * src/lib/tsconfig.json + * src/app/tsconfig.json + +12:01:00 AM - Project 'src/lib/tsconfig.json' is out of date because output file 'src/lib/module.js' does not exist + +12:01:00 AM - Building project '/src/lib/tsconfig.json'... + +12:01:00 AM - Project 'src/app/tsconfig.json' is out of date because output file 'src/app/module.js' does not exist + +12:01:00 AM - Building project '/src/app/tsconfig.json'... + +exitCode:: 0 + + //// [/src/app/file3.ts] #!someshebang app file3 export const z = 30; diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/stripInternal.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/stripInternal.js similarity index 97% rename from tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/stripInternal.js rename to tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/stripInternal.js index dcac12cae9f3b..2d2bd9809d628 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/stripInternal.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/stripInternal.js @@ -1,3 +1,20 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/app --verbose +12:01:00 AM - Projects in this build: + * src/lib/tsconfig.json + * src/app/tsconfig.json + +12:01:00 AM - Project 'src/lib/tsconfig.json' is out of date because output file 'src/lib/module.js' does not exist + +12:01:00 AM - Building project '/src/lib/tsconfig.json'... + +12:01:00 AM - Project 'src/app/tsconfig.json' is out of date because output file 'src/app/module.js' does not exist + +12:01:00 AM - Building project '/src/app/tsconfig.json'... + +exitCode:: 0 + + //// [/src/app/module.d.ts] declare module "file1" { export const x = 10; diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/triple-slash-refs-in-all-projects.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/triple-slash-refs-in-all-projects.js similarity index 95% rename from tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/triple-slash-refs-in-all-projects.js rename to tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/triple-slash-refs-in-all-projects.js index 30f8da909cdc2..50259e2c93d3a 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/triple-slash-refs-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/triple-slash-refs-in-all-projects.js @@ -1,3 +1,20 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/app --verbose +12:01:00 AM - Projects in this build: + * src/lib/tsconfig.json + * src/app/tsconfig.json + +12:01:00 AM - Project 'src/lib/tsconfig.json' is out of date because output file 'src/lib/module.js' does not exist + +12:01:00 AM - Building project '/src/lib/tsconfig.json'... + +12:01:00 AM - Project 'src/app/tsconfig.json' is out of date because output file 'src/app/module.js' does not exist + +12:01:00 AM - Building project '/src/app/tsconfig.json'... + +exitCode:: 0 + + //// [/src/app/file4.ts] /// const file4Const = new appfile4(); diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/when-the-module-resolution-finds-original-source-file.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/when-the-module-resolution-finds-original-source-file.js similarity index 95% rename from tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/when-the-module-resolution-finds-original-source-file.js rename to tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/when-the-module-resolution-finds-original-source-file.js index 3611d35556340..9bc7340630f53 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-Build/when-the-module-resolution-finds-original-source-file.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/when-the-module-resolution-finds-original-source-file.js @@ -1,3 +1,20 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc -b /src/app --verbose +12:00:00 AM - Projects in this build: + * src/lib/tsconfig.json + * src/app/tsconfig.json + +12:00:00 AM - Project 'src/lib/tsconfig.json' is out of date because output file 'src/module.js' does not exist + +12:00:00 AM - Building project '/src/lib/tsconfig.json'... + +12:00:00 AM - Project 'src/app/tsconfig.json' is out of date because output file 'src/app/module.js' does not exist + +12:00:00 AM - Building project '/src/app/tsconfig.json'... + +exitCode:: 0 + + //// [/src/app/file3.ts] export const z = 30; import { x } from "lib/file1"; diff --git a/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-changes/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js b/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-changes/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js index f4675cfcd1554..d2d70c1b8bef2 100644 --- a/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-changes/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js +++ b/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-changes/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js @@ -1,3 +1,15 @@ +//// [/lib/incremental-declaration-changesOutput.txt] +/lib/tsc --b /src --verbose +12:04:00 AM - Projects in this build: + * src/tsconfig.json + +12:04:00 AM - Project 'src/tsconfig.json' is out of date because oldest output 'src/lib/a.d.ts' is older than newest input 'src/src/a.ts' + +12:04:00 AM - Building project '/src/tsconfig.json'... + +exitCode:: 0 + + //// [/src/lib/a.d.ts] import { B } from "./b"; export interface A { diff --git a/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-changes/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js b/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-changes/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js index a1297732a8862..6e6f2bb1805c5 100644 --- a/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-changes/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js +++ b/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-changes/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js @@ -1,3 +1,15 @@ +//// [/lib/incremental-declaration-changesOutput.txt] +/lib/tsc --b /src --verbose +12:04:00 AM - Projects in this build: + * src/tsconfig.json + +12:04:00 AM - Project 'src/tsconfig.json' is out of date because oldest output 'src/lib/a.d.ts' is older than newest input 'src/src/a.ts' + +12:04:00 AM - Building project '/src/tsconfig.json'... + +exitCode:: 0 + + //// [/src/lib/a.d.ts] import { B } from "./b"; export interface A { diff --git a/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-changes/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js b/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-changes/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js index c5eb746e843d3..8bcb33bced78b 100644 --- a/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-changes/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js +++ b/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-changes/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js @@ -1,3 +1,15 @@ +//// [/lib/incremental-declaration-changesOutput.txt] +/lib/tsc --b /src --verbose +12:04:00 AM - Projects in this build: + * src/tsconfig.json + +12:04:00 AM - Project 'src/tsconfig.json' is out of date because oldest output 'src/lib/a.d.ts' is older than newest input 'src/src/a.ts' + +12:04:00 AM - Building project '/src/tsconfig.json'... + +exitCode:: 0 + + //// [/src/lib/a.d.ts] export declare class B { prop: string; diff --git a/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-doesnt-change/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js b/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-doesnt-change/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js index 0eb46f39556d5..bdfcb1e826f33 100644 --- a/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-doesnt-change/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js +++ b/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-doesnt-change/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js @@ -1,3 +1,17 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src --verbose +12:08:00 AM - Projects in this build: + * src/tsconfig.json + +12:08:00 AM - Project 'src/tsconfig.json' is out of date because oldest output 'src/lib/a.d.ts' is older than newest input 'src/src/a.ts' + +12:08:00 AM - Building project '/src/tsconfig.json'... + +12:08:00 AM - Updating unchanged output timestamps of project '/src/tsconfig.json'... + +exitCode:: 0 + + //// [/src/lib/a.d.ts] file written with same contents //// [/src/lib/a.d.ts.map] {"version":3,"file":"a.d.ts","sourceRoot":"","sources":["../src/a.ts"],"names":[],"mappings":"AAAA,qBAAa,CAAC;IAAG,IAAI,SAAW;CAAE;AAGlC,MAAM,WAAW,CAAC;IAChB,CAAC,EAAE,CAAC,CAAC;CACN"} diff --git a/tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-Build/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js b/tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-build/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js similarity index 92% rename from tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-Build/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js rename to tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-build/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js index 838bf28950f66..38d8974e90031 100644 --- a/tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-Build/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js +++ b/tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-build/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js @@ -1,3 +1,15 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src --verbose +12:01:00 AM - Projects in this build: + * src/tsconfig.json + +12:01:00 AM - Project 'src/tsconfig.json' is out of date because output file 'src/lib/a.d.ts' does not exist + +12:01:00 AM - Building project '/src/tsconfig.json'... + +exitCode:: 0 + + //// [/src/lib/a.d.ts] import { B } from "./b"; export interface A { diff --git a/tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-Build/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js b/tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-build/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js similarity index 93% rename from tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-Build/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js rename to tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-build/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js index d07b0914c3251..6f2bc2632123b 100644 --- a/tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-Build/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js +++ b/tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-build/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js @@ -1,3 +1,15 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src --verbose +12:01:00 AM - Projects in this build: + * src/tsconfig.json + +12:01:00 AM - Project 'src/tsconfig.json' is out of date because output file 'src/lib/a.d.ts' does not exist + +12:01:00 AM - Building project '/src/tsconfig.json'... + +exitCode:: 0 + + //// [/src/lib/a.d.ts] import { B } from "./b"; export interface A { diff --git a/tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-Build/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js b/tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-build/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js similarity index 91% rename from tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-Build/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js rename to tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-build/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js index 86f7dc6e8bc8b..aabaf41d53bb4 100644 --- a/tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-Build/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js +++ b/tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-build/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js @@ -1,3 +1,15 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src --verbose +12:01:00 AM - Projects in this build: + * src/tsconfig.json + +12:01:00 AM - Project 'src/tsconfig.json' is out of date because output file 'src/lib/a.d.ts' does not exist + +12:01:00 AM - Building project '/src/tsconfig.json'... + +exitCode:: 0 + + //// [/src/lib/a.d.ts] export declare class B { prop: string; diff --git a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/incremental-declaration-changes/inferred-type-from-transitive-module-with-isolatedModules.js b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/incremental-declaration-changes/inferred-type-from-transitive-module-with-isolatedModules.js index f8dfdc7e146ca..a95215cf77fa4 100644 --- a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/incremental-declaration-changes/inferred-type-from-transitive-module-with-isolatedModules.js +++ b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/incremental-declaration-changes/inferred-type-from-transitive-module-with-isolatedModules.js @@ -1,3 +1,17 @@ +//// [/lib/incremental-declaration-changesOutput.txt] +/lib/tsc --b /src --verbose +12:04:00 AM - Projects in this build: + * src/tsconfig.json + +12:04:00 AM - Project 'src/tsconfig.json' is out of date because oldest output 'src/obj/bar.js' is older than newest input 'src/bar.ts' + +12:04:00 AM - Building project '/src/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/tsconfig.json'... + +exitCode:: 0 + + //// [/src/bar.ts] interface RawAction { (...args: any[]): Promise | void; diff --git a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/incremental-declaration-changes/inferred-type-from-transitive-module.js b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/incremental-declaration-changes/inferred-type-from-transitive-module.js index 556f32082f5cb..5cd9097a2008c 100644 --- a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/incremental-declaration-changes/inferred-type-from-transitive-module.js +++ b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/incremental-declaration-changes/inferred-type-from-transitive-module.js @@ -1,3 +1,17 @@ +//// [/lib/incremental-declaration-changesOutput.txt] +/lib/tsc --b /src --verbose +12:04:00 AM - Projects in this build: + * src/tsconfig.json + +12:04:00 AM - Project 'src/tsconfig.json' is out of date because oldest output 'src/obj/bar.js' is older than newest input 'src/bar.ts' + +12:04:00 AM - Building project '/src/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/tsconfig.json'... + +exitCode:: 0 + + //// [/src/bar.ts] interface RawAction { (...args: any[]): Promise | void; diff --git a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/incremental-declaration-changes/reports-errors-in-files-affected-by-change-in-signature-with-isolatedModules.js b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/incremental-declaration-changes/reports-errors-in-files-affected-by-change-in-signature-with-isolatedModules.js new file mode 100644 index 0000000000000..a00425b57a833 --- /dev/null +++ b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/incremental-declaration-changes/reports-errors-in-files-affected-by-change-in-signature-with-isolatedModules.js @@ -0,0 +1,24 @@ +//// [/lib/incremental-declaration-changesOutput.txt] +/lib/tsc --b /src --verbose +12:04:00 AM - Projects in this build: + * src/tsconfig.json + +12:04:00 AM - Project 'src/tsconfig.json' is out of date because oldest output 'src/obj/bar.js' is older than newest input 'src/bar.ts' + +12:04:00 AM - Building project '/src/tsconfig.json'... + +src/lazyIndex.ts(4,5): error TS2554: Expected 0 arguments, but got 1. +exitCode:: 1 + + +//// [/src/bar.ts] +interface RawAction { + (...args: any[]): Promise | void; +} +interface ActionFactory { + (target: T): T; +} +declare function foo(): ActionFactory; +export default foo()(function foobar(): void { +}); + diff --git a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-Build/inferred-type-from-transitive-module-with-isolatedModules.js b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/inferred-type-from-transitive-module-with-isolatedModules.js similarity index 93% rename from tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-Build/inferred-type-from-transitive-module-with-isolatedModules.js rename to tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/inferred-type-from-transitive-module-with-isolatedModules.js index 568116485a416..93a7e2964952b 100644 --- a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-Build/inferred-type-from-transitive-module-with-isolatedModules.js +++ b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/inferred-type-from-transitive-module-with-isolatedModules.js @@ -1,3 +1,15 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src --verbose +12:01:00 AM - Projects in this build: + * src/tsconfig.json + +12:01:00 AM - Project 'src/tsconfig.json' is out of date because output file 'src/obj/bar.js' does not exist + +12:01:00 AM - Building project '/src/tsconfig.json'... + +exitCode:: 0 + + //// [/src/obj/bar.d.ts] declare const _default: (param: string) => void; export default _default; diff --git a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-Build/inferred-type-from-transitive-module.js b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/inferred-type-from-transitive-module.js similarity index 93% rename from tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-Build/inferred-type-from-transitive-module.js rename to tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/inferred-type-from-transitive-module.js index a04669bd97159..45a284dc09cba 100644 --- a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-Build/inferred-type-from-transitive-module.js +++ b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/inferred-type-from-transitive-module.js @@ -1,3 +1,15 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src --verbose +12:01:00 AM - Projects in this build: + * src/tsconfig.json + +12:01:00 AM - Project 'src/tsconfig.json' is out of date because output file 'src/obj/bar.js' does not exist + +12:01:00 AM - Building project '/src/tsconfig.json'... + +exitCode:: 0 + + //// [/src/obj/bar.d.ts] declare const _default: (param: string) => void; export default _default; diff --git a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/reports-errors-in-files-affected-by-change-in-signature-with-isolatedModules.js b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/reports-errors-in-files-affected-by-change-in-signature-with-isolatedModules.js new file mode 100644 index 0000000000000..39ad2d40a31e2 --- /dev/null +++ b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-build/reports-errors-in-files-affected-by-change-in-signature-with-isolatedModules.js @@ -0,0 +1,163 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src --verbose +12:01:00 AM - Projects in this build: + * src/tsconfig.json + +12:01:00 AM - Project 'src/tsconfig.json' is out of date because output file 'src/obj/bar.js' does not exist + +12:01:00 AM - Building project '/src/tsconfig.json'... + +exitCode:: 0 + + +//// [/src/lazyIndex.ts] +export { default as bar } from './bar'; + +import { default as bar } from './bar'; +bar("hello"); + +//// [/src/obj/bar.d.ts] +declare const _default: (param: string) => void; +export default _default; + + +//// [/src/obj/bar.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = foo()(function foobar(param) { +}); + + +//// [/src/obj/bundling.d.ts] +export declare class LazyModule { + private importCallback; + constructor(importCallback: () => Promise); +} +export declare class LazyAction any, TModule> { + constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction); +} + + +//// [/src/obj/bundling.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var LazyModule = /** @class */ (function () { + function LazyModule(importCallback) { + this.importCallback = importCallback; + } + return LazyModule; +}()); +exports.LazyModule = LazyModule; +var LazyAction = /** @class */ (function () { + function LazyAction(_lazyModule, _getter) { + } + return LazyAction; +}()); +exports.LazyAction = LazyAction; + + +//// [/src/obj/index.d.ts] +import { LazyAction } from './bundling'; +export declare const lazyBar: LazyAction<(param: string) => void, typeof import("./lazyIndex")>; + + +//// [/src/obj/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var bundling_1 = require("./bundling"); +var lazyModule = new bundling_1.LazyModule(function () { + return Promise.resolve().then(function () { return require('./lazyIndex'); }); +}); +exports.lazyBar = new bundling_1.LazyAction(lazyModule, function (m) { return m.bar; }); + + +//// [/src/obj/lazyIndex.d.ts] +export { default as bar } from './bar'; + + +//// [/src/obj/lazyIndex.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var bar_1 = require("./bar"); +exports.bar = bar_1.default; +var bar_2 = require("./bar"); +bar_2.default("hello"); + + +//// [/src/obj/tsconfig.tsbuildinfo] +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \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 {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \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 {}\ndeclare const console: { log(msg: any): void; };" + }, + "../bar.ts": { + "version": "5936740878-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(param: string): void {\r\n});", + "signature": "11191036521-declare const _default: (param: string) => void;\r\nexport default _default;\r\n" + }, + "../bundling.ts": { + "version": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n", + "signature": "-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n" + }, + "../global.d.ts": { + "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", + "signature": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}" + }, + "../lazyindex.ts": { + "version": "3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");", + "signature": "-6224542381-export { default as bar } from './bar';\r\n" + }, + "../index.ts": { + "version": "-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);", + "signature": "18468008756-import { LazyAction } from './bundling';\r\nexport declare const lazyBar: LazyAction<(param: string) => void, typeof import(\"./lazyIndex\")>;\r\n" + } + }, + "options": { + "target": 1, + "declaration": true, + "outDir": "./", + "incremental": true, + "isolatedModules": true, + "configFilePath": "../tsconfig.json" + }, + "referencedMap": { + "../index.ts": [ + "../bundling.ts", + "../lazyindex.ts" + ], + "../lazyindex.ts": [ + "../bar.ts" + ] + }, + "exportedModulesMap": { + "../index.ts": [ + "../bundling.ts", + "../lazyindex.ts" + ], + "../lazyindex.ts": [ + "../bar.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "../bar.ts", + "../bundling.ts", + "../global.d.ts", + "../index.ts", + "../lazyindex.ts" + ] + }, + "version": "FakeTSVersion" +} + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "target": "es5", + "declaration": true, + "outDir": "obj", + "incremental": true, "isolatedModules": true + } +} + diff --git a/tests/baselines/reference/tsbuild/lateBoundSymbol/incremental-declaration-doesnt-change/interface-is-merged-and-contains-late-bound-member.js b/tests/baselines/reference/tsbuild/lateBoundSymbol/incremental-declaration-doesnt-change/interface-is-merged-and-contains-late-bound-member.js index bdd697399683f..ffa834ba4679b 100644 --- a/tests/baselines/reference/tsbuild/lateBoundSymbol/incremental-declaration-doesnt-change/interface-is-merged-and-contains-late-bound-member.js +++ b/tests/baselines/reference/tsbuild/lateBoundSymbol/incremental-declaration-doesnt-change/interface-is-merged-and-contains-late-bound-member.js @@ -1,3 +1,17 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/tsconfig.json --verbose +12:04:00 AM - Projects in this build: + * src/tsconfig.json + +12:04:00 AM - Project 'src/tsconfig.json' is out of date because oldest output 'src/src/hkt.js' is older than newest input 'src/src/main.ts' + +12:04:00 AM - Building project '/src/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/tsconfig.json'... + +exitCode:: 0 + + //// [/src/src/main.js] "use strict"; exports.__esModule = true; diff --git a/tests/baselines/reference/tsbuild/lateBoundSymbol/initial-Build/interface-is-merged-and-contains-late-bound-member.js b/tests/baselines/reference/tsbuild/lateBoundSymbol/initial-build/interface-is-merged-and-contains-late-bound-member.js similarity index 88% rename from tests/baselines/reference/tsbuild/lateBoundSymbol/initial-Build/interface-is-merged-and-contains-late-bound-member.js rename to tests/baselines/reference/tsbuild/lateBoundSymbol/initial-build/interface-is-merged-and-contains-late-bound-member.js index 949eb773431c5..86d36097454b4 100644 --- a/tests/baselines/reference/tsbuild/lateBoundSymbol/initial-Build/interface-is-merged-and-contains-late-bound-member.js +++ b/tests/baselines/reference/tsbuild/lateBoundSymbol/initial-build/interface-is-merged-and-contains-late-bound-member.js @@ -1,3 +1,15 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/tsconfig.json --verbose +12:01:00 AM - Projects in this build: + * src/tsconfig.json + +12:01:00 AM - Project 'src/tsconfig.json' is out of date because output file 'src/src/hkt.js' does not exist + +12:01:00 AM - Building project '/src/tsconfig.json'... + +exitCode:: 0 + + //// [/src/src/hkt.js] "use strict"; exports.__esModule = true; diff --git a/tests/baselines/reference/tsbuild/moduleSpecifiers/initial-Build/synthesized-module-specifiers-resolve-correctly.js b/tests/baselines/reference/tsbuild/moduleSpecifiers/initial-build/synthesized-module-specifiers-resolve-correctly.js similarity index 73% rename from tests/baselines/reference/tsbuild/moduleSpecifiers/initial-Build/synthesized-module-specifiers-resolve-correctly.js rename to tests/baselines/reference/tsbuild/moduleSpecifiers/initial-build/synthesized-module-specifiers-resolve-correctly.js index cd12638d637c9..fb5eae55d7c39 100644 --- a/tests/baselines/reference/tsbuild/moduleSpecifiers/initial-Build/synthesized-module-specifiers-resolve-correctly.js +++ b/tests/baselines/reference/tsbuild/moduleSpecifiers/initial-build/synthesized-module-specifiers-resolve-correctly.js @@ -1,23 +1,47 @@ -//// [/lib/src/common/nominal.d.ts] +//// [/lib/initial-buildOutput.txt] +/lib/tsc -b /src --verbose +12:00:00 AM - Projects in this build: + * src/solution/common/tsconfig.json + * src/solution/sub-project/tsconfig.json + * src/solution/sub-project-2/tsconfig.json + * src/solution/tsconfig.json + * src/tsconfig.json + +12:00:00 AM - Project 'src/solution/common/tsconfig.json' is out of date because output file 'src/lib/solution/common/nominal.js' does not exist + +12:00:00 AM - Building project '/src/solution/common/tsconfig.json'... + +12:00:00 AM - Project 'src/solution/sub-project/tsconfig.json' is out of date because output file 'src/lib/solution/sub-project/index.js' does not exist + +12:00:00 AM - Building project '/src/solution/sub-project/tsconfig.json'... + +12:00:00 AM - Project 'src/solution/sub-project-2/tsconfig.json' is out of date because output file 'src/lib/solution/sub-project-2/index.js' does not exist + +12:00:00 AM - Building project '/src/solution/sub-project-2/tsconfig.json'... + +exitCode:: 0 + + +//// [/src/lib/solution/common/nominal.d.ts] export declare type Nominal = T & { [Symbol.species]: Name; }; -//// [/lib/src/common/nominal.js] +//// [/src/lib/solution/common/nominal.js] "use strict"; exports.__esModule = true; -//// [/lib/src/common/tsconfig.tsbuildinfo] +//// [/src/lib/solution/common/tsconfig.tsbuildinfo] { "program": { "fileInfos": { - "../../lib.d.ts": { + "../../../../lib/lib.d.ts": { "version": "-32082413277-/// \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 {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n", "signature": "-32082413277-/// \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 {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n" }, - "../../../src/common/nominal.ts": { + "../../../solution/common/nominal.ts": { "version": "-24498031910-export declare type Nominal = T & {\n [Symbol.species]: Name;\n};\n", "signature": "-9513375615-export declare type Nominal = T & {\r\n [Symbol.species]: Name;\r\n};\r\n" } @@ -27,41 +51,41 @@ exports.__esModule = true; "rootDir": "../../..", "outDir": "../..", "composite": true, - "configFilePath": "../../../src/common/tsconfig.json" + "configFilePath": "../../../solution/common/tsconfig.json" }, "referencedMap": {}, "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ - "../../../src/common/nominal.ts", - "../../lib.d.ts" + "../../../../lib/lib.d.ts", + "../../../solution/common/nominal.ts" ] }, "version": "FakeTSVersion" } -//// [/lib/src/sub-project/index.d.ts] +//// [/src/lib/solution/sub-project/index.d.ts] import { Nominal } from '../common/nominal'; export declare type MyNominal = Nominal; -//// [/lib/src/sub-project/index.js] +//// [/src/lib/solution/sub-project/index.js] "use strict"; exports.__esModule = true; -//// [/lib/src/sub-project/tsconfig.tsbuildinfo] +//// [/src/lib/solution/sub-project/tsconfig.tsbuildinfo] { "program": { "fileInfos": { - "../../lib.d.ts": { + "../../../../lib/lib.d.ts": { "version": "-32082413277-/// \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 {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n", "signature": "-32082413277-/// \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 {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n" }, - "../../../src/common/nominal.ts": { + "../../../solution/common/nominal.ts": { "version": "-9513375615-export declare type Nominal = T & {\r\n [Symbol.species]: Name;\r\n};\r\n", "signature": "-9513375615-export declare type Nominal = T & {\r\n [Symbol.species]: Name;\r\n};\r\n" }, - "../../../src/sub-project/index.ts": { + "../../../solution/sub-project/index.ts": { "version": "-22894055505-import { Nominal } from '../common/nominal';\n\nexport type MyNominal = Nominal;\n", "signature": "-21416888433-import { Nominal } from '../common/nominal';\r\nexport declare type MyNominal = Nominal;\r\n" } @@ -71,28 +95,28 @@ exports.__esModule = true; "rootDir": "../../..", "outDir": "../..", "composite": true, - "configFilePath": "../../../src/sub-project/tsconfig.json" + "configFilePath": "../../../solution/sub-project/tsconfig.json" }, "referencedMap": { - "../../../src/sub-project/index.ts": [ + "../../../solution/sub-project/index.ts": [ "../common/nominal.d.ts" ] }, "exportedModulesMap": { - "../../../src/sub-project/index.ts": [ + "../../../solution/sub-project/index.ts": [ "../common/nominal.d.ts" ] }, "semanticDiagnosticsPerFile": [ - "../../../src/common/nominal.ts", - "../../../src/sub-project/index.ts", - "../../lib.d.ts" + "../../../../lib/lib.d.ts", + "../../../solution/common/nominal.ts", + "../../../solution/sub-project/index.ts" ] }, "version": "FakeTSVersion" } -//// [/lib/src/sub-project-2/index.d.ts] +//// [/src/lib/solution/sub-project-2/index.d.ts] declare const variable: { key: import("../common/nominal").Nominal; }; @@ -100,7 +124,7 @@ export declare function getVar(): keyof typeof variable; export {}; -//// [/lib/src/sub-project-2/index.js] +//// [/src/lib/solution/sub-project-2/index.js] "use strict"; exports.__esModule = true; var variable = { @@ -112,23 +136,23 @@ function getVar() { exports.getVar = getVar; -//// [/lib/src/sub-project-2/tsconfig.tsbuildinfo] +//// [/src/lib/solution/sub-project-2/tsconfig.tsbuildinfo] { "program": { "fileInfos": { - "../../lib.d.ts": { + "../../../../lib/lib.d.ts": { "version": "-32082413277-/// \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 {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n", "signature": "-32082413277-/// \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 {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n" }, - "../../../src/common/nominal.ts": { + "../../../solution/common/nominal.ts": { "version": "-9513375615-export declare type Nominal = T & {\r\n [Symbol.species]: Name;\r\n};\r\n", "signature": "-9513375615-export declare type Nominal = T & {\r\n [Symbol.species]: Name;\r\n};\r\n" }, - "../../../src/sub-project/index.ts": { + "../../../solution/sub-project/index.ts": { "version": "-21416888433-import { Nominal } from '../common/nominal';\r\nexport declare type MyNominal = Nominal;\r\n", "signature": "-21416888433-import { Nominal } from '../common/nominal';\r\nexport declare type MyNominal = Nominal;\r\n" }, - "../../../src/sub-project-2/index.ts": { + "../../../solution/sub-project-2/index.ts": { "version": "-13939373533-import { MyNominal } from '../sub-project/index';\n\nconst variable = {\n key: 'value' as MyNominal,\n};\n\nexport function getVar(): keyof typeof variable {\n return 'key';\n}\n", "signature": "-17233212183-declare const variable: {\r\n key: import(\"../common/nominal\").Nominal;\r\n};\r\nexport declare function getVar(): keyof typeof variable;\r\nexport {};\r\n" } @@ -138,29 +162,29 @@ exports.getVar = getVar; "rootDir": "../../..", "outDir": "../..", "composite": true, - "configFilePath": "../../../src/sub-project-2/tsconfig.json" + "configFilePath": "../../../solution/sub-project-2/tsconfig.json" }, "referencedMap": { - "../../../src/sub-project-2/index.ts": [ + "../../../solution/sub-project-2/index.ts": [ "../sub-project/index.d.ts" ], - "../../../src/sub-project/index.ts": [ + "../../../solution/sub-project/index.ts": [ "../common/nominal.d.ts" ] }, "exportedModulesMap": { - "../../../src/sub-project-2/index.ts": [ + "../../../solution/sub-project-2/index.ts": [ "../common/nominal.d.ts" ], - "../../../src/sub-project/index.ts": [ + "../../../solution/sub-project/index.ts": [ "../common/nominal.d.ts" ] }, "semanticDiagnosticsPerFile": [ - "../../../src/common/nominal.ts", - "../../../src/sub-project-2/index.ts", - "../../../src/sub-project/index.ts", - "../../lib.d.ts" + "../../../../lib/lib.d.ts", + "../../../solution/common/nominal.ts", + "../../../solution/sub-project-2/index.ts", + "../../../solution/sub-project/index.ts" ] }, "version": "FakeTSVersion" diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/baseline-sectioned-sourcemaps.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/baseline-sectioned-sourcemaps.js index b8705b1b03d06..136509b59b89a 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/baseline-sectioned-sourcemaps.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/baseline-sectioned-sourcemaps.js @@ -1,3 +1,42 @@ +//// [/lib/incremental-declaration-changesOutput.txt] +/lib/tsc --b /src/third --verbose +12:04:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:04:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:04:00 AM - Building project '/src/first/tsconfig.json'... + +12:04:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:04:00 AM - Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.js' is older than newest input 'src/first' + +12:04:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/first/bin/first-output.d.ts": 2, + "/src/2/second-output.tsbuildinfo": 1, + "/src/2/second-output.d.ts": 1, + "/src/third/third_part1.ts": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/2/second-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/2/second-output.js.map": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts.map": 1, + "/src/third/thirdjs/output/third-output.d.ts": 1 +} + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/emitHelpers-in-all-projects.js index f3a11792c1ff5..605e02ffcc89e 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/emitHelpers-in-all-projects.js @@ -1,3 +1,42 @@ +//// [/lib/incremental-declaration-changesOutput.txt] +/lib/tsc --b /src/third --verbose +12:04:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:04:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:04:00 AM - Building project '/src/first/tsconfig.json'... + +12:04:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:04:00 AM - Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.js' is older than newest input 'src/first' + +12:04:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/first/bin/first-output.d.ts": 2, + "/src/2/second-output.tsbuildinfo": 1, + "/src/2/second-output.d.ts": 1, + "/src/third/third_part1.ts": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/2/second-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/2/second-output.js.map": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts.map": 1, + "/src/third/thirdjs/output/third-output.d.ts": 1 +} + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/multiple-prologues-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/multiple-prologues-in-all-projects.js index 3b3e6b136dc24..a10f26edcc33a 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/multiple-prologues-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/multiple-prologues-in-all-projects.js @@ -1,3 +1,42 @@ +//// [/lib/incremental-declaration-changesOutput.txt] +/lib/tsc --b /src/third --verbose +12:04:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:04:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:04:00 AM - Building project '/src/first/tsconfig.json'... + +12:04:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:04:00 AM - Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.js' is older than newest input 'src/first' + +12:04:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/first/bin/first-output.d.ts": 2, + "/src/2/second-output.tsbuildinfo": 1, + "/src/2/second-output.d.ts": 1, + "/src/third/third_part1.ts": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/2/second-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/2/second-output.js.map": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts.map": 1, + "/src/third/thirdjs/output/third-output.d.ts": 1 +} + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/shebang-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/shebang-in-all-projects.js index 5dc312d58cebf..874c818de64cf 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/shebang-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/shebang-in-all-projects.js @@ -1,3 +1,42 @@ +//// [/lib/incremental-declaration-changesOutput.txt] +/lib/tsc --b /src/third --verbose +12:04:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:04:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:04:00 AM - Building project '/src/first/tsconfig.json'... + +12:04:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:04:00 AM - Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.js' is older than newest input 'src/first' + +12:04:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/first/bin/first-output.d.ts": 2, + "/src/2/second-output.tsbuildinfo": 1, + "/src/2/second-output.d.ts": 1, + "/src/third/third_part1.ts": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/2/second-output.js.map": 1, + "/src/2/second-output.js": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts.map": 1, + "/src/third/thirdjs/output/third-output.d.ts": 1 +} + //// [/src/first/bin/first-output.d.ts] #!someshebang first first_PART1 interface TheFirst { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/strict-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/strict-in-all-projects.js index 84d8de40064be..9d7471bf95cb7 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/strict-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/strict-in-all-projects.js @@ -1,3 +1,42 @@ +//// [/lib/incremental-declaration-changesOutput.txt] +/lib/tsc --b /src/third --verbose +12:04:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:04:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:04:00 AM - Building project '/src/first/tsconfig.json'... + +12:04:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:04:00 AM - Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.js' is older than newest input 'src/first' + +12:04:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/first/bin/first-output.d.ts": 2, + "/src/2/second-output.tsbuildinfo": 1, + "/src/2/second-output.d.ts": 1, + "/src/third/third_part1.ts": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/2/second-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/2/second-output.js.map": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts.map": 1, + "/src/third/thirdjs/output/third-output.d.ts": 1 +} + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/stripInternal-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/stripInternal-when-one-two-three-are-prepended-in-order.js index 0b7ac11a1009b..c218edfa8a9c1 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/stripInternal-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/stripInternal-when-one-two-three-are-prepended-in-order.js @@ -1,3 +1,46 @@ +//// [/lib/incremental-declaration-changesOutput.txt] +/lib/tsc --b /src/third --verbose +12:04:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:04:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:04:00 AM - Building project '/src/first/tsconfig.json'... + +12:04:00 AM - Project 'src/second/tsconfig.json' is out of date because oldest output 'src/2/second-output.js' is older than newest input 'src/first' + +12:04:00 AM - Building project '/src/second/tsconfig.json'... + +12:04:00 AM - Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.js' is older than newest input 'src/second' + +12:04:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/first/bin/first-output.d.ts": 2, + "/src/second/second_part1.ts": 1, + "/src/second/second_part2.ts": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts": 2, + "/src/third/third_part1.ts": 1, + "/src/2/second-output.tsbuildinfo": 1, + "/src/2/second-output.js": 1, + "/src/2/second-output.js.map": 1, + "/src/2/second-output.d.ts.map": 1, + "/src/third/thirdjs/output/third-output.d.ts": 1 +} + //// [/src/2/second-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/stripInternal.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/stripInternal.js index 031180b66ce13..397f586217e9e 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/stripInternal.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/stripInternal.js @@ -1,3 +1,42 @@ +//// [/lib/incremental-declaration-changesOutput.txt] +/lib/tsc --b /src/third --verbose +12:04:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:04:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:04:00 AM - Building project '/src/first/tsconfig.json'... + +12:04:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:04:00 AM - Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.js' is older than newest input 'src/first' + +12:04:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/first/bin/first-output.d.ts": 2, + "/src/2/second-output.tsbuildinfo": 1, + "/src/2/second-output.d.ts": 1, + "/src/third/third_part1.ts": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/2/second-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/2/second-output.js.map": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts.map": 1, + "/src/third/thirdjs/output/third-output.d.ts": 1 +} + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/triple-slash-refs-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/triple-slash-refs-in-all-projects.js index 837220d8dd11b..25cb88e8ddc04 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/triple-slash-refs-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/triple-slash-refs-in-all-projects.js @@ -1,3 +1,45 @@ +//// [/lib/incremental-declaration-changesOutput.txt] +/lib/tsc --b /src/third --verbose +12:04:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:04:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:04:00 AM - Building project '/src/first/tsconfig.json'... + +12:04:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:04:00 AM - Project 'src/third/tsconfig.json' is out of date because oldest output 'src/third/thirdjs/output/third-output.js' is older than newest input 'src/first' + +12:04:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/tripleRef.d.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/first/bin/first-output.d.ts": 2, + "/src/2/second-output.tsbuildinfo": 1, + "/src/2/second-output.d.ts": 1, + "/src/second/tripleRef.d.ts": 1, + "/src/third/third_part1.ts": 1, + "/src/third/tripleRef.d.ts": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/2/second-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/2/second-output.js.map": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts.map": 1, + "/src/third/thirdjs/output/third-output.d.ts": 1 +} + //// [/src/first/bin/first-output.d.ts] /// interface TheFirst { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/baseline-sectioned-sourcemaps.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/baseline-sectioned-sourcemaps.js index 0c1de64525254..e0b14d9a65de0 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/baseline-sectioned-sourcemaps.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/baseline-sectioned-sourcemaps.js @@ -1,3 +1,47 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/third --verbose +12:08:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:08:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:08:00 AM - Building project '/src/first/tsconfig.json'... + +12:08:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:08:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:08:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:08:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/first/bin/first-output.d.ts": 1, + "/src/2/second-output.tsbuildinfo": 1, + "/src/third/thirdjs/output/third-output.tsbuildinfo": 1, + "/src/third/thirdjs/output/third-output.js": 1, + "/src/third/thirdjs/output/third-output.js.map": 1, + "/src/third/thirdjs/output/third-output.d.ts": 1, + "/src/third/thirdjs/output/third-output.d.ts.map": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/2/second-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/2/second-output.js.map": 1, + "/src/2/second-output.d.ts": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts.map": 1 +} + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] file written with same contents //// [/src/first/bin/first-output.d.ts.map.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/emitHelpers-in-all-projects.js index 4049a658d5d85..cb0c5eb2bc6ed 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/emitHelpers-in-all-projects.js @@ -1,3 +1,47 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/third --verbose +12:08:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:08:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:08:00 AM - Building project '/src/first/tsconfig.json'... + +12:08:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:08:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:08:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:08:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/first/bin/first-output.d.ts": 1, + "/src/2/second-output.tsbuildinfo": 1, + "/src/third/thirdjs/output/third-output.tsbuildinfo": 1, + "/src/third/thirdjs/output/third-output.js": 1, + "/src/third/thirdjs/output/third-output.js.map": 1, + "/src/third/thirdjs/output/third-output.d.ts": 1, + "/src/third/thirdjs/output/third-output.d.ts.map": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/2/second-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/2/second-output.js.map": 1, + "/src/2/second-output.d.ts": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts.map": 1 +} + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] file written with same contents //// [/src/first/bin/first-output.d.ts.map.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/emitHelpers-in-only-one-dependency-project.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/emitHelpers-in-only-one-dependency-project.js index 91d63e81d9317..1149786824301 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/emitHelpers-in-only-one-dependency-project.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/emitHelpers-in-only-one-dependency-project.js @@ -1,3 +1,25 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/third --verbose +12:04:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:04:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:04:00 AM - Building project '/src/first/tsconfig.json'... + +12:04:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:04:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:04:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] file written with same contents //// [/src/first/bin/first-output.d.ts.map.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js index 4ea169f594042..d8e06c669bc4a 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-all-projects.js @@ -1,3 +1,25 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/third --verbose +12:04:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:04:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:04:00 AM - Building project '/src/first/tsconfig.json'... + +12:04:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:04:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:04:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] file written with same contents //// [/src/first/bin/first-output.d.ts.map.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-different-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-different-projects.js index ac94261ec5b29..692390e16458f 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-different-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-emitHelpers-in-different-projects.js @@ -1,3 +1,25 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/third --verbose +12:04:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:04:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:04:00 AM - Building project '/src/first/tsconfig.json'... + +12:04:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:04:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:04:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] file written with same contents //// [/src/first/bin/first-output.d.ts.map.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-prologues-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-prologues-in-all-projects.js index a1075353f3e32..30075f17e26e0 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-prologues-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-prologues-in-all-projects.js @@ -1,3 +1,47 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/third --verbose +12:08:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:08:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:08:00 AM - Building project '/src/first/tsconfig.json'... + +12:08:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:08:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:08:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:08:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/first/bin/first-output.d.ts": 1, + "/src/2/second-output.tsbuildinfo": 1, + "/src/third/thirdjs/output/third-output.tsbuildinfo": 1, + "/src/third/thirdjs/output/third-output.js": 1, + "/src/third/thirdjs/output/third-output.js.map": 1, + "/src/third/thirdjs/output/third-output.d.ts": 1, + "/src/third/thirdjs/output/third-output.d.ts.map": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/2/second-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/2/second-output.js.map": 1, + "/src/2/second-output.d.ts": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts.map": 1 +} + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] file written with same contents //// [/src/first/bin/first-output.d.ts.map.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-prologues-in-different-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-prologues-in-different-projects.js index 75a66a9473f63..ba51e272d7e6a 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-prologues-in-different-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/multiple-prologues-in-different-projects.js @@ -1,3 +1,25 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/third --verbose +12:04:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:04:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:04:00 AM - Building project '/src/first/tsconfig.json'... + +12:04:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:04:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:04:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] file written with same contents //// [/src/first/bin/first-output.d.ts.map.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/shebang-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/shebang-in-all-projects.js index 66cbcb79b2c5e..bbddaba06eab1 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/shebang-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/shebang-in-all-projects.js @@ -1,3 +1,47 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/third --verbose +12:08:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:08:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:08:00 AM - Building project '/src/first/tsconfig.json'... + +12:08:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:08:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:08:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:08:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/first/bin/first-output.d.ts": 1, + "/src/2/second-output.tsbuildinfo": 1, + "/src/third/thirdjs/output/third-output.tsbuildinfo": 1, + "/src/third/thirdjs/output/third-output.js": 1, + "/src/third/thirdjs/output/third-output.js.map": 1, + "/src/third/thirdjs/output/third-output.d.ts": 1, + "/src/third/thirdjs/output/third-output.d.ts.map": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/2/second-output.js.map": 1, + "/src/2/second-output.js": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts.map": 1, + "/src/2/second-output.d.ts": 1 +} + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] file written with same contents //// [/src/first/bin/first-output.d.ts.map.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/shebang-in-only-one-dependency-project.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/shebang-in-only-one-dependency-project.js index 4771fa447ef48..8cbabe3c8801d 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/shebang-in-only-one-dependency-project.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/shebang-in-only-one-dependency-project.js @@ -1,3 +1,25 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/third --verbose +12:04:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:04:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:04:00 AM - Building project '/src/first/tsconfig.json'... + +12:04:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:04:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:04:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] file written with same contents //// [/src/first/bin/first-output.d.ts.map.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/strict-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/strict-in-all-projects.js index 1e7436f9df864..a97bd2a2197c3 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/strict-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/strict-in-all-projects.js @@ -1,3 +1,47 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/third --verbose +12:08:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:08:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:08:00 AM - Building project '/src/first/tsconfig.json'... + +12:08:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:08:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:08:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:08:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/first/bin/first-output.d.ts": 1, + "/src/2/second-output.tsbuildinfo": 1, + "/src/third/thirdjs/output/third-output.tsbuildinfo": 1, + "/src/third/thirdjs/output/third-output.js": 1, + "/src/third/thirdjs/output/third-output.js.map": 1, + "/src/third/thirdjs/output/third-output.d.ts": 1, + "/src/third/thirdjs/output/third-output.d.ts.map": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/2/second-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/2/second-output.js.map": 1, + "/src/2/second-output.d.ts": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts.map": 1 +} + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] file written with same contents //// [/src/first/bin/first-output.d.ts.map.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/strict-in-one-dependency.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/strict-in-one-dependency.js index 654b18ce4831a..9bdfad323e96e 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/strict-in-one-dependency.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/strict-in-one-dependency.js @@ -1,3 +1,25 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/third --verbose +12:04:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:04:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:04:00 AM - Building project '/src/first/tsconfig.json'... + +12:04:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:04:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:04:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] file written with same contents //// [/src/first/bin/first-output.d.ts.map.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js index 6ec1100b4bd03..9c369db811c90 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js @@ -1,3 +1,29 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/third --verbose +12:04:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:04:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:04:00 AM - Building project '/src/first/tsconfig.json'... + +12:04:00 AM - Project 'src/second/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:04:00 AM - Updating output of project '/src/second/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/second/tsconfig.json'... + +12:04:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/second' has changed + +12:04:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/2/second-output.js] var s = "Hello, world"; console.log(s); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-comment.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-comment.js index a21376924f6e5..4879065387473 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-comment.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-comment.js @@ -1,3 +1,25 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/third --verbose +12:04:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:04:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:04:00 AM - Building project '/src/first/tsconfig.json'... + +12:04:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:04:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:04:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] file written with same contents //// [/src/first/bin/first-output.d.ts.map.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js index d68b80c42a4e4..b7ccf17985a32 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js @@ -1,3 +1,29 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/third --verbose +12:04:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:04:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:04:00 AM - Building project '/src/first/tsconfig.json'... + +12:04:00 AM - Project 'src/second/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:04:00 AM - Updating output of project '/src/second/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/second/tsconfig.json'... + +12:04:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/second' has changed + +12:04:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/2/second-output.js] var s = "Hello, world"; console.log(s); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-with-comments-emit-enabled.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-with-comments-emit-enabled.js index b779dcffa532c..beb8d35124ee2 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-with-comments-emit-enabled.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-with-comments-emit-enabled.js @@ -1,3 +1,25 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/third --verbose +12:04:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:04:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:04:00 AM - Building project '/src/first/tsconfig.json'... + +12:04:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:04:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:04:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] file written with same contents //// [/src/first/bin/first-output.d.ts.map.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-when-one-two-three-are-prepended-in-order.js index f312697a7264c..e670e22aab643 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-when-one-two-three-are-prepended-in-order.js @@ -1,3 +1,51 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/third --verbose +12:08:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:08:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:08:00 AM - Building project '/src/first/tsconfig.json'... + +12:08:00 AM - Project 'src/second/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:08:00 AM - Updating output of project '/src/second/tsconfig.json'... + +12:08:00 AM - Updating unchanged output timestamps of project '/src/second/tsconfig.json'... + +12:08:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/second' has changed + +12:08:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:08:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/first/bin/first-output.d.ts": 1, + "/src/2/second-output.tsbuildinfo": 2, + "/src/2/second-output.js": 2, + "/src/2/second-output.js.map": 2, + "/src/2/second-output.d.ts": 2, + "/src/2/second-output.d.ts.map": 2, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/third/thirdjs/output/third-output.tsbuildinfo": 1, + "/src/third/thirdjs/output/third-output.js": 1, + "/src/third/thirdjs/output/third-output.js.map": 1, + "/src/third/thirdjs/output/third-output.d.ts": 1, + "/src/third/thirdjs/output/third-output.d.ts.map": 1 +} + //// [/src/2/second-output.js] var s = "Hello, world"; console.log(s); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js index 4ccb69a5a8d12..eb1f081ead5df 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js @@ -1,3 +1,29 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/third --verbose +12:04:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:04:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:04:00 AM - Building project '/src/first/tsconfig.json'... + +12:04:00 AM - Project 'src/second/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:04:00 AM - Updating output of project '/src/second/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/second/tsconfig.json'... + +12:04:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/second' has changed + +12:04:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/2/second-output.js] var s = "Hello, world"; console.log(s); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-with-comments-emit-enabled.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-with-comments-emit-enabled.js index b64f036770867..51479fbc65dd0 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-with-comments-emit-enabled.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-with-comments-emit-enabled.js @@ -1,3 +1,25 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/third --verbose +12:04:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:04:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:04:00 AM - Building project '/src/first/tsconfig.json'... + +12:04:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:04:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:04:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] file written with same contents //// [/src/first/bin/first-output.d.ts.map.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal.js index 2fc43e90ec5cf..4a70c73124ece 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal.js @@ -1,3 +1,47 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/third --verbose +12:08:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:08:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:08:00 AM - Building project '/src/first/tsconfig.json'... + +12:08:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:08:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:08:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:08:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/first/bin/first-output.d.ts": 1, + "/src/2/second-output.tsbuildinfo": 1, + "/src/third/thirdjs/output/third-output.tsbuildinfo": 1, + "/src/third/thirdjs/output/third-output.js": 1, + "/src/third/thirdjs/output/third-output.js.map": 1, + "/src/third/thirdjs/output/third-output.d.ts": 1, + "/src/third/thirdjs/output/third-output.d.ts.map": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/2/second-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/2/second-output.js.map": 1, + "/src/2/second-output.d.ts": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts.map": 1 +} + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] file written with same contents //// [/src/first/bin/first-output.d.ts.map.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/triple-slash-refs-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/triple-slash-refs-in-all-projects.js index 0303c231a2dbd..b11dc0218e23b 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/triple-slash-refs-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/triple-slash-refs-in-all-projects.js @@ -1,3 +1,48 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/third --verbose +12:08:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:08:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:08:00 AM - Building project '/src/first/tsconfig.json'... + +12:08:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:08:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:08:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:08:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/tripleRef.d.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/first/bin/first-output.d.ts": 1, + "/src/2/second-output.tsbuildinfo": 1, + "/src/third/thirdjs/output/third-output.tsbuildinfo": 1, + "/src/third/thirdjs/output/third-output.js": 1, + "/src/third/thirdjs/output/third-output.js.map": 1, + "/src/third/thirdjs/output/third-output.d.ts": 1, + "/src/third/thirdjs/output/third-output.d.ts.map": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/2/second-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/2/second-output.js.map": 1, + "/src/2/second-output.d.ts": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts.map": 1 +} + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] file written with same contents //// [/src/first/bin/first-output.d.ts.map.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/triple-slash-refs-in-one-project.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/triple-slash-refs-in-one-project.js index d317b8f29b63c..8d9f639e805d3 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/triple-slash-refs-in-one-project.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/triple-slash-refs-in-one-project.js @@ -1,3 +1,25 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/third --verbose +12:04:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:04:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:04:00 AM - Building project '/src/first/tsconfig.json'... + +12:04:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:04:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:04:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] file written with same contents //// [/src/first/bin/first-output.d.ts.map.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/when-final-project-is-not-composite-but-uses-project-references.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/when-final-project-is-not-composite-but-uses-project-references.js index 126759e371940..66e8fed06770d 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/when-final-project-is-not-composite-but-uses-project-references.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/when-final-project-is-not-composite-but-uses-project-references.js @@ -1,3 +1,23 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/third --verbose +12:04:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:04:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:04:00 AM - Building project '/src/first/tsconfig.json'... + +12:04:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:04:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:04:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] file written with same contents //// [/src/first/bin/first-output.d.ts.map.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/when-source-files-are-empty-in-the-own-file.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/when-source-files-are-empty-in-the-own-file.js index a3b4c95b0f242..c41ea2edc699d 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/when-source-files-are-empty-in-the-own-file.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/when-source-files-are-empty-in-the-own-file.js @@ -1,3 +1,25 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/third --verbose +12:04:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:04:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:04:00 AM - Building project '/src/first/tsconfig.json'... + +12:04:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:04:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:04:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] file written with same contents //// [/src/first/bin/first-output.d.ts.map.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/emitHelpers-in-all-projects.js index 40ab1fa6dd027..971adc119ac12 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/emitHelpers-in-all-projects.js @@ -1,3 +1,47 @@ +//// [/lib/incremental-headers-change-without-dts-changesOutput.txt] +/lib/tsc --b /src/third --verbose +12:12:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:12:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:12:00 AM - Building project '/src/first/tsconfig.json'... + +12:12:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:12:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:12:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:12:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/first/bin/first-output.d.ts": 1, + "/src/2/second-output.tsbuildinfo": 1, + "/src/third/thirdjs/output/third-output.tsbuildinfo": 1, + "/src/third/thirdjs/output/third-output.js": 1, + "/src/third/thirdjs/output/third-output.js.map": 1, + "/src/third/thirdjs/output/third-output.d.ts": 1, + "/src/third/thirdjs/output/third-output.d.ts.map": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/2/second-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/2/second-output.js.map": 1, + "/src/2/second-output.d.ts": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts.map": 1 +} + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] {"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AAGD,iBAAS,uBAAuB,SAAM;AEXtC,iBAAS,CAAC,WAET"} diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/emitHelpers-in-only-one-dependency-project.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/emitHelpers-in-only-one-dependency-project.js index 95c8bdbb67274..4224fc07853d5 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/emitHelpers-in-only-one-dependency-project.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/emitHelpers-in-only-one-dependency-project.js @@ -1,3 +1,25 @@ +//// [/lib/incremental-headers-change-without-dts-changesOutput.txt] +/lib/tsc --b /src/third --verbose +12:08:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:08:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:08:00 AM - Building project '/src/first/tsconfig.json'... + +12:08:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:08:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:08:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:08:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] {"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AAGD,iBAAS,uBAAuB,SAE/B;AEbD,iBAAS,CAAC,WAET"} diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js index d5a6f310b95fa..888071398903f 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-all-projects.js @@ -1,3 +1,25 @@ +//// [/lib/incremental-headers-change-without-dts-changesOutput.txt] +/lib/tsc --b /src/third --verbose +12:08:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:08:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:08:00 AM - Building project '/src/first/tsconfig.json'... + +12:08:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:08:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:08:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:08:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] {"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AAGD,iBAAS,uBAAuB,SAAM;AEXtC,iBAAS,CAAC,WAET;AACD,iBAAS,sBAAsB,CAAC,GAAG,GAAG,MAAM,EAAE,QAAK"} diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-different-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-different-projects.js index c7426fd026e2c..2c4350cc261dc 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-different-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-emitHelpers-in-different-projects.js @@ -1,3 +1,25 @@ +//// [/lib/incremental-headers-change-without-dts-changesOutput.txt] +/lib/tsc --b /src/third --verbose +12:08:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:08:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:08:00 AM - Building project '/src/first/tsconfig.json'... + +12:08:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:08:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:08:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:08:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] {"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AAGD,iBAAS,uBAAuB,SAAM;AEXtC,iBAAS,CAAC,WAET"} diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-prologues-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-prologues-in-all-projects.js index e31929fda6106..b7da2a1ff965f 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-prologues-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-prologues-in-all-projects.js @@ -1,3 +1,47 @@ +//// [/lib/incremental-headers-change-without-dts-changesOutput.txt] +/lib/tsc --b /src/third --verbose +12:12:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:12:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:12:00 AM - Building project '/src/first/tsconfig.json'... + +12:12:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:12:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:12:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:12:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/first/bin/first-output.d.ts": 1, + "/src/2/second-output.tsbuildinfo": 1, + "/src/third/thirdjs/output/third-output.tsbuildinfo": 1, + "/src/third/thirdjs/output/third-output.js": 1, + "/src/third/thirdjs/output/third-output.js.map": 1, + "/src/third/thirdjs/output/third-output.d.ts": 1, + "/src/third/thirdjs/output/third-output.d.ts.map": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/2/second-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/2/second-output.js.map": 1, + "/src/2/second-output.d.ts": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts.map": 1 +} + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] {"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAEA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AEVD,iBAAS,CAAC,WAET"} diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-prologues-in-different-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-prologues-in-different-projects.js index 441559cdf45a5..7b9dc11ca9b51 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-prologues-in-different-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/multiple-prologues-in-different-projects.js @@ -1,3 +1,25 @@ +//// [/lib/incremental-headers-change-without-dts-changesOutput.txt] +/lib/tsc --b /src/third --verbose +12:08:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:08:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:08:00 AM - Building project '/src/first/tsconfig.json'... + +12:08:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:08:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:08:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:08:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] {"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AACA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AETD,iBAAS,CAAC,WAET"} diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/strict-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/strict-in-all-projects.js index 00e04704f8090..f762fa7ac2949 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/strict-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/strict-in-all-projects.js @@ -1,3 +1,47 @@ +//// [/lib/incremental-headers-change-without-dts-changesOutput.txt] +/lib/tsc --b /src/third --verbose +12:12:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:12:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:12:00 AM - Building project '/src/first/tsconfig.json'... + +12:12:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:12:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:12:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:12:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/first/bin/first-output.d.ts": 1, + "/src/2/second-output.tsbuildinfo": 1, + "/src/third/thirdjs/output/third-output.tsbuildinfo": 1, + "/src/third/thirdjs/output/third-output.js": 1, + "/src/third/thirdjs/output/third-output.js.map": 1, + "/src/third/thirdjs/output/third-output.d.ts": 1, + "/src/third/thirdjs/output/third-output.d.ts.map": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/2/second-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/2/second-output.js.map": 1, + "/src/2/second-output.d.ts": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts.map": 1 +} + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] {"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AACA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AETD,iBAAS,CAAC,WAET"} diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/strict-in-one-dependency.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/strict-in-one-dependency.js index 59205be806456..0e8a092a7d1b4 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/strict-in-one-dependency.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/strict-in-one-dependency.js @@ -1,3 +1,25 @@ +//// [/lib/incremental-headers-change-without-dts-changesOutput.txt] +/lib/tsc --b /src/third --verbose +12:08:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:08:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:08:00 AM - Building project '/src/first/tsconfig.json'... + +12:08:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:08:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:08:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:08:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] {"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AACA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AETD,iBAAS,CAAC,WAET"} diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js index 887c845e48b84..c4c6dc7ab6db8 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js @@ -1,3 +1,29 @@ +//// [/lib/incremental-headers-change-without-dts-changesOutput.txt] +/lib/tsc --b /src/third --verbose +12:08:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:08:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:08:00 AM - Building project '/src/first/tsconfig.json'... + +12:08:00 AM - Project 'src/second/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:08:00 AM - Updating output of project '/src/second/tsconfig.json'... + +12:08:00 AM - Updating unchanged output timestamps of project '/src/second/tsconfig.json'... + +12:08:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/second' has changed + +12:08:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:08:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/2/second-output.d.ts.map] {"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../first/first_PART1.ts","../first/first_part3.ts","../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;ACRD,iBAAS,CAAC,WAET;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;;IAEM,IAAI,EAAE,MAAM,CAAC;IACb,MAAM;IACF,CAAC,EACM,MAAM;CACnC;AACD,kBAAU,OAAO,CAAC;IACC,MAAa,CAAC;KAAI;IAClB,SAAgB,GAAG,SAAK;IACxB,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;IAC9B,MAAM,aAAa,KAAK,CAAC;IAChC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACtD;AACc,cAAM,SAAS;CAAG;AAClB,iBAAS,WAAW,SAAK;AACzB,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACzD,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC/D,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACpD,aAAK,YAAY,GAAG,SAAS,CAAC;AAC9B,QAAA,MAAM,aAAa,KAAK,CAAC;AACzB,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC5C,cAAM,CAAC;IACH,WAAW;CAGd"} diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-jsdoc-style-comment.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-jsdoc-style-comment.js index 3d72224374076..44b2e3afe3f08 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-jsdoc-style-comment.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-jsdoc-style-comment.js @@ -1,3 +1,25 @@ +//// [/lib/incremental-headers-change-without-dts-changesOutput.txt] +/lib/tsc --b /src/third --verbose +12:08:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:08:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:08:00 AM - Building project '/src/first/tsconfig.json'... + +12:08:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:08:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:08:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:08:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] {"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-when-one-two-three-are-prepended-in-order.js index 5f9b856f99c4e..a157ee39fc996 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-when-one-two-three-are-prepended-in-order.js @@ -1,3 +1,51 @@ +//// [/lib/incremental-headers-change-without-dts-changesOutput.txt] +/lib/tsc --b /src/third --verbose +12:12:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:12:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:12:00 AM - Building project '/src/first/tsconfig.json'... + +12:12:00 AM - Project 'src/second/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:12:00 AM - Updating output of project '/src/second/tsconfig.json'... + +12:12:00 AM - Updating unchanged output timestamps of project '/src/second/tsconfig.json'... + +12:12:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/second' has changed + +12:12:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:12:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/first/bin/first-output.d.ts": 1, + "/src/2/second-output.tsbuildinfo": 2, + "/src/2/second-output.js": 2, + "/src/2/second-output.js.map": 2, + "/src/2/second-output.d.ts": 2, + "/src/2/second-output.d.ts.map": 2, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/third/thirdjs/output/third-output.tsbuildinfo": 1, + "/src/third/thirdjs/output/third-output.js": 1, + "/src/third/thirdjs/output/third-output.js.map": 1, + "/src/third/thirdjs/output/third-output.d.ts": 1, + "/src/third/thirdjs/output/third-output.d.ts.map": 1 +} + //// [/src/2/second-output.d.ts.map] {"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../first/first_PART1.ts","../first/first_part3.ts","../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;ACRD,iBAAS,CAAC,WAET;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;;IAEK,IAAI,EAAE,MAAM,CAAC;IACb,MAAM;IACF,CAAC,EACM,MAAM;CAClC;AACD,kBAAU,OAAO,CAAC;IACA,MAAa,CAAC;KAAI;IAClB,SAAgB,GAAG,SAAK;IACxB,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;IAC9B,MAAM,aAAa,KAAK,CAAC;IAChC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACrD;AACa,cAAM,SAAS;CAAG;AAClB,iBAAS,WAAW,SAAK;AACzB,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACzD,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC/D,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACpD,aAAK,YAAY,GAAG,SAAS,CAAC;AAC9B,QAAA,MAAM,aAAa,KAAK,CAAC;AACzB,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC3C,cAAM,CAAC;IACH,WAAW;CAGd"} diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js index dcaa317a0d208..fb2071dc25616 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js @@ -1,3 +1,29 @@ +//// [/lib/incremental-headers-change-without-dts-changesOutput.txt] +/lib/tsc --b /src/third --verbose +12:08:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:08:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:08:00 AM - Building project '/src/first/tsconfig.json'... + +12:08:00 AM - Project 'src/second/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:08:00 AM - Updating output of project '/src/second/tsconfig.json'... + +12:08:00 AM - Updating unchanged output timestamps of project '/src/second/tsconfig.json'... + +12:08:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/second' has changed + +12:08:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:08:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/2/second-output.d.ts.map] {"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../first/first_PART1.ts","../first/first_part3.ts","../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;ACRD,iBAAS,CAAC,WAET;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;;IAEK,IAAI,EAAE,MAAM,CAAC;IACb,MAAM;kBACF,CAAC,EACM,MAAM;CAClC;AACD,kBAAU,OAAO,CAAC;IACA,MAAa,CAAC;KAAI;IAClB,SAAgB,GAAG,SAAK;IACxB,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;IAC9B,MAAM,aAAa,KAAK,CAAC;IAChC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACrD;AACa,cAAM,SAAS;CAAG;AAClB,iBAAS,WAAW,SAAK;AACzB,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACzD,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC/D,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACpD,aAAK,YAAY,GAAG,SAAS,CAAC;AAC9B,QAAA,MAAM,aAAa,KAAK,CAAC;AACzB,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC3C,cAAM,CAAC;IACH,WAAW;CAGd"} diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-with-comments-emit-enabled.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-with-comments-emit-enabled.js index 93681166f4639..a4a3c13a5f468 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-with-comments-emit-enabled.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-with-comments-emit-enabled.js @@ -1,3 +1,25 @@ +//// [/lib/incremental-headers-change-without-dts-changesOutput.txt] +/lib/tsc --b /src/third --verbose +12:08:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:08:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:08:00 AM - Building project '/src/first/tsconfig.json'... + +12:08:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:08:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:08:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:08:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] {"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal.js index 832ea5e5de0c9..a048c6ecd75ad 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal.js @@ -1,3 +1,47 @@ +//// [/lib/incremental-headers-change-without-dts-changesOutput.txt] +/lib/tsc --b /src/third --verbose +12:12:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:12:00 AM - Project 'src/first/tsconfig.json' is out of date because oldest output 'src/first/bin/first-output.js' is older than newest input 'src/first/first_PART1.ts' + +12:12:00 AM - Building project '/src/first/tsconfig.json'... + +12:12:00 AM - Project 'src/second/tsconfig.json' is up to date because newest input 'src/second/second_part1.ts' is older than oldest output 'src/2/second-output.js' + +12:12:00 AM - Project 'src/third/tsconfig.json' is out of date because output of its dependency 'src/first' has changed + +12:12:00 AM - Updating output of project '/src/third/tsconfig.json'... + +12:12:00 AM - Updating unchanged output timestamps of project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/first/bin/first-output.d.ts": 1, + "/src/2/second-output.tsbuildinfo": 1, + "/src/third/thirdjs/output/third-output.tsbuildinfo": 1, + "/src/third/thirdjs/output/third-output.js": 1, + "/src/third/thirdjs/output/third-output.js.map": 1, + "/src/third/thirdjs/output/third-output.d.ts": 1, + "/src/third/thirdjs/output/third-output.d.ts.map": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/2/second-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/2/second-output.js.map": 1, + "/src/2/second-output.d.ts": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts.map": 1 +} + //// [/src/first/bin/first-output.d.ts] file written with same contents //// [/src/first/bin/first-output.d.ts.map] {"version":3,"file":"first-output.d.ts","sourceRoot":"","sources":["../first_PART1.ts","../first_part2.ts","../first_part3.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;AERD,iBAAS,CAAC,WAET"} diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/baseline-sectioned-sourcemaps.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/baseline-sectioned-sourcemaps.js similarity index 93% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/baseline-sectioned-sourcemaps.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/baseline-sectioned-sourcemaps.js index dc954db7140c1..2b217d8a1d113 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/baseline-sectioned-sourcemaps.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/baseline-sectioned-sourcemaps.js @@ -1,3 +1,45 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:01:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:01:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:01:00 AM - Building project '/src/first/tsconfig.json'... + +12:01:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:01:00 AM - Building project '/src/second/tsconfig.json'... + +12:01:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:01:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/second/second_part1.ts": 1, + "/src/second/second_part2.ts": 1, + "/src/first/bin/first-output.d.ts": 1, + "/src/2/second-output.d.ts": 1, + "/src/third/third_part1.ts": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/2/second-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/2/second-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/2/second-output.js.map": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts.map": 1 +} + //// [/src/2/second-output.d.ts] declare namespace N { } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/declarationMap-and-sourceMap-disabled.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/declarationMap-and-sourceMap-disabled.js similarity index 93% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/declarationMap-and-sourceMap-disabled.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/declarationMap-and-sourceMap-disabled.js index 71e66236a0a5d..41e8f94b4aa4d 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/declarationMap-and-sourceMap-disabled.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/declarationMap-and-sourceMap-disabled.js @@ -1,3 +1,25 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:00:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:00:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:00:00 AM - Building project '/src/first/tsconfig.json'... + +12:00:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:00:00 AM - Building project '/src/second/tsconfig.json'... + +12:00:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:00:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/2/second-output.d.ts] declare namespace N { } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/emitHelpers-in-all-projects.js similarity index 94% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/emitHelpers-in-all-projects.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/emitHelpers-in-all-projects.js index f005ab7855c76..7dbec0f66cf58 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/emitHelpers-in-all-projects.js @@ -1,3 +1,45 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:01:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:01:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:01:00 AM - Building project '/src/first/tsconfig.json'... + +12:01:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:01:00 AM - Building project '/src/second/tsconfig.json'... + +12:01:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:01:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/second/second_part1.ts": 1, + "/src/second/second_part2.ts": 1, + "/src/first/bin/first-output.d.ts": 1, + "/src/2/second-output.d.ts": 1, + "/src/third/third_part1.ts": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/2/second-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/2/second-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/2/second-output.js.map": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts.map": 1 +} + //// [/src/2/second-output.d.ts] declare namespace N { } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/emitHelpers-in-only-one-dependency-project.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/emitHelpers-in-only-one-dependency-project.js similarity index 95% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/emitHelpers-in-only-one-dependency-project.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/emitHelpers-in-only-one-dependency-project.js index a0903bec835ae..b946940addd93 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/emitHelpers-in-only-one-dependency-project.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/emitHelpers-in-only-one-dependency-project.js @@ -1,3 +1,25 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:01:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:01:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:01:00 AM - Building project '/src/first/tsconfig.json'... + +12:01:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:01:00 AM - Building project '/src/second/tsconfig.json'... + +12:01:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:01:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/2/second-output.d.ts] declare namespace N { } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/multiple-emitHelpers-in-all-projects.js similarity index 96% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-emitHelpers-in-all-projects.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/multiple-emitHelpers-in-all-projects.js index c9c46a617691c..242690d288548 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/multiple-emitHelpers-in-all-projects.js @@ -1,3 +1,25 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:01:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:01:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:01:00 AM - Building project '/src/first/tsconfig.json'... + +12:01:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:01:00 AM - Building project '/src/second/tsconfig.json'... + +12:01:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:01:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/2/second-output.d.ts] declare namespace N { } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-emitHelpers-in-different-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/multiple-emitHelpers-in-different-projects.js similarity index 95% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-emitHelpers-in-different-projects.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/multiple-emitHelpers-in-different-projects.js index a5a8082cb6e4b..93ba9fcc3e358 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-emitHelpers-in-different-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/multiple-emitHelpers-in-different-projects.js @@ -1,3 +1,25 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:01:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:01:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:01:00 AM - Building project '/src/first/tsconfig.json'... + +12:01:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:01:00 AM - Building project '/src/second/tsconfig.json'... + +12:01:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:01:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/2/second-output.d.ts] declare namespace N { } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-prologues-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/multiple-prologues-in-all-projects.js similarity index 94% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-prologues-in-all-projects.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/multiple-prologues-in-all-projects.js index 9f1174ea545a1..21f8943ae6b39 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-prologues-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/multiple-prologues-in-all-projects.js @@ -1,3 +1,45 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:01:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:01:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:01:00 AM - Building project '/src/first/tsconfig.json'... + +12:01:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:01:00 AM - Building project '/src/second/tsconfig.json'... + +12:01:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:01:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/second/second_part1.ts": 1, + "/src/second/second_part2.ts": 1, + "/src/first/bin/first-output.d.ts": 1, + "/src/2/second-output.d.ts": 1, + "/src/third/third_part1.ts": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/2/second-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/2/second-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/2/second-output.js.map": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts.map": 1 +} + //// [/src/2/second-output.d.ts] declare namespace N { } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-prologues-in-different-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/multiple-prologues-in-different-projects.js similarity index 95% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-prologues-in-different-projects.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/multiple-prologues-in-different-projects.js index ccd01c44d76b7..ea725d85d495d 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/multiple-prologues-in-different-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/multiple-prologues-in-different-projects.js @@ -1,3 +1,25 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:01:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:01:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:01:00 AM - Building project '/src/first/tsconfig.json'... + +12:01:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:01:00 AM - Building project '/src/second/tsconfig.json'... + +12:01:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:01:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/2/second-output.d.ts] declare namespace N { } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/shebang-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/shebang-in-all-projects.js similarity index 93% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/shebang-in-all-projects.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/shebang-in-all-projects.js index 8a9eddef3ebf8..b8adefd89761e 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/shebang-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/shebang-in-all-projects.js @@ -1,3 +1,45 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:01:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:01:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:01:00 AM - Building project '/src/first/tsconfig.json'... + +12:01:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:01:00 AM - Building project '/src/second/tsconfig.json'... + +12:01:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:01:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/second/second_part1.ts": 1, + "/src/second/second_part2.ts": 1, + "/src/first/bin/first-output.d.ts": 1, + "/src/2/second-output.d.ts": 1, + "/src/third/third_part1.ts": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/2/second-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/2/second-output.js.map": 1, + "/src/2/second-output.js": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts.map": 1 +} + //// [/src/2/second-output.d.ts] #!someshebang second second_part1 declare namespace N { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/shebang-in-only-one-dependency-project.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/shebang-in-only-one-dependency-project.js similarity index 94% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/shebang-in-only-one-dependency-project.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/shebang-in-only-one-dependency-project.js index 6238d669fd9cd..bab82334961d5 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/shebang-in-only-one-dependency-project.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/shebang-in-only-one-dependency-project.js @@ -1,3 +1,25 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:01:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:01:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:01:00 AM - Building project '/src/first/tsconfig.json'... + +12:01:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:01:00 AM - Building project '/src/second/tsconfig.json'... + +12:01:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:01:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/2/second-output.d.ts] #!someshebang second second_part1 declare namespace N { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/strict-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/strict-in-all-projects.js similarity index 93% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/strict-in-all-projects.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/strict-in-all-projects.js index a87a175f3f69f..1471bdb3090cb 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/strict-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/strict-in-all-projects.js @@ -1,3 +1,45 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:01:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:01:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:01:00 AM - Building project '/src/first/tsconfig.json'... + +12:01:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:01:00 AM - Building project '/src/second/tsconfig.json'... + +12:01:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:01:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/second/second_part1.ts": 1, + "/src/second/second_part2.ts": 1, + "/src/first/bin/first-output.d.ts": 1, + "/src/2/second-output.d.ts": 1, + "/src/third/third_part1.ts": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/2/second-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/2/second-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/2/second-output.js.map": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts.map": 1 +} + //// [/src/2/second-output.d.ts] declare namespace N { } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/strict-in-one-dependency.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/strict-in-one-dependency.js similarity index 95% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/strict-in-one-dependency.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/strict-in-one-dependency.js index 5ad6a0c474275..8a4cce33dfc9b 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/strict-in-one-dependency.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/strict-in-one-dependency.js @@ -1,3 +1,25 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:01:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:01:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:01:00 AM - Building project '/src/first/tsconfig.json'... + +12:01:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:01:00 AM - Building project '/src/second/tsconfig.json'... + +12:01:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:01:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/2/second-output.d.ts] declare namespace N { } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-baseline-when-internal-is-inside-another-internal.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-baseline-when-internal-is-inside-another-internal.js similarity index 95% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-baseline-when-internal-is-inside-another-internal.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-baseline-when-internal-is-inside-another-internal.js index 8d6722f4b78d6..5595b32ed5749 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-baseline-when-internal-is-inside-another-internal.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-baseline-when-internal-is-inside-another-internal.js @@ -1,3 +1,25 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:00:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:00:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:00:00 AM - Building project '/src/first/tsconfig.json'... + +12:00:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:00:00 AM - Building project '/src/second/tsconfig.json'... + +12:00:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:00:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/2/second-output.d.ts] declare namespace N { } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js similarity index 96% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js index 7a5d6f628edcd..c341d9c5d2222 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js @@ -1,3 +1,25 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:01:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:01:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:01:00 AM - Building project '/src/first/tsconfig.json'... + +12:01:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:01:00 AM - Building project '/src/second/tsconfig.json'... + +12:01:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:01:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/2/second-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-jsdoc-style-comment.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-comment.js similarity index 96% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-jsdoc-style-comment.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-comment.js index 6e4cd6c0d2641..709634ade2742 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-jsdoc-style-comment.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-comment.js @@ -1,3 +1,25 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:01:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:01:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:01:00 AM - Building project '/src/first/tsconfig.json'... + +12:01:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:01:00 AM - Building project '/src/second/tsconfig.json'... + +12:01:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:01:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/2/second-output.d.ts] declare namespace N { } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js similarity index 96% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js index 0890b8d81889c..81653bf15bbec 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js @@ -1,3 +1,25 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:01:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:01:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:01:00 AM - Building project '/src/first/tsconfig.json'... + +12:01:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:01:00 AM - Building project '/src/second/tsconfig.json'... + +12:01:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:01:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/2/second-output.d.ts] /**@internal*/ interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-jsdoc-style-with-comments-emit-enabled.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-with-comments-emit-enabled.js similarity index 96% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-jsdoc-style-with-comments-emit-enabled.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-with-comments-emit-enabled.js index 87badd920395e..e86999f7bf452 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-jsdoc-style-with-comments-emit-enabled.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-with-comments-emit-enabled.js @@ -1,3 +1,25 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:01:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:01:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:01:00 AM - Building project '/src/first/tsconfig.json'... + +12:01:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:01:00 AM - Building project '/src/second/tsconfig.json'... + +12:01:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:01:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/2/second-output.d.ts] declare namespace N { } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-when-few-members-of-enum-are-internal.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-when-few-members-of-enum-are-internal.js similarity index 96% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-when-few-members-of-enum-are-internal.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-when-few-members-of-enum-are-internal.js index 91558992f041c..91cf996eddde7 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-when-few-members-of-enum-are-internal.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-when-few-members-of-enum-are-internal.js @@ -1,3 +1,25 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:00:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:00:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:00:00 AM - Building project '/src/first/tsconfig.json'... + +12:00:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:00:00 AM - Building project '/src/second/tsconfig.json'... + +12:00:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:00:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/2/second-output.d.ts] declare namespace N { } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-when-one-two-three-are-prepended-in-order.js similarity index 96% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-when-one-two-three-are-prepended-in-order.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-when-one-two-three-are-prepended-in-order.js index 8986286317040..a858a1e27d8a9 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-when-one-two-three-are-prepended-in-order.js @@ -1,3 +1,45 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:01:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:01:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:01:00 AM - Building project '/src/first/tsconfig.json'... + +12:01:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:01:00 AM - Building project '/src/second/tsconfig.json'... + +12:01:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:01:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/first/bin/first-output.d.ts": 1, + "/src/second/second_part1.ts": 1, + "/src/second/second_part2.ts": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts": 1, + "/src/third/third_part1.ts": 1, + "/src/2/second-output.tsbuildinfo": 1, + "/src/2/second-output.js": 1, + "/src/2/second-output.js.map": 1, + "/src/2/second-output.d.ts.map": 1 +} + //// [/src/2/second-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js similarity index 96% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js index 5d2941abca299..fa4c05b80fe0e 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js @@ -1,3 +1,25 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:01:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:01:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:01:00 AM - Building project '/src/first/tsconfig.json'... + +12:01:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:01:00 AM - Building project '/src/second/tsconfig.json'... + +12:01:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:01:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/2/second-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-with-comments-emit-enabled.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-with-comments-emit-enabled.js similarity index 96% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-with-comments-emit-enabled.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-with-comments-emit-enabled.js index 2475d4e4eda78..d681812289135 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal-with-comments-emit-enabled.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-with-comments-emit-enabled.js @@ -1,3 +1,25 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:01:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:01:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:01:00 AM - Building project '/src/first/tsconfig.json'... + +12:01:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:01:00 AM - Building project '/src/second/tsconfig.json'... + +12:01:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:01:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/2/second-output.d.ts] declare namespace N { } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal.js similarity index 96% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal.js index 7ac42063f7d1a..0f0cf474ca703 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/stripInternal.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal.js @@ -1,3 +1,45 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:01:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:01:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:01:00 AM - Building project '/src/first/tsconfig.json'... + +12:01:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:01:00 AM - Building project '/src/second/tsconfig.json'... + +12:01:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:01:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/second/second_part1.ts": 1, + "/src/second/second_part2.ts": 1, + "/src/first/bin/first-output.d.ts": 1, + "/src/2/second-output.d.ts": 1, + "/src/third/third_part1.ts": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/2/second-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/2/second-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/2/second-output.js.map": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts.map": 1 +} + //// [/src/2/second-output.d.ts] declare namespace N { } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/triple-slash-refs-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/triple-slash-refs-in-all-projects.js similarity index 94% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/triple-slash-refs-in-all-projects.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/triple-slash-refs-in-all-projects.js index 9310b004ec356..c8efbd205e624 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/triple-slash-refs-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/triple-slash-refs-in-all-projects.js @@ -1,3 +1,48 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:01:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:01:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:01:00 AM - Building project '/src/first/tsconfig.json'... + +12:01:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:01:00 AM - Building project '/src/second/tsconfig.json'... + +12:01:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:01:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/third/tsconfig.json": 1, + "/src/first/tsconfig.json": 1, + "/src/second/tsconfig.json": 1, + "/src/first/first_PART1.ts": 1, + "/src/first/first_part2.ts": 1, + "/src/first/tripleRef.d.ts": 1, + "/src/first/first_part3.ts": 1, + "/src/second/second_part1.ts": 1, + "/src/second/tripleRef.d.ts": 1, + "/src/second/second_part2.ts": 1, + "/src/first/bin/first-output.d.ts": 1, + "/src/2/second-output.d.ts": 1, + "/src/third/third_part1.ts": 1, + "/src/third/tripleRef.d.ts": 1, + "/src/first/bin/first-output.tsbuildinfo": 1, + "/src/2/second-output.tsbuildinfo": 1, + "/src/first/bin/first-output.js": 1, + "/src/2/second-output.js": 1, + "/src/first/bin/first-output.js.map": 1, + "/src/2/second-output.js.map": 1, + "/src/first/bin/first-output.d.ts.map": 1, + "/src/2/second-output.d.ts.map": 1 +} + //// [/src/2/second-output.d.ts] /// declare const second_part1Const: secondsecond_part1; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/triple-slash-refs-in-one-project.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/triple-slash-refs-in-one-project.js similarity index 95% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/triple-slash-refs-in-one-project.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/triple-slash-refs-in-one-project.js index 9a0bc7227429c..471309f35f0ac 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/triple-slash-refs-in-one-project.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/triple-slash-refs-in-one-project.js @@ -1,3 +1,25 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:01:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:01:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:01:00 AM - Building project '/src/first/tsconfig.json'... + +12:01:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:01:00 AM - Building project '/src/second/tsconfig.json'... + +12:01:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:01:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/2/second-output.d.ts] /// declare const second_part1Const: secondsecond_part1; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/when-final-project-is-not-composite-but-incremental.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/when-final-project-is-not-composite-but-incremental.js similarity index 94% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/when-final-project-is-not-composite-but-incremental.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/when-final-project-is-not-composite-but-incremental.js index 77755214958de..81bec95d4f6c8 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/when-final-project-is-not-composite-but-incremental.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/when-final-project-is-not-composite-but-incremental.js @@ -1,3 +1,25 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:00:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:00:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:00:00 AM - Building project '/src/first/tsconfig.json'... + +12:00:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:00:00 AM - Building project '/src/second/tsconfig.json'... + +12:00:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:00:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/2/second-output.d.ts] declare namespace N { } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/when-final-project-is-not-composite-but-uses-project-references.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/when-final-project-is-not-composite-but-uses-project-references.js similarity index 94% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/when-final-project-is-not-composite-but-uses-project-references.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/when-final-project-is-not-composite-but-uses-project-references.js index 2564a1ae67ede..2e7b1f1663fad 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/when-final-project-is-not-composite-but-uses-project-references.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/when-final-project-is-not-composite-but-uses-project-references.js @@ -1,3 +1,25 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:01:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:01:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:01:00 AM - Building project '/src/first/tsconfig.json'... + +12:01:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:01:00 AM - Building project '/src/second/tsconfig.json'... + +12:01:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:01:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/2/second-output.d.ts] declare namespace N { } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/when-final-project-specifies-tsBuildInfoFile.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/when-final-project-specifies-tsBuildInfoFile.js similarity index 94% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/when-final-project-specifies-tsBuildInfoFile.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/when-final-project-specifies-tsBuildInfoFile.js index 288f507f70b7a..b0131b6af56e0 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/when-final-project-specifies-tsBuildInfoFile.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/when-final-project-specifies-tsBuildInfoFile.js @@ -1,3 +1,25 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:00:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:00:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:00:00 AM - Building project '/src/first/tsconfig.json'... + +12:00:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:00:00 AM - Building project '/src/second/tsconfig.json'... + +12:00:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:00:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/2/second-output.d.ts] declare namespace N { } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/when-source-files-are-empty-in-the-own-file.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/when-source-files-are-empty-in-the-own-file.js similarity index 94% rename from tests/baselines/reference/tsbuild/outfile-concat/initial-Build/when-source-files-are-empty-in-the-own-file.js rename to tests/baselines/reference/tsbuild/outfile-concat/initial-build/when-source-files-are-empty-in-the-own-file.js index 7269a7ca7447d..deb7dbd86e6f2 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/when-source-files-are-empty-in-the-own-file.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/when-source-files-are-empty-in-the-own-file.js @@ -1,3 +1,25 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/third --verbose +12:01:00 AM - Projects in this build: + * src/first/tsconfig.json + * src/second/tsconfig.json + * src/third/tsconfig.json + +12:01:00 AM - Project 'src/first/tsconfig.json' is out of date because output file 'src/first/bin/first-output.js' does not exist + +12:01:00 AM - Building project '/src/first/tsconfig.json'... + +12:01:00 AM - Project 'src/second/tsconfig.json' is out of date because output file 'src/2/second-output.js' does not exist + +12:01:00 AM - Building project '/src/second/tsconfig.json'... + +12:01:00 AM - Project 'src/third/tsconfig.json' is out of date because output file 'src/third/thirdjs/output/third-output.js' does not exist + +12:01:00 AM - Building project '/src/third/tsconfig.json'... + +exitCode:: 0 + + //// [/src/2/second-output.d.ts] declare namespace N { } diff --git a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/sample.js b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/sample.js index 0a2ce56cb641e..94a962ebe027a 100644 --- a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/sample.js +++ b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/sample.js @@ -1,3 +1,43 @@ +//// [/lib/incremental-declaration-changesOutput.txt] +/lib/tsc --b /src/tests --verbose +12:04:00 AM - Projects in this build: + * src/core/tsconfig.json + * src/logic/tsconfig.json + * src/tests/tsconfig.json + +12:04:00 AM - Project 'src/core/tsconfig.json' is out of date because oldest output 'src/core/anotherModule.js' is older than newest input 'src/core/index.ts' + +12:04:00 AM - Building project '/src/core/tsconfig.json'... + +12:04:00 AM - Updating unchanged output timestamps of project '/src/core/tsconfig.json'... + +12:04:00 AM - Project 'src/logic/tsconfig.json' is out of date because oldest output 'src/logic/index.js' is older than newest input 'src/core' + +12:04:00 AM - Building project '/src/logic/tsconfig.json'... + +12:04:00 AM - Project 'src/tests/tsconfig.json' is out of date because oldest output 'src/tests/index.js' is older than newest input 'src/core' + +12:04:00 AM - Building project '/src/tests/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/tests/tsconfig.json": 1, + "/src/core/tsconfig.json": 1, + "/src/logic/tsconfig.json": 1, + "/src/core/tsconfig.tsbuildinfo": 1, + "/src/core/anotherModule.ts": 1, + "/src/core/index.ts": 1, + "/src/core/some_decl.d.ts": 1, + "/src/core/index.d.ts": 2, + "/src/logic/tsconfig.tsbuildinfo": 1, + "/src/logic/index.ts": 1, + "/src/core/anotherModule.d.ts": 1, + "/src/logic/index.d.ts": 1, + "/src/tests/tsconfig.tsbuildinfo": 1, + "/src/tests/index.ts": 1, + "/src/tests/index.d.ts": 1 +} + //// [/src/core/index.d.ts] export declare const someString: string; export declare function leftPad(s: string, n: number): string; diff --git a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-declaration-option-changes.js b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-declaration-option-changes.js index b3c226497121c..2311e64ef2b66 100644 --- a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-declaration-option-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-declaration-option-changes.js @@ -1,3 +1,15 @@ +//// [/lib/incremental-declaration-changesOutput.txt] +/lib/tsc --b /src/core --verbose +12:04:00 AM - Projects in this build: + * src/core/tsconfig.json + +12:04:00 AM - Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.d.ts' does not exist + +12:04:00 AM - Building project '/src/core/tsconfig.json'... + +exitCode:: 0 + + //// [/src/core/anotherModule.d.ts] export declare const World = "hello"; diff --git a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-esModuleInterop-option-changes.js b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-esModuleInterop-option-changes.js index a701b09575a60..dd48841c8afe0 100644 --- a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-esModuleInterop-option-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-esModuleInterop-option-changes.js @@ -1,3 +1,21 @@ +//// [/lib/incremental-declaration-changesOutput.txt] +/lib/tsc --b /src/tests --verbose +12:04:00 AM - Projects in this build: + * src/core/tsconfig.json + * src/logic/tsconfig.json + * src/tests/tsconfig.json + +12:04:00 AM - Project 'src/core/tsconfig.json' is up to date because newest input 'src/core/anotherModule.ts' is older than oldest output 'src/core/anotherModule.js' + +12:04:00 AM - Project 'src/logic/tsconfig.json' is up to date because newest input 'src/logic/index.ts' is older than oldest output 'src/logic/index.js' + +12:04:00 AM - Project 'src/tests/tsconfig.json' is out of date because oldest output 'src/tests/index.js' is older than newest input 'src/tests/tsconfig.json' + +12:04:00 AM - Building project '/src/tests/tsconfig.json'... + +exitCode:: 0 + + //// [/src/tests/index.d.ts] file written with same contents //// [/src/tests/index.js] "use strict"; diff --git a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-logic-config-changes-declaration-dir.js b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-logic-config-changes-declaration-dir.js index 701737ec3b586..da943e101e256 100644 --- a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-logic-config-changes-declaration-dir.js +++ b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-logic-config-changes-declaration-dir.js @@ -1,3 +1,36 @@ +//// [/lib/incremental-declaration-changesOutput.txt] +/lib/tsc --b /src/tests --verbose +12:12:00 AM - Projects in this build: + * src/core/tsconfig.json + * src/logic/tsconfig.json + * src/tests/tsconfig.json + +12:12:00 AM - Project 'src/core/tsconfig.json' is up to date because newest input 'src/core/anotherModule.ts' is older than oldest output 'src/core/anotherModule.js' + +12:12:00 AM - Project 'src/logic/tsconfig.json' is out of date because output file 'src/logic/decls/index.d.ts' does not exist + +12:12:00 AM - Building project '/src/logic/tsconfig.json'... + +12:12:00 AM - Project 'src/tests/tsconfig.json' is out of date because oldest output 'src/tests/index.js' is older than newest input 'src/logic' + +12:12:00 AM - Building project '/src/tests/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/tests/tsconfig.json": 1, + "/src/core/tsconfig.json": 1, + "/src/logic/tsconfig.json": 1, + "/src/core/tsconfig.tsbuildinfo": 1, + "/src/logic/tsconfig.tsbuildinfo": 1, + "/src/logic/index.ts": 1, + "/src/core/index.d.ts": 1, + "/src/core/anotherModule.d.ts": 1, + "/src/tests/tsconfig.tsbuildinfo": 1, + "/src/tests/index.ts": 1, + "/src/logic/decls/index.d.ts": 1, + "/src/tests/index.d.ts": 1 +} + //// [/src/logic/decls/index.d.ts] export declare function getSecondsInDay(): number; import * as mod from '../core/anotherModule'; diff --git a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-module-option-changes.js b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-module-option-changes.js index d6c6fb4d8770c..0a801843705d2 100644 --- a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-module-option-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-module-option-changes.js @@ -1,3 +1,15 @@ +//// [/lib/incremental-declaration-changesOutput.txt] +/lib/tsc --b /src/core --verbose +12:04:00 AM - Projects in this build: + * src/core/tsconfig.json + +12:04:00 AM - Project 'src/core/tsconfig.json' is out of date because oldest output 'src/core/anotherModule.js' is older than newest input 'src/core/tsconfig.json' + +12:04:00 AM - Building project '/src/core/tsconfig.json'... + +exitCode:: 0 + + //// [/src/core/anotherModule.js] define(["require", "exports"], function (require, exports) { "use strict"; diff --git a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-target-option-changes.js b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-target-option-changes.js index 0dc8156158d07..bc3a79219937c 100644 --- a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-target-option-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-target-option-changes.js @@ -1,3 +1,23 @@ +//// [/lib/incremental-declaration-changesOutput.txt] +/lib/tsc --b /src/core --verbose +12:04:00 AM - Projects in this build: + * src/core/tsconfig.json + +12:04:00 AM - Project 'src/core/tsconfig.json' is out of date because oldest output 'src/core/anotherModule.js' is older than newest input 'src/core/tsconfig.json' + +12:04:00 AM - Building project '/src/core/tsconfig.json'... + +TSFILE: /src/core/anotherModule.js +TSFILE: /src/core/index.js +TSFILE: /src/core/tsconfig.tsbuildinfo +/lib/lib.d.ts +/lib/lib.esnext.d.ts +/src/core/anotherModule.ts +/src/core/index.ts +/src/core/some_decl.d.ts +exitCode:: 0 + + //// [/src/core/anotherModule.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-doesnt-change/sample.js b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-doesnt-change/sample.js index 658377ce3a33b..a2d9e5a8564a5 100644 --- a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-doesnt-change/sample.js +++ b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-doesnt-change/sample.js @@ -1,3 +1,38 @@ +//// [/lib/incremental-declaration-doesnt-changeOutput.txt] +/lib/tsc --b /src/tests --verbose +12:08:00 AM - Projects in this build: + * src/core/tsconfig.json + * src/logic/tsconfig.json + * src/tests/tsconfig.json + +12:08:00 AM - Project 'src/core/tsconfig.json' is out of date because oldest output 'src/core/anotherModule.js' is older than newest input 'src/core/index.ts' + +12:08:00 AM - Building project '/src/core/tsconfig.json'... + +12:08:00 AM - Updating unchanged output timestamps of project '/src/core/tsconfig.json'... + +12:08:00 AM - Project 'src/logic/tsconfig.json' is up to date with .d.ts files from its dependencies + +12:08:00 AM - Updating output timestamps of project '/src/logic/tsconfig.json'... + +12:08:00 AM - Project 'src/tests/tsconfig.json' is up to date with .d.ts files from its dependencies + +12:08:00 AM - Updating output timestamps of project '/src/tests/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/tests/tsconfig.json": 1, + "/src/core/tsconfig.json": 1, + "/src/logic/tsconfig.json": 1, + "/src/core/tsconfig.tsbuildinfo": 1, + "/src/core/anotherModule.ts": 1, + "/src/core/index.ts": 1, + "/src/core/some_decl.d.ts": 1, + "/src/core/index.d.ts": 1, + "/src/logic/tsconfig.tsbuildinfo": 1, + "/src/tests/tsconfig.tsbuildinfo": 1 +} + //// [/src/core/index.d.ts] file written with same contents //// [/src/core/index.d.ts.map] file written with same contents //// [/src/core/index.d.ts.map.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/sample1/initial-Build/when-logic-config-changes-declaration-dir.js b/tests/baselines/reference/tsbuild/sample1/initial-Build/when-logic-config-changes-declaration-dir.js deleted file mode 100644 index 7a9f9a2ea9572..0000000000000 --- a/tests/baselines/reference/tsbuild/sample1/initial-Build/when-logic-config-changes-declaration-dir.js +++ /dev/null @@ -1,494 +0,0 @@ -//// [/src/core/anotherModule.d.ts] -export declare const World = "hello"; -//# sourceMappingURL=anotherModule.d.ts.map - -//// [/src/core/anotherModule.d.ts.map] -{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} - -//// [/src/core/anotherModule.d.ts.map.baseline.txt] -=================================================================== -JsFile: anotherModule.d.ts -mapUrl: anotherModule.d.ts.map -sourceRoot: -sources: anotherModule.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:/src/core/anotherModule.d.ts -sourceFile:anotherModule.ts -------------------------------------------------------------------- ->>>export declare const World = "hello"; -1 > -2 >^^^^^^^^^^^^^^^ -3 > ^^^^^^ -4 > ^^^^^ -5 > ^^^^^^^^^^ -6 > ^ -7 > ^^^^^-> -1 > -2 >export -3 > const -4 > World -5 > = "hello" -6 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 16) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 22) Source(1, 14) + SourceIndex(0) -4 >Emitted(1, 27) Source(1, 19) + SourceIndex(0) -5 >Emitted(1, 37) Source(1, 29) + SourceIndex(0) -6 >Emitted(1, 38) Source(1, 30) + SourceIndex(0) ---- ->>>//# sourceMappingURL=anotherModule.d.ts.map - -//// [/src/core/anotherModule.js] -"use strict"; -exports.__esModule = true; -exports.World = "hello"; - - -//// [/src/core/index.d.ts] -export declare const someString: string; -export declare function leftPad(s: string, n: number): string; -export declare function multiply(a: number, b: number): number; -//# sourceMappingURL=index.d.ts.map - -//// [/src/core/index.d.ts.map] -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} - -//// [/src/core/index.d.ts.map.baseline.txt] -=================================================================== -JsFile: index.d.ts -mapUrl: index.d.ts.map -sourceRoot: -sources: index.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:/src/core/index.d.ts -sourceFile:index.ts -------------------------------------------------------------------- ->>>export declare const someString: string; -1 > -2 >^^^^^^^^^^^^^^^ -3 > ^^^^^^ -4 > ^^^^^^^^^^ -5 > ^^ -6 > ^^^^^^ -7 > ^ -8 > ^^^^^^^^^^^^^^^^^^^^^^^-> -1 > -2 >export -3 > const -4 > someString -5 > : -6 > string = "HELLO WORLD" -7 > ; -1 >Emitted(1, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(1, 16) Source(1, 8) + SourceIndex(0) -3 >Emitted(1, 22) Source(1, 14) + SourceIndex(0) -4 >Emitted(1, 32) Source(1, 24) + SourceIndex(0) -5 >Emitted(1, 34) Source(1, 26) + SourceIndex(0) -6 >Emitted(1, 40) Source(1, 48) + SourceIndex(0) -7 >Emitted(1, 41) Source(1, 49) + SourceIndex(0) ---- ->>>export declare function leftPad(s: string, n: number): string; -1-> -2 >^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^ -4 > ^ -5 > ^ -6 > ^^ -7 > ^^^^^^ -8 > ^^ -9 > ^ -10> ^^ -11> ^^^^^^ -12> ^^^^^^^^^^ -13> ^^-> -1-> - > -2 >export function -3 > leftPad -4 > ( -5 > s -6 > : -7 > string -8 > , -9 > n -10> : -11> number -12> ) { return s + n; } -1->Emitted(2, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(2, 25) Source(2, 17) + SourceIndex(0) -3 >Emitted(2, 32) Source(2, 24) + SourceIndex(0) -4 >Emitted(2, 33) Source(2, 25) + SourceIndex(0) -5 >Emitted(2, 34) Source(2, 26) + SourceIndex(0) -6 >Emitted(2, 36) Source(2, 28) + SourceIndex(0) -7 >Emitted(2, 42) Source(2, 34) + SourceIndex(0) -8 >Emitted(2, 44) Source(2, 36) + SourceIndex(0) -9 >Emitted(2, 45) Source(2, 37) + SourceIndex(0) -10>Emitted(2, 47) Source(2, 39) + SourceIndex(0) -11>Emitted(2, 53) Source(2, 45) + SourceIndex(0) -12>Emitted(2, 63) Source(2, 64) + SourceIndex(0) ---- ->>>export declare function multiply(a: number, b: number): number; -1-> -2 >^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^ -4 > ^ -5 > ^ -6 > ^^ -7 > ^^^^^^ -8 > ^^ -9 > ^ -10> ^^ -11> ^^^^^^ -12> ^^^^^^^^^^ -1-> - > -2 >export function -3 > multiply -4 > ( -5 > a -6 > : -7 > number -8 > , -9 > b -10> : -11> number -12> ) { return a * b; } -1->Emitted(3, 1) Source(3, 1) + SourceIndex(0) -2 >Emitted(3, 25) Source(3, 17) + SourceIndex(0) -3 >Emitted(3, 33) Source(3, 25) + SourceIndex(0) -4 >Emitted(3, 34) Source(3, 26) + SourceIndex(0) -5 >Emitted(3, 35) Source(3, 27) + SourceIndex(0) -6 >Emitted(3, 37) Source(3, 29) + SourceIndex(0) -7 >Emitted(3, 43) Source(3, 35) + SourceIndex(0) -8 >Emitted(3, 45) Source(3, 37) + SourceIndex(0) -9 >Emitted(3, 46) Source(3, 38) + SourceIndex(0) -10>Emitted(3, 48) Source(3, 40) + SourceIndex(0) -11>Emitted(3, 54) Source(3, 46) + SourceIndex(0) -12>Emitted(3, 64) Source(3, 65) + SourceIndex(0) ---- ->>>//# sourceMappingURL=index.d.ts.map - -//// [/src/core/index.js] -"use strict"; -exports.__esModule = true; -exports.someString = "HELLO WORLD"; -function leftPad(s, n) { return s + n; } -exports.leftPad = leftPad; -function multiply(a, b) { return a * b; } -exports.multiply = multiply; - - -//// [/src/core/tsconfig.tsbuildinfo] -{ - "program": { - "fileInfos": { - "../../lib/lib.d.ts": { - "version": "3858781397-/// \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 {}\ndeclare const console: { log(msg: any): void; };", - "signature": "3858781397-/// \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 {}\ndeclare const console: { log(msg: any): void; };" - }, - "./anothermodule.ts": { - "version": "-2676574883-export const World = \"hello\";\r\n", - "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" - }, - "./index.ts": { - "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" - }, - "./some_decl.d.ts": { - "version": "-9253692965-declare const dts: any;\r\n", - "signature": "-9253692965-declare const dts: any;\r\n" - } - }, - "options": { - "composite": true, - "declaration": true, - "declarationMap": true, - "skipDefaultLibCheck": true, - "configFilePath": "./tsconfig.json" - }, - "referencedMap": {}, - "exportedModulesMap": {}, - "semanticDiagnosticsPerFile": [ - "../../lib/lib.d.ts", - "./anothermodule.ts", - "./index.ts", - "./some_decl.d.ts" - ] - }, - "version": "FakeTSVersion" -} - -//// [/src/logic/index.d.ts] -export declare function getSecondsInDay(): number; -import * as mod from '../core/anotherModule'; -export declare const m: typeof mod; - - -//// [/src/logic/index.js] -"use strict"; -exports.__esModule = true; -var c = require("../core/index"); -function getSecondsInDay() { - return c.multiply(10, 15); -} -exports.getSecondsInDay = getSecondsInDay; -var mod = require("../core/anotherModule"); -exports.m = mod; -//# sourceMappingURL=index.js.map - -//// [/src/logic/index.js.map] -{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;AAAA,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AAFD,0CAEC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} - -//// [/src/logic/index.js.map.baseline.txt] -=================================================================== -JsFile: index.js -mapUrl: index.js.map -sourceRoot: -sources: index.ts -=================================================================== -------------------------------------------------------------------- -emittedFile:/src/logic/index.js -sourceFile:index.ts -------------------------------------------------------------------- ->>>"use strict"; ->>>exports.__esModule = true; ->>>var c = require("../core/index"); -1 > -2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1 > -2 >import * as c from '../core/index'; -1 >Emitted(3, 1) Source(1, 1) + SourceIndex(0) -2 >Emitted(3, 34) Source(1, 36) + SourceIndex(0) ---- ->>>function getSecondsInDay() { -1 > -2 >^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^ -4 > ^^^^^^^-> -1 > - > -2 >export function -3 > getSecondsInDay -1 >Emitted(4, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(4, 10) Source(2, 17) + SourceIndex(0) -3 >Emitted(4, 25) Source(2, 32) + SourceIndex(0) ---- ->>> return c.multiply(10, 15); -1->^^^^ -2 > ^^^^^^^ -3 > ^ -4 > ^ -5 > ^^^^^^^^ -6 > ^ -7 > ^^ -8 > ^^ -9 > ^^ -10> ^ -11> ^ -1->() { - > -2 > return -3 > c -4 > . -5 > multiply -6 > ( -7 > 10 -8 > , -9 > 15 -10> ) -11> ; -1->Emitted(5, 5) Source(3, 5) + SourceIndex(0) -2 >Emitted(5, 12) Source(3, 12) + SourceIndex(0) -3 >Emitted(5, 13) Source(3, 13) + SourceIndex(0) -4 >Emitted(5, 14) Source(3, 14) + SourceIndex(0) -5 >Emitted(5, 22) Source(3, 22) + SourceIndex(0) -6 >Emitted(5, 23) Source(3, 23) + SourceIndex(0) -7 >Emitted(5, 25) Source(3, 25) + SourceIndex(0) -8 >Emitted(5, 27) Source(3, 27) + SourceIndex(0) -9 >Emitted(5, 29) Source(3, 29) + SourceIndex(0) -10>Emitted(5, 30) Source(3, 30) + SourceIndex(0) -11>Emitted(5, 31) Source(3, 31) + SourceIndex(0) ---- ->>>} -1 > -2 >^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > - > -2 >} -1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) ---- ->>>exports.getSecondsInDay = getSecondsInDay; -1-> -2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^-> -1-> -2 >export function getSecondsInDay() { - > return c.multiply(10, 15); - >} -1->Emitted(7, 1) Source(2, 1) + SourceIndex(0) -2 >Emitted(7, 43) Source(4, 2) + SourceIndex(0) ---- ->>>var mod = require("../core/anotherModule"); -1-> -2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1-> - > -2 >import * as mod from '../core/anotherModule'; -1->Emitted(8, 1) Source(5, 1) + SourceIndex(0) -2 >Emitted(8, 44) Source(5, 46) + SourceIndex(0) ---- ->>>exports.m = mod; -1 > -2 >^^^^^^^^ -3 > ^ -4 > ^^^ -5 > ^^^ -6 > ^ -7 > ^^^^^^^^^^^^^^^^-> -1 > - >export const -2 > -3 > m -4 > = -5 > mod -6 > ; -1 >Emitted(9, 1) Source(6, 14) + SourceIndex(0) -2 >Emitted(9, 9) Source(6, 14) + SourceIndex(0) -3 >Emitted(9, 10) Source(6, 15) + SourceIndex(0) -4 >Emitted(9, 13) Source(6, 18) + SourceIndex(0) -5 >Emitted(9, 16) Source(6, 21) + SourceIndex(0) -6 >Emitted(9, 17) Source(6, 22) + SourceIndex(0) ---- ->>>//# sourceMappingURL=index.js.map - -//// [/src/logic/tsconfig.tsbuildinfo] -{ - "program": { - "fileInfos": { - "../../lib/lib.d.ts": { - "version": "3858781397-/// \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 {}\ndeclare const console: { log(msg: any): void; };", - "signature": "3858781397-/// \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 {}\ndeclare const console: { log(msg: any): void; };" - }, - "../core/index.ts": { - "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", - "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" - }, - "../core/anothermodule.ts": { - "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", - "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" - }, - "./index.ts": { - "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" - } - }, - "options": { - "composite": true, - "declaration": true, - "sourceMap": true, - "forceConsistentCasingInFileNames": true, - "skipDefaultLibCheck": true, - "configFilePath": "./tsconfig.json" - }, - "referencedMap": { - "./index.ts": [ - "../core/anothermodule.d.ts", - "../core/index.d.ts" - ] - }, - "exportedModulesMap": { - "./index.ts": [ - "../core/anothermodule.d.ts" - ] - }, - "semanticDiagnosticsPerFile": [ - "../../lib/lib.d.ts", - "../core/anothermodule.ts", - "../core/index.ts", - "./index.ts" - ] - }, - "version": "FakeTSVersion" -} - -//// [/src/tests/index.d.ts] -import * as mod from '../core/anotherModule'; -export declare const m: typeof mod; - - -//// [/src/tests/index.js] -"use strict"; -exports.__esModule = true; -var c = require("../core/index"); -var logic = require("../logic/index"); -c.leftPad("", 10); -logic.getSecondsInDay(); -var mod = require("../core/anotherModule"); -exports.m = mod; - - -//// [/src/tests/tsconfig.tsbuildinfo] -{ - "program": { - "fileInfos": { - "../../lib/lib.d.ts": { - "version": "3858781397-/// \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 {}\ndeclare const console: { log(msg: any): void; };", - "signature": "3858781397-/// \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 {}\ndeclare const console: { log(msg: any): void; };" - }, - "../core/index.ts": { - "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", - "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" - }, - "../core/anothermodule.ts": { - "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", - "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" - }, - "../logic/index.ts": { - "version": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n", - "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" - }, - "./index.ts": { - "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", - "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" - } - }, - "options": { - "composite": true, - "declaration": true, - "forceConsistentCasingInFileNames": true, - "skipDefaultLibCheck": true, - "configFilePath": "./tsconfig.json" - }, - "referencedMap": { - "../logic/index.ts": [ - "../core/anothermodule.d.ts" - ], - "./index.ts": [ - "../core/anothermodule.d.ts", - "../core/index.d.ts", - "../logic/index.d.ts" - ] - }, - "exportedModulesMap": { - "../logic/index.ts": [ - "../core/anothermodule.d.ts" - ], - "./index.ts": [ - "../core/anothermodule.d.ts" - ] - }, - "semanticDiagnosticsPerFile": [ - "../../lib/lib.d.ts", - "../core/anothermodule.ts", - "../core/index.ts", - "../logic/index.ts", - "./index.ts" - ] - }, - "version": "FakeTSVersion" -} - diff --git a/tests/baselines/reference/tsbuild/sample1/initial-Build/sample.js b/tests/baselines/reference/tsbuild/sample1/initial-build/sample.js similarity index 92% rename from tests/baselines/reference/tsbuild/sample1/initial-Build/sample.js rename to tests/baselines/reference/tsbuild/sample1/initial-build/sample.js index 7a9f9a2ea9572..00228056483cd 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-Build/sample.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-build/sample.js @@ -1,3 +1,40 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/tests --verbose +12:01:00 AM - Projects in this build: + * src/core/tsconfig.json + * src/logic/tsconfig.json + * src/tests/tsconfig.json + +12:01:00 AM - Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist + +12:01:00 AM - Building project '/src/core/tsconfig.json'... + +12:01:00 AM - Project 'src/logic/tsconfig.json' is out of date because output file 'src/logic/index.js' does not exist + +12:01:00 AM - Building project '/src/logic/tsconfig.json'... + +12:01:00 AM - Project 'src/tests/tsconfig.json' is out of date because output file 'src/tests/index.js' does not exist + +12:01:00 AM - Building project '/src/tests/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/tests/tsconfig.json": 1, + "/src/core/tsconfig.json": 1, + "/src/logic/tsconfig.json": 1, + "/src/core/tsconfig.tsbuildinfo": 1, + "/src/core/anotherModule.ts": 1, + "/src/core/index.ts": 1, + "/src/core/some_decl.d.ts": 1, + "/src/logic/tsconfig.tsbuildinfo": 1, + "/src/logic/index.ts": 1, + "/src/core/index.d.ts": 1, + "/src/core/anotherModule.d.ts": 1, + "/src/tests/tsconfig.tsbuildinfo": 1, + "/src/tests/index.ts": 1, + "/src/logic/index.d.ts": 1 +} + //// [/src/core/anotherModule.d.ts] export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map diff --git a/tests/baselines/reference/tsbuild/sample1/initial-Build/when-declaration-option-changes.js b/tests/baselines/reference/tsbuild/sample1/initial-build/when-declaration-option-changes.js similarity index 87% rename from tests/baselines/reference/tsbuild/sample1/initial-Build/when-declaration-option-changes.js rename to tests/baselines/reference/tsbuild/sample1/initial-build/when-declaration-option-changes.js index 61e87a815aa89..6fcba548d3b10 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-Build/when-declaration-option-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-build/when-declaration-option-changes.js @@ -1,3 +1,15 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/core --verbose +12:01:00 AM - Projects in this build: + * src/core/tsconfig.json + +12:01:00 AM - Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist + +12:01:00 AM - Building project '/src/core/tsconfig.json'... + +exitCode:: 0 + + //// [/src/core/anotherModule.js] "use strict"; exports.__esModule = true; diff --git a/tests/baselines/reference/tsbuild/sample1/initial-Build/when-esModuleInterop-option-changes.js b/tests/baselines/reference/tsbuild/sample1/initial-build/when-esModuleInterop-option-changes.js similarity index 92% rename from tests/baselines/reference/tsbuild/sample1/initial-Build/when-esModuleInterop-option-changes.js rename to tests/baselines/reference/tsbuild/sample1/initial-build/when-esModuleInterop-option-changes.js index e24ade14d9d15..0f1ea65c5e4d3 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-Build/when-esModuleInterop-option-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-build/when-esModuleInterop-option-changes.js @@ -1,3 +1,25 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/tests --verbose +12:01:00 AM - Projects in this build: + * src/core/tsconfig.json + * src/logic/tsconfig.json + * src/tests/tsconfig.json + +12:01:00 AM - Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist + +12:01:00 AM - Building project '/src/core/tsconfig.json'... + +12:01:00 AM - Project 'src/logic/tsconfig.json' is out of date because output file 'src/logic/index.js' does not exist + +12:01:00 AM - Building project '/src/logic/tsconfig.json'... + +12:01:00 AM - Project 'src/tests/tsconfig.json' is out of date because output file 'src/tests/index.js' does not exist + +12:01:00 AM - Building project '/src/tests/tsconfig.json'... + +exitCode:: 0 + + //// [/src/core/anotherModule.d.ts] export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map diff --git a/tests/baselines/reference/tsbuild/sample1/initial-Build/when-logic-specifies-tsBuildInfoFile.js b/tests/baselines/reference/tsbuild/sample1/initial-build/when-logic-specifies-tsBuildInfoFile.js similarity index 92% rename from tests/baselines/reference/tsbuild/sample1/initial-Build/when-logic-specifies-tsBuildInfoFile.js rename to tests/baselines/reference/tsbuild/sample1/initial-build/when-logic-specifies-tsBuildInfoFile.js index b7623e1af5670..fe60d8093d410 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-Build/when-logic-specifies-tsBuildInfoFile.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-build/when-logic-specifies-tsBuildInfoFile.js @@ -1,3 +1,40 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/tests --verbose +12:00:00 AM - Projects in this build: + * src/core/tsconfig.json + * src/logic/tsconfig.json + * src/tests/tsconfig.json + +12:00:00 AM - Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist + +12:00:00 AM - Building project '/src/core/tsconfig.json'... + +12:00:00 AM - Project 'src/logic/tsconfig.json' is out of date because output file 'src/logic/index.js' does not exist + +12:00:00 AM - Building project '/src/logic/tsconfig.json'... + +12:00:00 AM - Project 'src/tests/tsconfig.json' is out of date because output file 'src/tests/index.js' does not exist + +12:00:00 AM - Building project '/src/tests/tsconfig.json'... + +exitCode:: 0 +readFiles:: { + "/src/tests/tsconfig.json": 1, + "/src/core/tsconfig.json": 1, + "/src/logic/tsconfig.json": 1, + "/src/core/tsconfig.tsbuildinfo": 1, + "/src/core/anotherModule.ts": 1, + "/src/core/index.ts": 1, + "/src/core/some_decl.d.ts": 1, + "/src/logic/ownFile.tsbuildinfo": 1, + "/src/logic/index.ts": 1, + "/src/core/index.d.ts": 1, + "/src/core/anotherModule.d.ts": 1, + "/src/tests/tsconfig.tsbuildinfo": 1, + "/src/tests/index.ts": 1, + "/src/logic/index.d.ts": 1 +} + //// [/src/core/anotherModule.d.ts] export declare const World = "hello"; //# sourceMappingURL=anotherModule.d.ts.map diff --git a/tests/baselines/reference/tsbuild/sample1/initial-Build/when-module-option-changes.js b/tests/baselines/reference/tsbuild/sample1/initial-build/when-module-option-changes.js similarity index 87% rename from tests/baselines/reference/tsbuild/sample1/initial-Build/when-module-option-changes.js rename to tests/baselines/reference/tsbuild/sample1/initial-build/when-module-option-changes.js index ad19329a2e08e..c890f0d576609 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-Build/when-module-option-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-build/when-module-option-changes.js @@ -1,3 +1,15 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/core --verbose +12:01:00 AM - Projects in this build: + * src/core/tsconfig.json + +12:01:00 AM - Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist + +12:01:00 AM - Building project '/src/core/tsconfig.json'... + +exitCode:: 0 + + //// [/src/core/anotherModule.js] "use strict"; exports.__esModule = true; diff --git a/tests/baselines/reference/tsbuild/sample1/initial-Build/when-target-option-changes.js b/tests/baselines/reference/tsbuild/sample1/initial-build/when-target-option-changes.js similarity index 85% rename from tests/baselines/reference/tsbuild/sample1/initial-Build/when-target-option-changes.js rename to tests/baselines/reference/tsbuild/sample1/initial-build/when-target-option-changes.js index c8fc2b1fbdebe..c615f77eb86df 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-Build/when-target-option-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-build/when-target-option-changes.js @@ -1,3 +1,23 @@ +//// [/lib/initial-buildOutput.txt] +/lib/tsc --b /src/core --verbose +12:01:00 AM - Projects in this build: + * src/core/tsconfig.json + +12:01:00 AM - Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist + +12:01:00 AM - Building project '/src/core/tsconfig.json'... + +TSFILE: /src/core/anotherModule.js +TSFILE: /src/core/index.js +TSFILE: /src/core/tsconfig.tsbuildinfo +/lib/lib.esnext.d.ts +/lib/lib.esnext.full.d.ts +/src/core/anotherModule.ts +/src/core/index.ts +/src/core/some_decl.d.ts +exitCode:: 0 + + //// [/lib/lib.d.ts] /// ///