diff --git a/src/testRunner/unittests/tsbuild/helpers.ts b/src/testRunner/unittests/tsbuild/helpers.ts index c50a73d48b1..5cf148d37ca 100644 --- a/src/testRunner/unittests/tsbuild/helpers.ts +++ b/src/testRunner/unittests/tsbuild/helpers.ts @@ -83,11 +83,49 @@ namespace ts { } } - function build({ fs, tick, rootNames, expectedMapFileNames, modifyFs, withoutBuildInfo, expectedDiagnostics }: { + // [tsbuildinfo, js, dts] + export type BuildInfoSectionBaselineFiles = [string, string | undefined, string | undefined]; + function generateBuildInfoSectionBaselineFiles(fs: vfs.FileSystem, buildInfoFileNames: ReadonlyArray) { + for (const [file, jsFile, dtsFile] of buildInfoFileNames) { + if (!fs.existsSync(file)) continue; + + const buildInfo = JSON.parse(fs.readFileSync(file, "utf8")) as BuildInfo; + if (!buildInfo.js.length && !buildInfo.dts.length) continue; + + // Write the baselines: + const baselineRecorder = new Harness.Compiler.WriterAggregator(); + generateBundleFileSectionInfo(fs, baselineRecorder, buildInfo.js, jsFile); + generateBundleFileSectionInfo(fs, baselineRecorder, buildInfo.dts, dtsFile); + baselineRecorder.Close(); + + const text = baselineRecorder.lines.join("\r\n"); + fs.writeFileSync(`${file}.baseline.txt`, text, "utf8"); + } + } + + function generateBundleFileSectionInfo(fs: vfs.FileSystem, baselineRecorder: Harness.Compiler.WriterAggregator, sections: BundleFileSection[], outFile: string | undefined) { + if (!sections.length && !outFile) return; // Nothing to baseline + + const content = outFile && fs.existsSync(outFile) ? fs.readFileSync(outFile, "utf8") : ""; + baselineRecorder.WriteLine("======================================================================"); + baselineRecorder.WriteLine(`File:: ${outFile}`); + for (const section of sections) { + baselineRecorder.WriteLine("----------------------------------------------------------------------"); + baselineRecorder.WriteLine(`${section.kind}: (${section.pos}-${section.end})${section.data ? ":: " + section.data : ""}`); + const textLines = content.substring(section.pos, section.end).split(/\r?\n/); + for (const line of textLines) { + baselineRecorder.WriteLine(line); + } + } + baselineRecorder.WriteLine("======================================================================"); + } + + function build({ fs, tick, rootNames, expectedMapFileNames, expectedTsbuildInfoFileNames, modifyFs, withoutBuildInfo, expectedDiagnostics }: { fs: vfs.FileSystem; tick: () => void; rootNames: ReadonlyArray; expectedMapFileNames: ReadonlyArray; + expectedTsbuildInfoFileNames: ReadonlyArray; modifyFs: (fs: vfs.FileSystem) => void; withoutBuildInfo: boolean; expectedDiagnostics: ReadonlyArray; @@ -120,6 +158,7 @@ namespace ts { builder.buildAllProjects(); host.assertDiagnosticMessages(...expectedDiagnostics); generateSourceMapBaselineFiles(fs, expectedMapFileNames); + generateBuildInfoSectionBaselineFiles(fs, expectedTsbuildInfoFileNames); fs.makeReadonly(); return { fs, actualReadFileMap, host, builder }; } @@ -165,7 +204,7 @@ Mismatch Actual(path, actual, expected): ${JSON.stringify(mapDefinedIterator(act } function verifyTsbuildOutputWorker({ - scenario, projFs, time, tick, proj, rootNames, expectedMapFileNames, withoutBuildInfo, lastProjectOutputJs, + scenario, projFs, time, tick, proj, rootNames, expectedMapFileNames, expectedTsbuildInfoFileNames, withoutBuildInfo, lastProjectOutputJs, initialBuild, incrementalDtsChangedBuild, incrementalDtsUnchangedBuild, incrementalHeaderChangedBuild }: { scenario: string; @@ -175,6 +214,7 @@ Mismatch Actual(path, actual, expected): ${JSON.stringify(mapDefinedIterator(act proj: string; rootNames: ReadonlyArray; expectedMapFileNames: ReadonlyArray; + expectedTsbuildInfoFileNames: ReadonlyArray; withoutBuildInfo: boolean; lastProjectOutputJs: string; initialBuild: ExpectedBuildOutputNotDifferingWithBuildInfo; @@ -192,6 +232,7 @@ Mismatch Actual(path, actual, expected): ${JSON.stringify(mapDefinedIterator(act tick, rootNames, expectedMapFileNames, + expectedTsbuildInfoFileNames, modifyFs: initialBuild.modifyFs, withoutBuildInfo, expectedDiagnostics: initialBuild.expectedDiagnostics @@ -228,6 +269,7 @@ Mismatch Actual(path, actual, expected): ${JSON.stringify(mapDefinedIterator(act tick, rootNames, expectedMapFileNames, + expectedTsbuildInfoFileNames, modifyFs: incrementalModifyFs, withoutBuildInfo, expectedDiagnostics: incrementalExpectedDiagnostics @@ -282,6 +324,7 @@ Mismatch Actual(path, actual, expected): ${JSON.stringify(mapDefinedIterator(act proj: string; rootNames: ReadonlyArray; expectedMapFileNames: ReadonlyArray; + expectedTsbuildInfoFileNames: ReadonlyArray; lastProjectOutputJs: string; initialBuild: ExpectedBuildOutputNotDifferingWithBuildInfo; incrementalDtsChangedBuild: ExpectedBuildOutputNotDifferingWithBuildInfo; diff --git a/src/testRunner/unittests/tsbuild/outFile.ts b/src/testRunner/unittests/tsbuild/outFile.ts index 28cabc1794b..278171b502d 100644 --- a/src/testRunner/unittests/tsbuild/outFile.ts +++ b/src/testRunner/unittests/tsbuild/outFile.ts @@ -64,6 +64,11 @@ namespace ts { outputFiles[project.third][ext.jsmap], outputFiles[project.third][ext.dtsmap] ]; + const expectedTsbuildInfoFileNames: ReadonlyArray = [ + [outputFiles[project.first][ext.buildinfo], outputFiles[project.first][ext.js], outputFiles[project.first][ext.dts]], + [outputFiles[project.second][ext.buildinfo], outputFiles[project.second][ext.js], outputFiles[project.second][ext.dts]], + [outputFiles[project.third][ext.buildinfo], outputFiles[project.third][ext.js], outputFiles[project.third][ext.dts]] + ]; const relSources = sources.map(([config, sources]) => [relName(config), sources.map(relName)]) as [Sources, Sources, Sources]; const { time, tick } = getTime(); before(() => { @@ -148,6 +153,7 @@ namespace ts { proj: "outfile-concat", rootNames: ["/src/third"], expectedMapFileNames, + expectedTsbuildInfoFileNames, lastProjectOutputJs: outputFiles[project.third][ext.js], initialBuild: { modifyFs, diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/baseline-sectioned-sourcemaps.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/baseline-sectioned-sourcemaps.js index f2bd4d9dce3..d836aff31d8 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/baseline-sectioned-sourcemaps.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/baseline-sectioned-sourcemaps.js @@ -28,6 +28,40 @@ "sources": {} } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-109) +var s = "Hola, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (109-149) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-156) +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (156-198) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; @@ -396,6 +430,77 @@ console.log(s); "sources": {} } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prepend: (0-149):: /src/first/bin/first-output.js +var s = "Hola, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (151-477):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (479-515) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (515-555) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-198):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (200-343):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (345-364) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (364-406) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/emitHelpers-in-all-projects.js index 27aeec430fd..7375dda41ae 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/emitHelpers-in-all-projects.js @@ -38,6 +38,55 @@ } } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +text: (417-643) +var s = "Hola, world"; +console.log(s); +function forfirstfirst_PART1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (643-683) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-207) +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (207-249) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; @@ -509,6 +558,100 @@ const { b, ...rest } = { a: 10, b: 30, yy: 30 }; } } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +prepend: (417-683):: /src/first/bin/first-output.js +var s = "Hola, world"; +console.log(s); +function forfirstfirst_PART1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (685-1130):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +function forsecondsecond_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (1132-1285) +var c = new C(); +c.doSomething(); +function forthirdthird_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} + +---------------------------------------------------------------------- +sourceMapUrl: (1285-1325) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-249):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (251-447):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare function forsecondsecond_part1Rest(): void; +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (449-519) +declare var c: C; +declare function forthirdthird_part1Rest(): void; + +---------------------------------------------------------------------- +sourceMapUrl: (519-561) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/emitHelpers-in-only-one-dependency-project.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/emitHelpers-in-only-one-dependency-project.js index 6698b82fd2f..e759725ebcc 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/emitHelpers-in-only-one-dependency-project.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/emitHelpers-in-only-one-dependency-project.js @@ -28,6 +28,42 @@ "sources": {} } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-149) +var s = "Hola, world"; +console.log(s); +function forfirstfirst_PART1Rest() { } +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (149-189) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-207) +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (207-249) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; @@ -439,6 +475,94 @@ function forfirstfirst_PART1Rest() { } "sources": {} } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +prepend: (417-606):: /src/first/bin/first-output.js +var s = "Hola, world"; +console.log(s); +function forfirstfirst_PART1Rest() { } +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (608-1053):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +function forsecondsecond_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (1055-1091) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (1091-1131) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-249):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (251-447):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare function forsecondsecond_part1Rest(): void; +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (449-468) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (468-510) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/multiple-emitHelpers-in-all-projects.js index 90ade00d108..56cf73141ba 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/multiple-emitHelpers-in-all-projects.js @@ -52,6 +52,87 @@ } } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +emitHelpers: (417-921):: typescript:read +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +---------------------------------------------------------------------- +emitHelpers: (923-1093):: typescript:spread +var __spread = (this && this.__spread) || function () { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +}; +---------------------------------------------------------------------- +text: (1095-1533) +var s = "Hola, world"; +console.log(s); +function forfirstfirst_PART1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +console.log(f()); +function f() { + return "JS does hoists"; +} +function firstfirst_part3Spread() { + var b = []; + for (var _i = 0; _i < arguments.length; _i++) { + b[_i] = arguments[_i]; + } +} +firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); + +---------------------------------------------------------------------- +sourceMapUrl: (1533-1573) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-271) +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; +declare function firstfirst_part3Spread(...b: number[]): void; + +---------------------------------------------------------------------- +sourceMapUrl: (271-313) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; @@ -710,6 +791,148 @@ const { b, ...rest } = { a: 10, b: 30, yy: 30 }; } } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +emitHelpers: (417-921):: typescript:read +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +---------------------------------------------------------------------- +emitHelpers: (923-1093):: typescript:spread +var __spread = (this && this.__spread) || function () { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +}; +---------------------------------------------------------------------- +prepend: (1095-1573):: /src/first/bin/first-output.js +var s = "Hola, world"; +console.log(s); +function forfirstfirst_PART1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +console.log(f()); +function f() { + return "JS does hoists"; +} +function firstfirst_part3Spread() { + var b = []; + for (var _i = 0; _i < arguments.length; _i++) { + b[_i] = arguments[_i]; + } +} +firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (1575-2236):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +function forsecondsecond_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +function secondsecond_part2Spread() { + var b = []; + for (var _i = 0; _i < arguments.length; _i++) { + b[_i] = arguments[_i]; + } +} +secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (2238-2603) +var c = new C(); +c.doSomething(); +function forthirdthird_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +function thirdthird_part1Spread() { + var b = []; + for (var _i = 0; _i < arguments.length; _i++) { + b[_i] = arguments[_i]; + } +} +thirdthird_part1Spread.apply(void 0, __spread([10, 20, 30])); + +---------------------------------------------------------------------- +sourceMapUrl: (2603-2643) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-313):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; +declare function firstfirst_part3Spread(...b: number[]): void; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (315-577):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare function forsecondsecond_part1Rest(): void; +declare class C { + doSomething(): void; +} +declare function secondsecond_part2Spread(...b: number[]): void; +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (579-713) +declare var c: C; +declare function forthirdthird_part1Rest(): void; +declare function thirdthird_part1Spread(...b: number[]): void; + +---------------------------------------------------------------------- +sourceMapUrl: (713-755) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/multiple-emitHelpers-in-different-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/multiple-emitHelpers-in-different-projects.js index 22d143ba62f..75787e9bbba 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/multiple-emitHelpers-in-different-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/multiple-emitHelpers-in-different-projects.js @@ -38,6 +38,55 @@ } } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +text: (417-643) +var s = "Hola, world"; +console.log(s); +function forfirstfirst_PART1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (643-683) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-207) +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (207-249) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; @@ -521,6 +570,128 @@ const { b, ...rest } = { a: 10, b: 30, yy: 30 }; } } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +emitHelpers: (417-921):: typescript:read +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +---------------------------------------------------------------------- +emitHelpers: (923-1093):: typescript:spread +var __spread = (this && this.__spread) || function () { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +}; +---------------------------------------------------------------------- +prepend: (1095-1361):: /src/first/bin/first-output.js +var s = "Hola, world"; +console.log(s); +function forfirstfirst_PART1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (1363-1905):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +function secondsecond_part1Spread() { + var b = []; + for (var _i = 0; _i < arguments.length; _i++) { + b[_i] = arguments[_i]; + } +} +secondsecond_part1Spread.apply(void 0, __spread([10, 20, 30])); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (1907-2060) +var c = new C(); +c.doSomething(); +function forthirdthird_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} + +---------------------------------------------------------------------- +sourceMapUrl: (2060-2100) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-249):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (251-460):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare function secondsecond_part1Spread(...b: number[]): void; +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (462-532) +declare var c: C; +declare function forthirdthird_part1Rest(): void; + +---------------------------------------------------------------------- +sourceMapUrl: (532-574) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/multiple-prologues-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/multiple-prologues-in-all-projects.js index 7d6596fac7f..e849656ae61 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/multiple-prologues-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/multiple-prologues-in-all-projects.js @@ -67,6 +67,46 @@ } } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +prologue: (15-28):: myPrologue +"myPrologue"; +---------------------------------------------------------------------- +text: (30-139) +var s = "Hola, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (139-179) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-156) +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (156-198) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; @@ -513,6 +553,89 @@ console.log(s); } } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +prologue: (15-28):: myPrologue +"myPrologue"; +---------------------------------------------------------------------- +prologue: (30-44):: myPrologue2 +"myPrologue2"; +---------------------------------------------------------------------- +prologue: (46-60):: myPrologue3 +"myPrologue3"; +---------------------------------------------------------------------- +prepend: (62-211):: /src/first/bin/first-output.js +var s = "Hola, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (213-539):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (541-577) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (577-617) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-198):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (200-343):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (345-364) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (364-406) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/multiple-prologues-in-different-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/multiple-prologues-in-different-projects.js index 82bd995d935..33907c10257 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/multiple-prologues-in-different-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/multiple-prologues-in-different-projects.js @@ -52,6 +52,43 @@ } } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +text: (15-124) +var s = "Hola, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (124-164) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-156) +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (156-198) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; @@ -458,6 +495,86 @@ console.log(s); } } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +prologue: (15-28):: myPrologue +"myPrologue"; +---------------------------------------------------------------------- +prologue: (30-44):: myPrologue2 +"myPrologue2"; +---------------------------------------------------------------------- +prepend: (46-195):: /src/first/bin/first-output.js +var s = "Hola, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (197-523):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (525-561) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (561-601) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-198):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (200-343):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (345-364) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (364-406) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/shebang-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/shebang-in-all-projects.js index 89005d61977..9d843dfb1d1 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/shebang-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/shebang-in-all-projects.js @@ -28,6 +28,40 @@ "sources": {} } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (33-142) +var s = "Hola, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (142-182) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (33-189) +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (189-231) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] #!someshebang first first_PART1 interface TheFirst { @@ -404,6 +438,77 @@ console.log(s); "sources": {} } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prepend: (33-182):: /src/first/bin/first-output.js +var s = "Hola, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (184-510):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (512-548) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (548-588) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (33-231):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (233-376):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (378-397) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (397-439) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] #!someshebang first first_PART1 interface TheFirst { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/shebang-in-only-one-dependency-project.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/shebang-in-only-one-dependency-project.js index 64b0a316dfa..396822e9864 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/shebang-in-only-one-dependency-project.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/shebang-in-only-one-dependency-project.js @@ -28,6 +28,40 @@ "sources": {} } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-109) +var s = "Hola, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (109-149) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-156) +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (156-198) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; @@ -396,6 +430,77 @@ console.log(s); "sources": {} } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prepend: (35-184):: /src/first/bin/first-output.js +var s = "Hola, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (186-512):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (514-550) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (550-590) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (35-233):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (235-378):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (380-399) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (399-441) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] #!someshebang second second_part1 interface TheFirst { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/strict-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/strict-in-all-projects.js index f58135b0aaf..8ad5fbb8551 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/strict-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/strict-in-all-projects.js @@ -52,6 +52,43 @@ } } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +text: (15-124) +var s = "Hola, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (124-164) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-156) +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (156-198) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; @@ -446,6 +483,80 @@ console.log(s); } } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +prepend: (15-164):: /src/first/bin/first-output.js +var s = "Hola, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (166-492):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (494-530) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (530-570) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-198):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (200-343):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (345-364) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (364-406) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/strict-in-one-dependency.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/strict-in-one-dependency.js index a26ce28b0d3..6c49f6bcfbe 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/strict-in-one-dependency.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/strict-in-one-dependency.js @@ -28,6 +28,40 @@ "sources": {} } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-109) +var s = "Hola, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (109-149) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-156) +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (156-198) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; @@ -402,6 +436,80 @@ console.log(s); "sources": {} } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +prepend: (15-164):: /src/first/bin/first-output.js +var s = "Hola, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (166-492):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (494-530) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (530-570) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-198):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (200-343):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (345-364) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (364-406) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/triple-slash-refs-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/triple-slash-refs-in-all-projects.js index 59d8b7e099d..e316f8491fd 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/triple-slash-refs-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/triple-slash-refs-in-all-projects.js @@ -34,6 +34,45 @@ "sources": {} } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-157) +var s = "Hola, world"; +console.log(s); +var first_part2Const = new firstfirst_part2(); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (157-197) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +reference: (0-42):: ../tripleRef.d.ts +/// +---------------------------------------------------------------------- +text: (44-251) +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare const first_part2Const: firstfirst_part2; +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (251-293) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] /// interface TheFirst { @@ -477,6 +516,92 @@ console.log(s); "sources": {} } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prepend: (0-197):: /src/first/bin/first-output.js +var s = "Hola, world"; +console.log(s); +var first_part2Const = new firstfirst_part2(); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (199-576):: /src/2/second-output.js +var second_part1Const = new secondsecond_part1(); +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (578-662) +var third_part1Const = new thirdthird_part1(); +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (662-702) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +reference: (0-45):: ../../tripleRef.d.ts +/// +---------------------------------------------------------------------- +reference: (47-101):: ../../../first/tripleRef.d.ts +/// +---------------------------------------------------------------------- +reference: (103-158):: ../../../second/tripleRef.d.ts +/// +---------------------------------------------------------------------- +prepend: (160-409):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare const first_part2Const: firstfirst_part2; +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (411-608):: /src/2/second-output.d.ts +declare const second_part1Const: secondsecond_part1; +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (610-680) +declare const third_part1Const: thirdthird_part1; +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (680-722) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] /// /// diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/triple-slash-refs-in-one-project.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/triple-slash-refs-in-one-project.js index 99785331044..d37e0e804c7 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/triple-slash-refs-in-one-project.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/triple-slash-refs-in-one-project.js @@ -28,6 +28,40 @@ "sources": {} } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-109) +var s = "Hola, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (109-149) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-156) +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (156-198) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; @@ -402,6 +436,82 @@ console.log(s); "sources": {} } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prepend: (0-149):: /src/first/bin/first-output.js +var s = "Hola, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (151-528):: /src/2/second-output.js +var second_part1Const = new secondsecond_part1(); +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (530-566) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (566-606) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +reference: (0-55):: ../../../second/tripleRef.d.ts +/// +---------------------------------------------------------------------- +prepend: (57-255):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (257-454):: /src/2/second-output.d.ts +declare const second_part1Const: secondsecond_part1; +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (456-475) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (475-517) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] /// interface TheFirst { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/when-final-project-is-not-composite-but-uses-project-references.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/when-final-project-is-not-composite-but-uses-project-references.js index f2bd4d9dce3..d836aff31d8 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/when-final-project-is-not-composite-but-uses-project-references.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/buildInfo/when-final-project-is-not-composite-but-uses-project-references.js @@ -28,6 +28,40 @@ "sources": {} } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-109) +var s = "Hola, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (109-149) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-156) +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (156-198) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; @@ -396,6 +430,77 @@ console.log(s); "sources": {} } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prepend: (0-149):: /src/first/bin/first-output.js +var s = "Hola, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (151-477):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (479-515) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (515-555) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-198):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hola, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (200-343):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (345-364) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (364-406) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/baseline-sectioned-sourcemaps.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/baseline-sectioned-sourcemaps.js index 5c5ddf3d505..f8216e4c09e 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/baseline-sectioned-sourcemaps.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/baseline-sectioned-sourcemaps.js @@ -28,6 +28,41 @@ "sources": {} } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-127) +var s = "Hello, world"; +console.log(s); +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (127-167) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-157) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (157-199) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.js] var s = "Hello, world"; console.log(s); @@ -281,6 +316,78 @@ console.log(s); "sources": {} } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prepend: (0-167):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (169-495):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (497-533) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (533-573) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-199):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (201-344):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (346-365) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (365-407) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.js] var s = "Hello, world"; console.log(s); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/emitHelpers-in-all-projects.js index 2690ef694b6..e2159b8b45d 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/emitHelpers-in-all-projects.js @@ -38,6 +38,56 @@ } } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +text: (417-661) +var s = "Hello, world"; +console.log(s); +function forfirstfirst_PART1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (661-701) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-208) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (208-250) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.js] var __rest = (this && this.__rest) || function (s, e) { var t = {}; @@ -373,6 +423,101 @@ const { b, ...rest } = { a: 10, b: 30, yy: 30 }; } } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +prepend: (417-701):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +function forfirstfirst_PART1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (703-1148):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +function forsecondsecond_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (1150-1303) +var c = new C(); +c.doSomething(); +function forthirdthird_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} + +---------------------------------------------------------------------- +sourceMapUrl: (1303-1343) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-250):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (252-448):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare function forsecondsecond_part1Rest(): void; +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (450-520) +declare var c: C; +declare function forthirdthird_part1Rest(): void; + +---------------------------------------------------------------------- +sourceMapUrl: (520-562) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.js] var __rest = (this && this.__rest) || function (s, e) { var t = {}; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/emitHelpers-in-only-one-dependency-project.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/emitHelpers-in-only-one-dependency-project.js index 6cc2fa7554e..9a8cc17e307 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/emitHelpers-in-only-one-dependency-project.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/emitHelpers-in-only-one-dependency-project.js @@ -28,6 +28,43 @@ "sources": {} } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-167) +var s = "Hello, world"; +console.log(s); +function forfirstfirst_PART1Rest() { } +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (167-207) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-208) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (208-250) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.js] var s = "Hello, world"; console.log(s); @@ -305,6 +342,95 @@ function forfirstfirst_PART1Rest() { }console.log(s); "sources": {} } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +prepend: (417-624):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +function forfirstfirst_PART1Rest() { } +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (626-1071):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +function forsecondsecond_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (1073-1109) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (1109-1149) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-250):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (252-448):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare function forsecondsecond_part1Rest(): void; +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (450-469) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (469-511) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.js] var __rest = (this && this.__rest) || function (s, e) { var t = {}; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/multiple-emitHelpers-in-all-projects.js index a80d7fc8450..68efab455bb 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/multiple-emitHelpers-in-all-projects.js @@ -52,6 +52,88 @@ } } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +emitHelpers: (417-921):: typescript:read +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +---------------------------------------------------------------------- +emitHelpers: (923-1093):: typescript:spread +var __spread = (this && this.__spread) || function () { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +}; +---------------------------------------------------------------------- +text: (1095-1551) +var s = "Hello, world"; +console.log(s); +function forfirstfirst_PART1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +function firstfirst_part3Spread() { + var b = []; + for (var _i = 0; _i < arguments.length; _i++) { + b[_i] = arguments[_i]; + } +} +firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); + +---------------------------------------------------------------------- +sourceMapUrl: (1551-1591) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-272) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; +declare function firstfirst_part3Spread(...b: number[]): void; + +---------------------------------------------------------------------- +sourceMapUrl: (272-314) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.js] var __rest = (this && this.__rest) || function (s, e) { var t = {}; @@ -543,6 +625,149 @@ const { b, ...rest } = { a: 10, b: 30, yy: 30 }; } } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +emitHelpers: (417-921):: typescript:read +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +---------------------------------------------------------------------- +emitHelpers: (923-1093):: typescript:spread +var __spread = (this && this.__spread) || function () { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +}; +---------------------------------------------------------------------- +prepend: (1095-1591):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +function forfirstfirst_PART1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +function firstfirst_part3Spread() { + var b = []; + for (var _i = 0; _i < arguments.length; _i++) { + b[_i] = arguments[_i]; + } +} +firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (1593-2254):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +function forsecondsecond_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +function secondsecond_part2Spread() { + var b = []; + for (var _i = 0; _i < arguments.length; _i++) { + b[_i] = arguments[_i]; + } +} +secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (2256-2621) +var c = new C(); +c.doSomething(); +function forthirdthird_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +function thirdthird_part1Spread() { + var b = []; + for (var _i = 0; _i < arguments.length; _i++) { + b[_i] = arguments[_i]; + } +} +thirdthird_part1Spread.apply(void 0, __spread([10, 20, 30])); + +---------------------------------------------------------------------- +sourceMapUrl: (2621-2661) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-314):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; +declare function firstfirst_part3Spread(...b: number[]): void; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (316-578):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare function forsecondsecond_part1Rest(): void; +declare class C { + doSomething(): void; +} +declare function secondsecond_part2Spread(...b: number[]): void; +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (580-714) +declare var c: C; +declare function forthirdthird_part1Rest(): void; +declare function thirdthird_part1Spread(...b: number[]): void; + +---------------------------------------------------------------------- +sourceMapUrl: (714-756) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.js] var __rest = (this && this.__rest) || function (s, e) { var t = {}; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/multiple-emitHelpers-in-different-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/multiple-emitHelpers-in-different-projects.js index 53886c4aab3..84e9329608e 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/multiple-emitHelpers-in-different-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/multiple-emitHelpers-in-different-projects.js @@ -38,6 +38,56 @@ } } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +text: (417-661) +var s = "Hello, world"; +console.log(s); +function forfirstfirst_PART1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (661-701) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-208) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (208-250) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.js] var __rest = (this && this.__rest) || function (s, e) { var t = {}; @@ -385,6 +435,129 @@ const { b, ...rest } = { a: 10, b: 30, yy: 30 }; } } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +emitHelpers: (417-921):: typescript:read +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +---------------------------------------------------------------------- +emitHelpers: (923-1093):: typescript:spread +var __spread = (this && this.__spread) || function () { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +}; +---------------------------------------------------------------------- +prepend: (1095-1379):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +function forfirstfirst_PART1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (1381-1923):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +function secondsecond_part1Spread() { + var b = []; + for (var _i = 0; _i < arguments.length; _i++) { + b[_i] = arguments[_i]; + } +} +secondsecond_part1Spread.apply(void 0, __spread([10, 20, 30])); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (1925-2078) +var c = new C(); +c.doSomething(); +function forthirdthird_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} + +---------------------------------------------------------------------- +sourceMapUrl: (2078-2118) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-250):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (252-461):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare function secondsecond_part1Spread(...b: number[]): void; +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (463-533) +declare var c: C; +declare function forthirdthird_part1Rest(): void; + +---------------------------------------------------------------------- +sourceMapUrl: (533-575) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.js] var __rest = (this && this.__rest) || function (s, e) { var t = {}; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/multiple-prologues-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/multiple-prologues-in-all-projects.js index 21d67b6e9d9..742ae419589 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/multiple-prologues-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/multiple-prologues-in-all-projects.js @@ -67,6 +67,47 @@ } } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +prologue: (15-28):: myPrologue +"myPrologue"; +---------------------------------------------------------------------- +text: (30-157) +var s = "Hello, world"; +console.log(s); +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (157-197) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-157) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (157-199) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.js] "use strict"; "myPrologue"; @@ -397,6 +438,90 @@ console.log(s); } } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +prologue: (15-28):: myPrologue +"myPrologue"; +---------------------------------------------------------------------- +prologue: (30-44):: myPrologue2 +"myPrologue2"; +---------------------------------------------------------------------- +prologue: (46-60):: myPrologue3 +"myPrologue3"; +---------------------------------------------------------------------- +prepend: (62-229):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (231-557):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (559-595) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (595-635) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-199):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (201-344):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (346-365) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (365-407) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.js] "use strict"; "myPrologue"; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/multiple-prologues-in-different-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/multiple-prologues-in-different-projects.js index a8d28d5ac83..98a8a7d0942 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/multiple-prologues-in-different-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/multiple-prologues-in-different-projects.js @@ -52,6 +52,44 @@ } } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +text: (15-142) +var s = "Hello, world"; +console.log(s); +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (142-182) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-157) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (157-199) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.js] "use strict"; var s = "Hello, world"; @@ -343,6 +381,87 @@ console.log(s); } } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +prologue: (15-28):: myPrologue +"myPrologue"; +---------------------------------------------------------------------- +prologue: (30-44):: myPrologue2 +"myPrologue2"; +---------------------------------------------------------------------- +prepend: (46-213):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (215-541):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (543-579) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (579-619) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-199):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (201-344):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (346-365) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (365-407) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.js] "use strict"; "myPrologue"; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/shebang-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/shebang-in-all-projects.js index 27e774a02b0..46d28bb5a98 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/shebang-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/shebang-in-all-projects.js @@ -28,6 +28,41 @@ "sources": {} } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (33-160) +var s = "Hello, world"; +console.log(s); +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (160-200) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (33-190) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (190-232) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.js] #!someshebang first first_PART1 var s = "Hello, world"; @@ -286,6 +321,78 @@ console.log(s); "sources": {} } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prepend: (33-200):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (202-528):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (530-566) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (566-606) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (33-232):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (234-377):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (379-398) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (398-440) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.js] #!someshebang first first_PART1 var s = "Hello, world"; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/shebang-in-only-one-dependency-project.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/shebang-in-only-one-dependency-project.js index 9c9c306efd0..a2de2ad3878 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/shebang-in-only-one-dependency-project.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/shebang-in-only-one-dependency-project.js @@ -28,6 +28,41 @@ "sources": {} } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-127) +var s = "Hello, world"; +console.log(s); +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (127-167) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-157) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (157-199) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.js] var s = "Hello, world"; console.log(s); @@ -281,6 +316,78 @@ console.log(s); "sources": {} } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prepend: (35-202):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (204-530):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (532-568) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (568-608) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (35-234):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (236-379):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (381-400) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (400-442) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.js] #!someshebang second second_part1 var s = "Hello, world"; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/strict-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/strict-in-all-projects.js index e4753c16a71..340c1776e07 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/strict-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/strict-in-all-projects.js @@ -52,6 +52,44 @@ } } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +text: (15-142) +var s = "Hello, world"; +console.log(s); +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (142-182) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-157) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (157-199) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.js] "use strict"; var s = "Hello, world"; @@ -331,6 +369,81 @@ console.log(s); } } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +prepend: (15-182):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (184-510):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (512-548) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (548-588) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-199):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (201-344):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (346-365) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (365-407) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.js] "use strict"; var s = "Hello, world"; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/strict-in-one-dependency.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/strict-in-one-dependency.js index 8805579b1ff..c5d1a174884 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/strict-in-one-dependency.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/strict-in-one-dependency.js @@ -28,6 +28,41 @@ "sources": {} } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-127) +var s = "Hello, world"; +console.log(s); +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (127-167) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-157) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (157-199) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.js] var s = "Hello, world"; console.log(s); @@ -287,6 +322,81 @@ console.log(s); "sources": {} } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +prepend: (15-182):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (184-510):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (512-548) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (548-588) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-199):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (201-344):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (346-365) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (365-407) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.js] "use strict"; var s = "Hello, world"; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/triple-slash-refs-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/triple-slash-refs-in-all-projects.js index f5478ebcafe..30f11294846 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/triple-slash-refs-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/triple-slash-refs-in-all-projects.js @@ -34,6 +34,46 @@ "sources": {} } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-175) +var s = "Hello, world"; +console.log(s); +console.log(s); +var first_part2Const = new firstfirst_part2(); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (175-215) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +reference: (0-42):: ../tripleRef.d.ts +/// +---------------------------------------------------------------------- +text: (44-252) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare const first_part2Const: firstfirst_part2; +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (252-294) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.js] var s = "Hello, world"; console.log(s); @@ -334,6 +374,93 @@ console.log(s); "sources": {} } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prepend: (0-215):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +console.log(s); +var first_part2Const = new firstfirst_part2(); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (217-594):: /src/2/second-output.js +var second_part1Const = new secondsecond_part1(); +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (596-680) +var third_part1Const = new thirdthird_part1(); +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (680-720) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +reference: (0-45):: ../../tripleRef.d.ts +/// +---------------------------------------------------------------------- +reference: (47-101):: ../../../first/tripleRef.d.ts +/// +---------------------------------------------------------------------- +reference: (103-158):: ../../../second/tripleRef.d.ts +/// +---------------------------------------------------------------------- +prepend: (160-410):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare const first_part2Const: firstfirst_part2; +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (412-609):: /src/2/second-output.d.ts +declare const second_part1Const: secondsecond_part1; +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (611-681) +declare const third_part1Const: thirdthird_part1; +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (681-723) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.js] var s = "Hello, world"; console.log(s); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/triple-slash-refs-in-one-project.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/triple-slash-refs-in-one-project.js index 967d55e8147..36ef7a5fab2 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/triple-slash-refs-in-one-project.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/triple-slash-refs-in-one-project.js @@ -28,6 +28,41 @@ "sources": {} } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-127) +var s = "Hello, world"; +console.log(s); +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (127-167) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-157) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (157-199) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.js] var s = "Hello, world"; console.log(s); @@ -287,6 +322,83 @@ console.log(s); "sources": {} } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prepend: (0-167):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (169-546):: /src/2/second-output.js +var second_part1Const = new secondsecond_part1(); +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (548-584) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (584-624) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +reference: (0-55):: ../../../second/tripleRef.d.ts +/// +---------------------------------------------------------------------- +prepend: (57-256):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (258-455):: /src/2/second-output.d.ts +declare const second_part1Const: secondsecond_part1; +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (457-476) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (476-518) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.js] var s = "Hello, world"; console.log(s); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/when-final-project-is-not-composite-but-uses-project-references.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/when-final-project-is-not-composite-but-uses-project-references.js index 5c5ddf3d505..f8216e4c09e 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/when-final-project-is-not-composite-but-uses-project-references.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/buildInfo/when-final-project-is-not-composite-but-uses-project-references.js @@ -28,6 +28,41 @@ "sources": {} } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-127) +var s = "Hello, world"; +console.log(s); +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (127-167) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-157) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (157-199) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.js] var s = "Hello, world"; console.log(s); @@ -281,6 +316,78 @@ console.log(s); "sources": {} } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prepend: (0-167):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (169-495):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (497-533) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (533-573) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-199):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (201-344):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (346-365) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (365-407) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.js] var s = "Hello, world"; console.log(s); diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/emitHelpers-in-all-projects.js index fe72876dd0f..a46c81dd51d 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/emitHelpers-in-all-projects.js @@ -28,6 +28,42 @@ "sources": {} } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-150) +var s = "Hello, world"; +console.log(s); +function forfirstfirst_PART1Rest() { } +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (150-190) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-208) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (208-250) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/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"} @@ -431,6 +467,98 @@ function forfirstfirst_PART1Rest() { } } } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +prepend: (417-607):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +function forfirstfirst_PART1Rest() { } +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (609-1054):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +function forsecondsecond_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (1056-1209) +var c = new C(); +c.doSomething(); +function forthirdthird_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} + +---------------------------------------------------------------------- +sourceMapUrl: (1209-1249) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-250):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (252-448):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare function forsecondsecond_part1Rest(): void; +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (450-520) +declare var c: C; +declare function forthirdthird_part1Rest(): void; + +---------------------------------------------------------------------- +sourceMapUrl: (520-562) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts.map] {"version":3,"file":"third-output.d.ts","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.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;ACXtC,iBAAS,CAAC,WAET;;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AACD,iBAAS,yBAAyB,SAEjC;ACbD,cAAM,CAAC;IACH,WAAW;CAGd;;ACJD,QAAA,IAAI,CAAC,GAAU,CAAC;AAEhB,iBAAS,uBAAuB,SAE/B"} diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/emitHelpers-in-only-one-dependency-project.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/emitHelpers-in-only-one-dependency-project.js index 0d56046dbc6..77ebd05d06c 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/emitHelpers-in-only-one-dependency-project.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/emitHelpers-in-only-one-dependency-project.js @@ -38,6 +38,55 @@ } } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +text: (417-644) +var s = "Hello, world"; +console.log(s); +function forfirstfirst_PART1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (644-684) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-208) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (208-250) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/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"} @@ -493,6 +542,96 @@ const { b, ...rest } = { a: 10, b: 30, yy: 30 }; "sources": {} } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +prepend: (417-684):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +function forfirstfirst_PART1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (686-1131):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +function forsecondsecond_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (1133-1169) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (1169-1209) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-250):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (252-448):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare function forsecondsecond_part1Rest(): void; +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (450-469) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (469-511) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts.map] {"version":3,"file":"third-output.d.ts","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.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;ACbD,iBAAS,CAAC,WAET;;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AACD,iBAAS,yBAAyB,SAEjC;ACbD,cAAM,CAAC;IACH,WAAW;CAGd;;ACJD,QAAA,IAAI,CAAC,GAAU,CAAC"} diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/multiple-emitHelpers-in-all-projects.js index 449d04dc6f9..c4ee7d0b071 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/multiple-emitHelpers-in-all-projects.js @@ -45,6 +45,74 @@ } } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +emitHelpers: (0-504):: typescript:read +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +---------------------------------------------------------------------- +emitHelpers: (506-676):: typescript:spread +var __spread = (this && this.__spread) || function () { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +}; +---------------------------------------------------------------------- +text: (678-1040) +var s = "Hello, world"; +console.log(s); +function forfirstfirst_PART1Rest() { } +console.log(f()); +function f() { + return "JS does hoists"; +} +function firstfirst_part3Spread() { + var b = []; + for (var _i = 0; _i < arguments.length; _i++) { + b[_i] = arguments[_i]; + } +} +firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); + +---------------------------------------------------------------------- +sourceMapUrl: (1040-1080) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-272) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; +declare function firstfirst_part3Spread(...b: number[]): void; + +---------------------------------------------------------------------- +sourceMapUrl: (272-314) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/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"} @@ -634,6 +702,146 @@ function forfirstfirst_PART1Rest() { } } } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +emitHelpers: (0-504):: typescript:read +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +---------------------------------------------------------------------- +emitHelpers: (506-676):: typescript:spread +var __spread = (this && this.__spread) || function () { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +}; +---------------------------------------------------------------------- +emitHelpers: (678-1093):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +prepend: (1095-1497):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +function forfirstfirst_PART1Rest() { } +console.log(f()); +function f() { + return "JS does hoists"; +} +function firstfirst_part3Spread() { + var b = []; + for (var _i = 0; _i < arguments.length; _i++) { + b[_i] = arguments[_i]; + } +} +firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (1499-2160):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +function forsecondsecond_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +function secondsecond_part2Spread() { + var b = []; + for (var _i = 0; _i < arguments.length; _i++) { + b[_i] = arguments[_i]; + } +} +secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (2162-2527) +var c = new C(); +c.doSomething(); +function forthirdthird_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +function thirdthird_part1Spread() { + var b = []; + for (var _i = 0; _i < arguments.length; _i++) { + b[_i] = arguments[_i]; + } +} +thirdthird_part1Spread.apply(void 0, __spread([10, 20, 30])); + +---------------------------------------------------------------------- +sourceMapUrl: (2527-2567) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-314):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; +declare function firstfirst_part3Spread(...b: number[]): void; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (316-578):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare function forsecondsecond_part1Rest(): void; +declare class C { + doSomething(): void; +} +declare function secondsecond_part2Spread(...b: number[]): void; +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (580-714) +declare var c: C; +declare function forthirdthird_part1Rest(): void; +declare function thirdthird_part1Spread(...b: number[]): void; + +---------------------------------------------------------------------- +sourceMapUrl: (714-756) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts.map] {"version":3,"file":"third-output.d.ts","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.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;ACXtC,iBAAS,CAAC,WAET;AACD,iBAAS,sBAAsB,CAAC,GAAG,GAAG,MAAM,EAAE,QAAK;;ACHnD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AACD,iBAAS,yBAAyB,SAEjC;ACbD,cAAM,CAAC;IACH,WAAW;CAGd;AAED,iBAAS,wBAAwB,CAAC,GAAG,GAAG,MAAM,EAAE,QAAK;;ACNrD,QAAA,IAAI,CAAC,GAAU,CAAC;AAEhB,iBAAS,uBAAuB,SAE/B;AACD,iBAAS,sBAAsB,CAAC,GAAG,GAAG,MAAM,EAAE,QAAK"} diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/multiple-emitHelpers-in-different-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/multiple-emitHelpers-in-different-projects.js index f794740c851..dc4e7da2559 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/multiple-emitHelpers-in-different-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/multiple-emitHelpers-in-different-projects.js @@ -28,6 +28,42 @@ "sources": {} } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-150) +var s = "Hello, world"; +console.log(s); +function forfirstfirst_PART1Rest() { } +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (150-190) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-208) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (208-250) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/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"} @@ -443,6 +479,126 @@ function forfirstfirst_PART1Rest() { } } } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +emitHelpers: (0-504):: typescript:read +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +---------------------------------------------------------------------- +emitHelpers: (506-676):: typescript:spread +var __spread = (this && this.__spread) || function () { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +}; +---------------------------------------------------------------------- +emitHelpers: (678-1093):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +prepend: (1095-1285):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +function forfirstfirst_PART1Rest() { } +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (1287-1829):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +function secondsecond_part1Spread() { + var b = []; + for (var _i = 0; _i < arguments.length; _i++) { + b[_i] = arguments[_i]; + } +} +secondsecond_part1Spread.apply(void 0, __spread([10, 20, 30])); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (1831-1984) +var c = new C(); +c.doSomething(); +function forthirdthird_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} + +---------------------------------------------------------------------- +sourceMapUrl: (1984-2024) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-250):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (252-461):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare function secondsecond_part1Spread(...b: number[]): void; +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (463-533) +declare var c: C; +declare function forthirdthird_part1Rest(): void; + +---------------------------------------------------------------------- +sourceMapUrl: (533-575) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts.map] {"version":3,"file":"third-output.d.ts","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.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;ACXtC,iBAAS,CAAC,WAET;;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,iBAAS,wBAAwB,CAAC,GAAG,GAAG,MAAM,EAAE,QAAK;ACZrD,cAAM,CAAC;IACH,WAAW;CAGd;;ACJD,QAAA,IAAI,CAAC,GAAU,CAAC;AAEhB,iBAAS,uBAAuB,SAE/B"} diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/multiple-prologues-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/multiple-prologues-in-all-projects.js index 9f71331603e..c40f2981915 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/multiple-prologues-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/multiple-prologues-in-all-projects.js @@ -82,6 +82,49 @@ } } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +prologue: (15-29):: myPrologue5 +"myPrologue5"; +---------------------------------------------------------------------- +prologue: (31-44):: myPrologue +"myPrologue"; +---------------------------------------------------------------------- +text: (46-156) +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (156-196) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-157) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (157-199) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/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"} @@ -538,6 +581,92 @@ console.log(s); } } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +prologue: (15-29):: myPrologue5 +"myPrologue5"; +---------------------------------------------------------------------- +prologue: (31-44):: myPrologue +"myPrologue"; +---------------------------------------------------------------------- +prologue: (46-60):: myPrologue2 +"myPrologue2"; +---------------------------------------------------------------------- +prologue: (62-76):: myPrologue3 +"myPrologue3"; +---------------------------------------------------------------------- +prepend: (78-228):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (230-556):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (558-594) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (594-634) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-199):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (201-344):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (346-365) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (365-407) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts.map] {"version":3,"file":"third-output.d.ts","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.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;ACVD,iBAAS,CAAC,WAET;;ACDD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;ACVD,cAAM,CAAC;IACH,WAAW;CAGd;;ACHD,QAAA,IAAI,CAAC,GAAU,CAAC"} diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/multiple-prologues-in-different-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/multiple-prologues-in-different-projects.js index 9f623ec5a96..b32a0c35560 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/multiple-prologues-in-different-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/multiple-prologues-in-different-projects.js @@ -67,6 +67,46 @@ } } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +prologue: (15-29):: myPrologue5 +"myPrologue5"; +---------------------------------------------------------------------- +text: (31-141) +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (141-181) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-157) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (157-199) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/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"} @@ -484,6 +524,89 @@ console.log(s); } } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +prologue: (15-29):: myPrologue5 +"myPrologue5"; +---------------------------------------------------------------------- +prologue: (31-44):: myPrologue +"myPrologue"; +---------------------------------------------------------------------- +prologue: (46-60):: myPrologue2 +"myPrologue2"; +---------------------------------------------------------------------- +prepend: (62-212):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (214-540):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (542-578) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (578-618) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-199):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (201-344):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (346-365) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (365-407) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts.map] {"version":3,"file":"third-output.d.ts","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.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;ACTD,iBAAS,CAAC,WAET;;ACDD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;ACVD,cAAM,CAAC;IACH,WAAW;CAGd;;ACLD,QAAA,IAAI,CAAC,GAAU,CAAC"} diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/strict-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/strict-in-all-projects.js index 441b7aeb739..0b9f5f37f84 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/strict-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/strict-in-all-projects.js @@ -67,6 +67,46 @@ } } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +prologue: (15-28):: myPrologue +"myPrologue"; +---------------------------------------------------------------------- +text: (30-140) +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (140-180) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-157) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (157-199) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/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"} @@ -472,6 +512,83 @@ console.log(s); } } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +prologue: (15-28):: myPrologue +"myPrologue"; +---------------------------------------------------------------------- +prepend: (30-180):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (182-508):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (510-546) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (546-586) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-199):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (201-344):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (346-365) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (365-407) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts.map] {"version":3,"file":"third-output.d.ts","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.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;ACTD,iBAAS,CAAC,WAET;;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;ACVD,cAAM,CAAC;IACH,WAAW;CAGd;;ACJD,QAAA,IAAI,CAAC,GAAU,CAAC"} diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/strict-in-one-dependency.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/strict-in-one-dependency.js index 2edd4891c1c..c33a13b5d47 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/strict-in-one-dependency.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change/buildInfo/strict-in-one-dependency.js @@ -52,6 +52,43 @@ } } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +prologue: (0-13):: myPrologue +"myPrologue"; +---------------------------------------------------------------------- +text: (15-125) +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (125-165) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-157) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (157-199) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/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"} @@ -437,6 +474,83 @@ console.log(s); "sources": {} } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prologue: (0-13):: myPrologue +"myPrologue"; +---------------------------------------------------------------------- +prologue: (15-28):: use strict +"use strict"; +---------------------------------------------------------------------- +prepend: (30-180):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (182-508):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (510-546) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (546-586) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-199):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (201-344):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (346-365) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (365-407) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts.map] {"version":3,"file":"third-output.d.ts","sourceRoot":"","sources":["../../../first/first_PART1.ts","../../../first/first_part3.ts","../../../second/second_part1.ts","../../../second/second_part2.ts","../../third_part1.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;ACTD,iBAAS,CAAC,WAET;;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;ACVD,cAAM,CAAC;IACH,WAAW;CAGd;;ACJD,QAAA,IAAI,CAAC,GAAU,CAAC"} diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/baseline-sectioned-sourcemaps.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/baseline-sectioned-sourcemaps.js index b764c449559..39d9cb6cf81 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/baseline-sectioned-sourcemaps.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/baseline-sectioned-sourcemaps.js @@ -28,6 +28,48 @@ "sources": {} } +//// [/src/2/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/2/second-output.js +---------------------------------------------------------------------- +text: (0-285) +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); + +---------------------------------------------------------------------- +sourceMapUrl: (285-326) +//# sourceMappingURL=second-output.js.map +====================================================================== +====================================================================== +File:: /src/2/second-output.d.ts +---------------------------------------------------------------------- +text: (0-100) +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} + +---------------------------------------------------------------------- +sourceMapUrl: (100-143) +//# sourceMappingURL=second-output.d.ts.map +====================================================================== + //// [/src/2/second-output.d.ts] declare namespace N { } @@ -443,6 +485,40 @@ sourceFile:../second/second_part2.ts "sources": {} } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-110) +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (110-150) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-157) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (157-199) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; @@ -797,6 +873,77 @@ sourceFile:../first_part3.ts "sources": {} } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prepend: (0-150):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (152-478):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (480-516) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (516-556) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-199):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (201-344):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (346-365) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (365-407) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/emitHelpers-in-all-projects.js index 8764b2fad3a..bb944c94ffc 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/emitHelpers-in-all-projects.js @@ -38,6 +38,63 @@ } } +//// [/src/2/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/2/second-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +text: (417-821) +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +function forsecondsecond_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); + +---------------------------------------------------------------------- +sourceMapUrl: (821-862) +//# sourceMappingURL=second-output.js.map +====================================================================== +====================================================================== +File:: /src/2/second-output.d.ts +---------------------------------------------------------------------- +text: (0-153) +declare namespace N { +} +declare namespace N { +} +declare function forsecondsecond_part1Rest(): void; +declare class C { + doSomething(): void; +} + +---------------------------------------------------------------------- +sourceMapUrl: (153-196) +//# sourceMappingURL=second-output.d.ts.map +====================================================================== + //// [/src/2/second-output.d.ts] declare namespace N { } @@ -552,6 +609,55 @@ sourceFile:../second/second_part2.ts } } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +text: (417-644) +var s = "Hello, world"; +console.log(s); +function forfirstfirst_PART1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (644-684) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-208) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (208-250) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; @@ -1039,6 +1145,100 @@ const { b, ...rest } = { a: 10, b: 30, yy: 30 }; } } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +prepend: (417-684):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +function forfirstfirst_PART1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (686-1131):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +function forsecondsecond_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (1133-1286) +var c = new C(); +c.doSomething(); +function forthirdthird_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} + +---------------------------------------------------------------------- +sourceMapUrl: (1286-1326) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-250):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (252-448):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare function forsecondsecond_part1Rest(): void; +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (450-520) +declare var c: C; +declare function forthirdthird_part1Rest(): void; + +---------------------------------------------------------------------- +sourceMapUrl: (520-562) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/emitHelpers-in-only-one-dependency-project.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/emitHelpers-in-only-one-dependency-project.js index 84b77aac864..e9818b460ab 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/emitHelpers-in-only-one-dependency-project.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/emitHelpers-in-only-one-dependency-project.js @@ -38,6 +38,63 @@ } } +//// [/src/2/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/2/second-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +text: (417-821) +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +function forsecondsecond_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); + +---------------------------------------------------------------------- +sourceMapUrl: (821-862) +//# sourceMappingURL=second-output.js.map +====================================================================== +====================================================================== +File:: /src/2/second-output.d.ts +---------------------------------------------------------------------- +text: (0-153) +declare namespace N { +} +declare namespace N { +} +declare function forsecondsecond_part1Rest(): void; +declare class C { + doSomething(): void; +} + +---------------------------------------------------------------------- +sourceMapUrl: (153-196) +//# sourceMappingURL=second-output.d.ts.map +====================================================================== + //// [/src/2/second-output.d.ts] declare namespace N { } @@ -542,6 +599,42 @@ sourceFile:../second/second_part2.ts "sources": {} } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-150) +var s = "Hello, world"; +console.log(s); +function forfirstfirst_PART1Rest() { } +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (150-190) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-208) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (208-250) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; @@ -969,6 +1062,94 @@ const { b, ...rest } = { a: 10, b: 30, yy: 30 }; "sources": {} } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +prepend: (417-607):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +function forfirstfirst_PART1Rest() { } +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (609-1054):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +function forsecondsecond_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (1056-1092) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (1092-1132) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-250):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (252-448):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare function forsecondsecond_part1Rest(): void; +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (450-469) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (469-511) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/multiple-emitHelpers-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/multiple-emitHelpers-in-all-projects.js index 1fbcac58228..ded9aeb06da 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/multiple-emitHelpers-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/multiple-emitHelpers-in-all-projects.js @@ -52,6 +52,95 @@ } } +//// [/src/2/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/2/second-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +emitHelpers: (417-921):: typescript:read +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +---------------------------------------------------------------------- +emitHelpers: (923-1093):: typescript:spread +var __spread = (this && this.__spread) || function () { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +}; +---------------------------------------------------------------------- +text: (1095-1715) +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +function forsecondsecond_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +function secondsecond_part2Spread() { + var b = []; + for (var _i = 0; _i < arguments.length; _i++) { + b[_i] = arguments[_i]; + } +} +secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); + +---------------------------------------------------------------------- +sourceMapUrl: (1715-1756) +//# sourceMappingURL=second-output.js.map +====================================================================== +====================================================================== +File:: /src/2/second-output.d.ts +---------------------------------------------------------------------- +text: (0-219) +declare namespace N { +} +declare namespace N { +} +declare function forsecondsecond_part1Rest(): void; +declare class C { + doSomething(): void; +} +declare function secondsecond_part2Spread(...b: number[]): void; + +---------------------------------------------------------------------- +sourceMapUrl: (219-262) +//# sourceMappingURL=second-output.d.ts.map +====================================================================== + //// [/src/2/second-output.d.ts] declare namespace N { } @@ -755,6 +844,87 @@ sourceFile:../second/second_part2.ts } } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +emitHelpers: (417-921):: typescript:read +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +---------------------------------------------------------------------- +emitHelpers: (923-1093):: typescript:spread +var __spread = (this && this.__spread) || function () { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +}; +---------------------------------------------------------------------- +text: (1095-1534) +var s = "Hello, world"; +console.log(s); +function forfirstfirst_PART1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +console.log(f()); +function f() { + return "JS does hoists"; +} +function firstfirst_part3Spread() { + var b = []; + for (var _i = 0; _i < arguments.length; _i++) { + b[_i] = arguments[_i]; + } +} +firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); + +---------------------------------------------------------------------- +sourceMapUrl: (1534-1574) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-272) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; +declare function firstfirst_part3Spread(...b: number[]): void; + +---------------------------------------------------------------------- +sourceMapUrl: (272-314) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; @@ -1488,6 +1658,148 @@ secondsecond_part2Spread(...[10, 20, 30]); } } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +emitHelpers: (417-921):: typescript:read +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +---------------------------------------------------------------------- +emitHelpers: (923-1093):: typescript:spread +var __spread = (this && this.__spread) || function () { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +}; +---------------------------------------------------------------------- +prepend: (1095-1574):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +function forfirstfirst_PART1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +console.log(f()); +function f() { + return "JS does hoists"; +} +function firstfirst_part3Spread() { + var b = []; + for (var _i = 0; _i < arguments.length; _i++) { + b[_i] = arguments[_i]; + } +} +firstfirst_part3Spread.apply(void 0, __spread([10, 20, 30])); +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (1576-2237):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +function forsecondsecond_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +function secondsecond_part2Spread() { + var b = []; + for (var _i = 0; _i < arguments.length; _i++) { + b[_i] = arguments[_i]; + } +} +secondsecond_part2Spread.apply(void 0, __spread([10, 20, 30])); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (2239-2604) +var c = new C(); +c.doSomething(); +function forthirdthird_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +function thirdthird_part1Spread() { + var b = []; + for (var _i = 0; _i < arguments.length; _i++) { + b[_i] = arguments[_i]; + } +} +thirdthird_part1Spread.apply(void 0, __spread([10, 20, 30])); + +---------------------------------------------------------------------- +sourceMapUrl: (2604-2644) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-314):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; +declare function firstfirst_part3Spread(...b: number[]): void; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (316-578):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare function forsecondsecond_part1Rest(): void; +declare class C { + doSomething(): void; +} +declare function secondsecond_part2Spread(...b: number[]): void; +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (580-714) +declare var c: C; +declare function forthirdthird_part1Rest(): void; +declare function thirdthird_part1Spread(...b: number[]): void; + +---------------------------------------------------------------------- +sourceMapUrl: (714-756) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/multiple-emitHelpers-in-different-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/multiple-emitHelpers-in-different-projects.js index 45e6d20311a..f054772ce84 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/multiple-emitHelpers-in-different-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/multiple-emitHelpers-in-different-projects.js @@ -45,6 +45,80 @@ } } +//// [/src/2/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/2/second-output.js +---------------------------------------------------------------------- +emitHelpers: (0-504):: typescript:read +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +---------------------------------------------------------------------- +emitHelpers: (506-676):: typescript:spread +var __spread = (this && this.__spread) || function () { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +}; +---------------------------------------------------------------------- +text: (678-1179) +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +function secondsecond_part1Spread() { + var b = []; + for (var _i = 0; _i < arguments.length; _i++) { + b[_i] = arguments[_i]; + } +} +secondsecond_part1Spread.apply(void 0, __spread([10, 20, 30])); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); + +---------------------------------------------------------------------- +sourceMapUrl: (1179-1220) +//# sourceMappingURL=second-output.js.map +====================================================================== +====================================================================== +File:: /src/2/second-output.d.ts +---------------------------------------------------------------------- +text: (0-166) +declare namespace N { +} +declare namespace N { +} +declare function secondsecond_part1Spread(...b: number[]): void; +declare class C { + doSomething(): void; +} + +---------------------------------------------------------------------- +sourceMapUrl: (166-209) +//# sourceMappingURL=second-output.d.ts.map +====================================================================== + //// [/src/2/second-output.d.ts] declare namespace N { } @@ -645,6 +719,55 @@ sourceFile:../second/second_part2.ts } } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +text: (417-644) +var s = "Hello, world"; +console.log(s); +function forfirstfirst_PART1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (644-684) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-208) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (208-250) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; @@ -1163,6 +1286,128 @@ secondsecond_part1Spread(...[10, 20, 30]); } } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +emitHelpers: (0-415):: typescript:rest +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +}; +---------------------------------------------------------------------- +emitHelpers: (417-921):: typescript:read +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +---------------------------------------------------------------------- +emitHelpers: (923-1093):: typescript:spread +var __spread = (this && this.__spread) || function () { + for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); + return ar; +}; +---------------------------------------------------------------------- +prepend: (1095-1362):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +function forfirstfirst_PART1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (1364-1906):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +function secondsecond_part1Spread() { + var b = []; + for (var _i = 0; _i < arguments.length; _i++) { + b[_i] = arguments[_i]; + } +} +secondsecond_part1Spread.apply(void 0, __spread([10, 20, 30])); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (1908-2061) +var c = new C(); +c.doSomething(); +function forthirdthird_part1Rest() { + var _a = { a: 10, b: 30, yy: 30 }, b = _a.b, rest = __rest(_a, ["b"]); +} + +---------------------------------------------------------------------- +sourceMapUrl: (2061-2101) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-250):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function forfirstfirst_PART1Rest(): void; +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (252-461):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare function secondsecond_part1Spread(...b: number[]): void; +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (463-533) +declare var c: C; +declare function forthirdthird_part1Rest(): void; + +---------------------------------------------------------------------- +sourceMapUrl: (533-575) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/multiple-prologues-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/multiple-prologues-in-all-projects.js index cb609538dac..ed9aaa9b21f 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/multiple-prologues-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/multiple-prologues-in-all-projects.js @@ -88,6 +88,57 @@ } } +//// [/src/2/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/2/second-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +prologue: (15-28):: myPrologue +"myPrologue"; +---------------------------------------------------------------------- +prologue: (30-44):: myPrologue2 +"myPrologue2"; +---------------------------------------------------------------------- +text: (46-331) +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); + +---------------------------------------------------------------------- +sourceMapUrl: (331-372) +//# sourceMappingURL=second-output.js.map +====================================================================== +====================================================================== +File:: /src/2/second-output.d.ts +---------------------------------------------------------------------- +text: (0-100) +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} + +---------------------------------------------------------------------- +sourceMapUrl: (100-143) +//# sourceMappingURL=second-output.d.ts.map +====================================================================== + //// [/src/2/second-output.d.ts] declare namespace N { } @@ -581,6 +632,46 @@ sourceFile:../second/second_part2.ts } } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +prologue: (15-28):: myPrologue +"myPrologue"; +---------------------------------------------------------------------- +text: (30-140) +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (140-180) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-157) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (157-199) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; @@ -1091,6 +1182,89 @@ class C { } } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +prologue: (15-28):: myPrologue +"myPrologue"; +---------------------------------------------------------------------- +prologue: (30-44):: myPrologue2 +"myPrologue2"; +---------------------------------------------------------------------- +prologue: (46-60):: myPrologue3 +"myPrologue3"; +---------------------------------------------------------------------- +prepend: (62-212):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (214-540):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (542-578) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (578-618) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-199):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (201-344):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (346-365) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (365-407) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/multiple-prologues-in-different-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/multiple-prologues-in-different-projects.js index aa8cea40844..484e9b11164 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/multiple-prologues-in-different-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/multiple-prologues-in-different-projects.js @@ -73,6 +73,54 @@ } } +//// [/src/2/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/2/second-output.js +---------------------------------------------------------------------- +prologue: (0-13):: myPrologue +"myPrologue"; +---------------------------------------------------------------------- +prologue: (15-29):: myPrologue2 +"myPrologue2"; +---------------------------------------------------------------------- +text: (31-316) +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); + +---------------------------------------------------------------------- +sourceMapUrl: (316-357) +//# sourceMappingURL=second-output.js.map +====================================================================== +====================================================================== +File:: /src/2/second-output.d.ts +---------------------------------------------------------------------- +text: (0-100) +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} + +---------------------------------------------------------------------- +sourceMapUrl: (100-143) +//# sourceMappingURL=second-output.d.ts.map +====================================================================== + //// [/src/2/second-output.d.ts] declare namespace N { } @@ -549,6 +597,43 @@ sourceFile:../second/second_part2.ts } } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +text: (15-125) +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (125-165) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-157) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (157-199) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; @@ -987,6 +1072,86 @@ class C { } } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +prologue: (15-28):: myPrologue +"myPrologue"; +---------------------------------------------------------------------- +prologue: (30-44):: myPrologue2 +"myPrologue2"; +---------------------------------------------------------------------- +prepend: (46-196):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (198-524):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (526-562) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (562-602) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-199):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (201-344):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (346-365) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (365-407) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/shebang-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/shebang-in-all-projects.js index be48b704844..6d4aca89204 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/shebang-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/shebang-in-all-projects.js @@ -28,6 +28,48 @@ "sources": {} } +//// [/src/2/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/2/second-output.js +---------------------------------------------------------------------- +text: (35-320) +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); + +---------------------------------------------------------------------- +sourceMapUrl: (320-361) +//# sourceMappingURL=second-output.js.map +====================================================================== +====================================================================== +File:: /src/2/second-output.d.ts +---------------------------------------------------------------------- +text: (35-135) +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} + +---------------------------------------------------------------------- +sourceMapUrl: (135-178) +//# sourceMappingURL=second-output.d.ts.map +====================================================================== + //// [/src/2/second-output.d.ts] #!someshebang second second_part1 declare namespace N { @@ -449,6 +491,40 @@ sourceFile:../second/second_part2.ts "sources": {} } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (33-143) +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (143-183) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (33-190) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (190-232) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] #!someshebang first first_PART1 interface TheFirst { @@ -845,6 +921,77 @@ namespace N { "sources": {} } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prepend: (33-183):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (185-511):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (513-549) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (549-589) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (33-232):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (234-377):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (379-398) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (398-440) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] #!someshebang first first_PART1 interface TheFirst { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/shebang-in-only-one-dependency-project.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/shebang-in-only-one-dependency-project.js index 59c7b69c8b0..d1a6d46ff74 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/shebang-in-only-one-dependency-project.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/shebang-in-only-one-dependency-project.js @@ -28,6 +28,48 @@ "sources": {} } +//// [/src/2/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/2/second-output.js +---------------------------------------------------------------------- +text: (35-320) +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); + +---------------------------------------------------------------------- +sourceMapUrl: (320-361) +//# sourceMappingURL=second-output.js.map +====================================================================== +====================================================================== +File:: /src/2/second-output.d.ts +---------------------------------------------------------------------- +text: (35-135) +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} + +---------------------------------------------------------------------- +sourceMapUrl: (135-178) +//# sourceMappingURL=second-output.d.ts.map +====================================================================== + //// [/src/2/second-output.d.ts] #!someshebang second second_part1 declare namespace N { @@ -449,6 +491,40 @@ sourceFile:../second/second_part2.ts "sources": {} } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-110) +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (110-150) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-157) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (157-199) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; @@ -818,6 +894,77 @@ namespace N { "sources": {} } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prepend: (35-185):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (187-513):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (515-551) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (551-591) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (35-234):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (236-379):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (381-400) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (400-442) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] #!someshebang second second_part1 interface TheFirst { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/strict-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/strict-in-all-projects.js index 132518f3a36..923333d6974 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/strict-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/strict-in-all-projects.js @@ -52,6 +52,51 @@ } } +//// [/src/2/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/2/second-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +text: (15-300) +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); + +---------------------------------------------------------------------- +sourceMapUrl: (300-341) +//# sourceMappingURL=second-output.js.map +====================================================================== +====================================================================== +File:: /src/2/second-output.d.ts +---------------------------------------------------------------------- +text: (0-100) +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} + +---------------------------------------------------------------------- +sourceMapUrl: (100-143) +//# sourceMappingURL=second-output.d.ts.map +====================================================================== + //// [/src/2/second-output.d.ts] declare namespace N { } @@ -493,6 +538,43 @@ sourceFile:../second/second_part2.ts } } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +text: (15-125) +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (125-165) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-157) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (157-199) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; @@ -913,6 +995,80 @@ sourceFile:../first_part3.ts } } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +prepend: (15-165):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (167-493):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (495-531) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (531-571) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-199):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (201-344):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (346-365) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (365-407) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/strict-in-one-dependency.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/strict-in-one-dependency.js index 8dbd5077d2c..28fa092d002 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/strict-in-one-dependency.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/strict-in-one-dependency.js @@ -52,6 +52,51 @@ } } +//// [/src/2/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/2/second-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +text: (15-300) +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); + +---------------------------------------------------------------------- +sourceMapUrl: (300-341) +//# sourceMappingURL=second-output.js.map +====================================================================== +====================================================================== +File:: /src/2/second-output.d.ts +---------------------------------------------------------------------- +text: (0-100) +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} + +---------------------------------------------------------------------- +sourceMapUrl: (100-143) +//# sourceMappingURL=second-output.d.ts.map +====================================================================== + //// [/src/2/second-output.d.ts] declare namespace N { } @@ -469,6 +514,40 @@ sourceFile:../second/second_part2.ts "sources": {} } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-110) +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (110-150) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-157) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (157-199) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; @@ -847,6 +926,80 @@ sourceFile:../first_part3.ts "sources": {} } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prologue: (0-13):: use strict +"use strict"; +---------------------------------------------------------------------- +prepend: (15-165):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (167-493):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (495-531) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (531-571) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-199):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (201-344):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (346-365) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (365-407) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] interface TheFirst { none: any; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/triple-slash-refs-in-all-projects.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/triple-slash-refs-in-all-projects.js index 09c66ce4f3b..fec3fa5cb54 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/triple-slash-refs-in-all-projects.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/triple-slash-refs-in-all-projects.js @@ -34,6 +34,53 @@ "sources": {} } +//// [/src/2/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/2/second-output.js +---------------------------------------------------------------------- +text: (0-336) +var second_part1Const = new secondsecond_part1(); +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); + +---------------------------------------------------------------------- +sourceMapUrl: (336-377) +//# sourceMappingURL=second-output.js.map +====================================================================== +====================================================================== +File:: /src/2/second-output.d.ts +---------------------------------------------------------------------- +reference: (0-49):: ../second/tripleRef.d.ts +/// +---------------------------------------------------------------------- +text: (51-205) +declare const second_part1Const: secondsecond_part1; +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} + +---------------------------------------------------------------------- +sourceMapUrl: (205-248) +//# sourceMappingURL=second-output.d.ts.map +====================================================================== + //// [/src/2/second-output.d.ts] /// declare const second_part1Const: secondsecond_part1; @@ -509,6 +556,45 @@ sourceFile:../second/second_part2.ts "sources": {} } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-158) +var s = "Hello, world"; +console.log(s); +var first_part2Const = new firstfirst_part2(); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (158-198) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +reference: (0-42):: ../tripleRef.d.ts +/// +---------------------------------------------------------------------- +text: (44-252) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare const first_part2Const: firstfirst_part2; +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (252-294) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] /// interface TheFirst { @@ -966,6 +1052,92 @@ declare class secondsecond_part1 { } "sources": {} } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prepend: (0-198):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +var first_part2Const = new firstfirst_part2(); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (200-577):: /src/2/second-output.js +var second_part1Const = new secondsecond_part1(); +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (579-663) +var third_part1Const = new thirdthird_part1(); +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (663-703) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +reference: (0-45):: ../../tripleRef.d.ts +/// +---------------------------------------------------------------------- +reference: (47-101):: ../../../first/tripleRef.d.ts +/// +---------------------------------------------------------------------- +reference: (103-158):: ../../../second/tripleRef.d.ts +/// +---------------------------------------------------------------------- +prepend: (160-410):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare const first_part2Const: firstfirst_part2; +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (412-609):: /src/2/second-output.d.ts +declare const second_part1Const: secondsecond_part1; +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (611-681) +declare const third_part1Const: thirdthird_part1; +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (681-723) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] /// /// diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/triple-slash-refs-in-one-project.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/triple-slash-refs-in-one-project.js index 58151e980b9..c0ee8fabf5f 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/triple-slash-refs-in-one-project.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/triple-slash-refs-in-one-project.js @@ -34,6 +34,53 @@ "sources": {} } +//// [/src/2/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/2/second-output.js +---------------------------------------------------------------------- +text: (0-336) +var second_part1Const = new secondsecond_part1(); +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); + +---------------------------------------------------------------------- +sourceMapUrl: (336-377) +//# sourceMappingURL=second-output.js.map +====================================================================== +====================================================================== +File:: /src/2/second-output.d.ts +---------------------------------------------------------------------- +reference: (0-49):: ../second/tripleRef.d.ts +/// +---------------------------------------------------------------------- +text: (51-205) +declare const second_part1Const: secondsecond_part1; +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} + +---------------------------------------------------------------------- +sourceMapUrl: (205-248) +//# sourceMappingURL=second-output.d.ts.map +====================================================================== + //// [/src/2/second-output.d.ts] /// declare const second_part1Const: secondsecond_part1; @@ -503,6 +550,40 @@ sourceFile:../second/second_part2.ts "sources": {} } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-110) +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (110-150) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-157) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (157-199) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; @@ -882,6 +963,82 @@ declare class secondsecond_part1 { } "sources": {} } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prepend: (0-150):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (152-529):: /src/2/second-output.js +var second_part1Const = new secondsecond_part1(); +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (531-567) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (567-607) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +reference: (0-55):: ../../../second/tripleRef.d.ts +/// +---------------------------------------------------------------------- +prepend: (57-256):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (258-455):: /src/2/second-output.d.ts +declare const second_part1Const: secondsecond_part1; +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (457-476) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (476-518) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] /// interface TheFirst { diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/when-final-project-is-not-composite-but-uses-project-references.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/when-final-project-is-not-composite-but-uses-project-references.js index 3a9e82dd6d3..a3920eb7315 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/when-final-project-is-not-composite-but-uses-project-references.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-Build/buildInfo/when-final-project-is-not-composite-but-uses-project-references.js @@ -28,6 +28,48 @@ "sources": {} } +//// [/src/2/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/2/second-output.js +---------------------------------------------------------------------- +text: (0-285) +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); + +---------------------------------------------------------------------- +sourceMapUrl: (285-326) +//# sourceMappingURL=second-output.js.map +====================================================================== +====================================================================== +File:: /src/2/second-output.d.ts +---------------------------------------------------------------------- +text: (0-100) +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} + +---------------------------------------------------------------------- +sourceMapUrl: (100-143) +//# sourceMappingURL=second-output.d.ts.map +====================================================================== + //// [/src/2/second-output.d.ts] declare namespace N { } @@ -443,6 +485,40 @@ sourceFile:../second/second_part2.ts "sources": {} } +//// [/src/first/bin/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/first/bin/first-output.js +---------------------------------------------------------------------- +text: (0-110) +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} + +---------------------------------------------------------------------- +sourceMapUrl: (110-150) +//# sourceMappingURL=first-output.js.map +====================================================================== +====================================================================== +File:: /src/first/bin/first-output.d.ts +---------------------------------------------------------------------- +text: (0-157) +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; + +---------------------------------------------------------------------- +sourceMapUrl: (157-199) +//# sourceMappingURL=first-output.d.ts.map +====================================================================== + //// [/src/first/bin/first-output.d.ts] interface TheFirst { none: any; @@ -797,6 +873,77 @@ sourceFile:../first_part3.ts "sources": {} } +//// [/src/third/thirdjs/output/.tsbuildinfo.baseline.txt] +====================================================================== +File:: /src/third/thirdjs/output/third-output.js +---------------------------------------------------------------------- +prepend: (0-150):: /src/first/bin/first-output.js +var s = "Hello, world"; +console.log(s); +console.log(f()); +function f() { + return "JS does hoists"; +} +//# sourceMappingURL=first-output.js.map +---------------------------------------------------------------------- +prepend: (152-478):: /src/2/second-output.js +var N; +(function (N) { + function f() { + console.log('testing'); + } + f(); +})(N || (N = {})); +var C = (function () { + function C() { + } + C.prototype.doSomething = function () { + console.log("something got done"); + }; + return C; +}()); +//# sourceMappingURL=second-output.js.map +---------------------------------------------------------------------- +text: (480-516) +var c = new C(); +c.doSomething(); + +---------------------------------------------------------------------- +sourceMapUrl: (516-556) +//# sourceMappingURL=third-output.js.map +====================================================================== +====================================================================== +File:: /src/third/thirdjs/output/third-output.d.ts +---------------------------------------------------------------------- +prepend: (0-199):: /src/first/bin/first-output.d.ts +interface TheFirst { + none: any; +} +declare const s = "Hello, world"; +interface NoJsForHereEither { + none: any; +} +declare function f(): string; +//# sourceMappingURL=first-output.d.ts.map +---------------------------------------------------------------------- +prepend: (201-344):: /src/2/second-output.d.ts +declare namespace N { +} +declare namespace N { +} +declare class C { + doSomething(): void; +} +//# sourceMappingURL=second-output.d.ts.map +---------------------------------------------------------------------- +text: (346-365) +declare var c: C; + +---------------------------------------------------------------------- +sourceMapUrl: (365-407) +//# sourceMappingURL=third-output.d.ts.map +====================================================================== + //// [/src/third/thirdjs/output/third-output.d.ts] interface TheFirst { none: any;