diff --git a/src/compiler/builder.ts b/src/compiler/builder.ts index 5daf14d4a75..441e9bbcfc9 100644 --- a/src/compiler/builder.ts +++ b/src/compiler/builder.ts @@ -137,7 +137,7 @@ namespace ts { */ emittedBuildInfo?: boolean; /** - * Already seen affected files + * Already seen emitted files */ seenEmittedFiles: Map | undefined; /** @@ -329,7 +329,6 @@ namespace ts { handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken, computeHash); return affectedFile; } - seenAffectedFiles.set(affectedFile.path, true); affectedFilesIndex++; } @@ -549,7 +548,7 @@ namespace ts { * This is called after completing operation on the next affected file. * The operations here are postponed to ensure that cancellation during the iteration is handled correctly */ - function doneWithAffectedFile(state: BuilderProgramState, affected: SourceFile | Program, isPendingEmit?: boolean, isBuildInfoEmit?: boolean) { + function doneWithAffectedFile(state: BuilderProgramState, affected: SourceFile | Program, isPendingEmit?: boolean, isBuildInfoEmit?: boolean, isEmitResult?: boolean) { if (isBuildInfoEmit) { state.emittedBuildInfo = true; } @@ -559,6 +558,9 @@ namespace ts { } else { state.seenAffectedFiles!.set((affected as SourceFile).path, true); + if (isEmitResult) { + (state.seenEmittedFiles || (state.seenEmittedFiles = createMap())).set((affected as SourceFile).path, true); + } if (isPendingEmit) { state.affectedFilesPendingEmitIndex!++; } @@ -576,6 +578,14 @@ namespace ts { return { result, affected }; } + /** + * Returns the result with affected file + */ + function toAffectedFileEmitResult(state: BuilderProgramState, result: EmitResult, affected: SourceFile | Program, isPendingEmit?: boolean, isBuildInfoEmit?: boolean): AffectedFileResult { + doneWithAffectedFile(state, affected, isPendingEmit, isBuildInfoEmit, /*isEmitResult*/ true); + return { result, affected }; + } + /** * Gets the semantic diagnostics either from cache if present, or otherwise from program and caches it * Note that it is assumed that the when asked about semantic diagnostics, the file has been taken out of affected files/changed file set @@ -849,7 +859,7 @@ namespace ts { } const affected = Debug.assertDefined(state.program); - return toAffectedFileResult( + return toAffectedFileEmitResult( state, // When whole program is affected, do emit only once (eg when --out or --outFile is specified) // Otherwise just affected file @@ -872,14 +882,14 @@ namespace ts { } } - return toAffectedFileResult( + return toAffectedFileEmitResult( state, // When whole program is affected, do emit only once (eg when --out or --outFile is specified) // Otherwise just affected file Debug.assertDefined(state.program).emit(affected === state.program ? undefined : affected as SourceFile, writeFile || maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers), affected, - isPendingEmitFile - ); + isPendingEmitFile, + ); } /** @@ -1036,7 +1046,7 @@ namespace ts { compilerOptions: convertFromReusableCompilerOptions(program.options, toAbsolutePath), referencedMap: getMapOfReferencedSet(program.referencedMap, toPath), exportedModulesMap: getMapOfReferencedSet(program.exportedModulesMap, toPath), - semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && arrayToMap(program.semanticDiagnosticsPerFile, value => isString(value) ? value : value[0], value => isString(value) ? emptyArray : value[1]), + semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && arrayToMap(program.semanticDiagnosticsPerFile, value => toPath(isString(value) ? value : value[0]), value => isString(value) ? emptyArray : value[1]), hasReusableDiagnostic: true }; return { diff --git a/src/compiler/builderState.ts b/src/compiler/builderState.ts index 54c3cec3b72..a76365311a2 100644 --- a/src/compiler/builderState.ts +++ b/src/compiler/builderState.ts @@ -345,8 +345,13 @@ namespace ts.BuilderState { } else { const emitOutput = getFileEmitOutput(programOfThisState, sourceFile, /*emitOnlyDtsFiles*/ true, cancellationToken); - if (emitOutput.outputFiles && emitOutput.outputFiles.length > 0) { - latestSignature = computeHash(emitOutput.outputFiles[0].text); + const firstDts = emitOutput.outputFiles && + programOfThisState.getCompilerOptions().declarationMap ? + emitOutput.outputFiles.length > 1 ? emitOutput.outputFiles[1] : undefined : + emitOutput.outputFiles.length > 0 ? emitOutput.outputFiles[0] : undefined; + if (firstDts) { + Debug.assert(fileExtensionIs(firstDts.name, Extension.Dts), "File extension for signature expected to be dts", () => `Found: ${getAnyExtensionFromPath(firstDts.name)} for ${firstDts.name}:: All output files: ${JSON.stringify(emitOutput.outputFiles.map(f => f.name))}`); + latestSignature = computeHash(firstDts.text); if (exportedModulesMapCache && latestSignature !== prevSignature) { updateExportedModules(sourceFile, emitOutput.exportedModulesFromDeclarationEmit, exportedModulesMapCache); } diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index c49476a6142..98a110751ec 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -155,6 +155,7 @@ namespace ts { } function getOutputJSFileName(inputFileName: string, configFile: ParsedCommandLine, ignoreCase: boolean) { + if (configFile.options.emitDeclarationOnly) return undefined; const isJsonFile = fileExtensionIs(inputFileName, Extension.Json); const outputFileName = changeExtension( getOutputPathWithoutChangingExt(inputFileName, configFile, ignoreCase, configFile.options.outDir), @@ -187,7 +188,7 @@ namespace ts { const js = getOutputJSFileName(inputFileName, configFile, ignoreCase); addOutput(js); if (fileExtensionIs(inputFileName, Extension.Json)) continue; - if (configFile.options.sourceMap) { + if (js && configFile.options.sourceMap) { addOutput(`${js}.map`); } if (getEmitDeclarations(configFile.options) && hasTSFileExtension(inputFileName)) { @@ -214,6 +215,10 @@ namespace ts { if (fileExtensionIs(inputFileName, Extension.Dts)) continue; const jsFilePath = getOutputJSFileName(inputFileName, configFile, ignoreCase); if (jsFilePath) return jsFilePath; + if (fileExtensionIs(inputFileName, Extension.Json)) continue; + if (getEmitDeclarations(configFile.options) && hasTSFileExtension(inputFileName)) { + return getOutputDeclarationFileName(inputFileName, configFile, ignoreCase); + } } const buildInfoPath = getOutputPathForBuildInfo(configFile.options); if (buildInfoPath) return buildInfoPath; diff --git a/src/harness/fakes.ts b/src/harness/fakes.ts index 3bd17044730..63426bddb48 100644 --- a/src/harness/fakes.ts +++ b/src/harness/fakes.ts @@ -545,6 +545,10 @@ ${indentText}${text}`; super.writeFile(fileName, ts.getBuildInfoText(buildInfo), writeByteOrderMark); } + createHash(data: string) { + return `${ts.generateDjb2Hash(data)}-${data}`; + } + now() { return new Date(this.sys.vfs.time()); } @@ -571,6 +575,15 @@ Actual: ${JSON.stringify(actual, /*replacer*/ undefined, " ")} Expected: ${JSON.stringify(expected, /*replacer*/ undefined, " ")}`); } + assertErrors(...expectedDiagnostics: ExpectedErrorDiagnostic[]) { + const actual = this.diagnostics.filter(d => d.kind === DiagnosticKind.Error).map(diagnosticToText); + const expected = expectedDiagnostics.map(expectedDiagnosticToText); + assert.deepEqual(actual, expected, `Diagnostics arrays did not match: +Actual: ${JSON.stringify(actual, /*replacer*/ undefined, " ")} +Expected: ${JSON.stringify(expected, /*replacer*/ undefined, " ")} +Actual All:: ${JSON.stringify(this.diagnostics.slice().map(diagnosticToText), /*replacer*/ undefined, " ")}`); + } + printDiagnostics(header = "== Diagnostics ==") { const out = ts.createDiagnosticReporter(ts.sys); ts.sys.write(header + "\r\n"); diff --git a/src/services/formatting/smartIndenter.ts b/src/services/formatting/smartIndenter.ts index 5958190169a..6cc654453e4 100644 --- a/src/services/formatting/smartIndenter.ts +++ b/src/services/formatting/smartIndenter.ts @@ -540,10 +540,14 @@ namespace ts.formatting { return true; case SyntaxKind.VariableDeclaration: case SyntaxKind.PropertyAssignment: + case SyntaxKind.BinaryExpression: if (!settings.indentMultiLineObjectLiteralBeginningOnBlankLine && sourceFile && childKind === SyntaxKind.ObjectLiteralExpression) { // TODO: GH#18217 return rangeIsOnOneLine(sourceFile, child!); } - return true; + if (parent.kind !== SyntaxKind.BinaryExpression) { + return true; + } + break; case SyntaxKind.DoStatement: case SyntaxKind.WhileStatement: case SyntaxKind.ForInStatement: diff --git a/src/testRunner/tsconfig.json b/src/testRunner/tsconfig.json index c395b05e154..db9e96e1ad2 100644 --- a/src/testRunner/tsconfig.json +++ b/src/testRunner/tsconfig.json @@ -94,6 +94,7 @@ "unittests/tsbuild/amdModulesWithOut.ts", "unittests/tsbuild/containerOnlyReferenced.ts", "unittests/tsbuild/demo.ts", + "unittests/tsbuild/emitDeclarationOnly.ts", "unittests/tsbuild/emptyFiles.ts", "unittests/tsbuild/graphOrdering.ts", "unittests/tsbuild/inferredTypeFromTransitiveModule.ts", diff --git a/src/testRunner/unittests/tsbuild/amdModulesWithOut.ts b/src/testRunner/unittests/tsbuild/amdModulesWithOut.ts index 2834dbddb60..79f5605d235 100644 --- a/src/testRunner/unittests/tsbuild/amdModulesWithOut.ts +++ b/src/testRunner/unittests/tsbuild/amdModulesWithOut.ts @@ -77,7 +77,7 @@ namespace ts { [outputFiles[project.lib][ext.buildinfo], outputFiles[project.lib][ext.js], outputFiles[project.lib][ext.dts]], [outputFiles[project.app][ext.buildinfo], outputFiles[project.app][ext.js], outputFiles[project.app][ext.dts]] ], - lastProjectOutputJs: outputFiles[project.app][ext.js], + lastProjectOutput: outputFiles[project.app][ext.js], initialBuild: { modifyFs }, @@ -231,7 +231,7 @@ ${internal} export enum internalEnum { a, b, c }`); [libOutputFile[ext.buildinfo], libOutputFile[ext.js], libOutputFile[ext.dts]], [outputFiles[project.app][ext.buildinfo], outputFiles[project.app][ext.js], outputFiles[project.app][ext.dts]] ], - lastProjectOutputJs: outputFiles[project.app][ext.js], + lastProjectOutput: outputFiles[project.app][ext.js], initialBuild: { modifyFs, expectedDiagnostics: [ diff --git a/src/testRunner/unittests/tsbuild/emitDeclarationOnly.ts b/src/testRunner/unittests/tsbuild/emitDeclarationOnly.ts new file mode 100644 index 00000000000..1999737a50f --- /dev/null +++ b/src/testRunner/unittests/tsbuild/emitDeclarationOnly.ts @@ -0,0 +1,109 @@ +namespace ts { + describe("unittests:: tsbuild:: on project with emitDeclarationOnly set to true", () => { + let projFs: vfs.FileSystem; + const { time, tick } = getTime(); + before(() => { + projFs = loadProjectFromDisk("tests/projects/emitDeclarationOnly", time); + }); + after(() => { + projFs = undefined!; + }); + + function verifyEmitDeclarationOnly(disableMap?: true) { + verifyTsbuildOutput({ + scenario: `only dts output in circular import project with emitDeclarationOnly${disableMap ? "" : " and declarationMap"}`, + projFs: () => projFs, + time, + tick, + proj: "emitDeclarationOnly", + rootNames: ["/src"], + lastProjectOutput: `/src/lib/index.d.ts`, + outputFiles: [ + "/src/lib/a.d.ts", + "/src/lib/b.d.ts", + "/src/lib/c.d.ts", + "/src/lib/index.d.ts", + "/src/tsconfig.tsbuildinfo", + ...(disableMap ? emptyArray : [ + "/src/lib/a.d.ts.map", + "/src/lib/b.d.ts.map", + "/src/lib/c.d.ts.map", + "/src/lib/index.d.ts.map" + ]) + ], + initialBuild: { + modifyFs: disableMap ? + (fs => replaceText(fs, "/src/tsconfig.json", `"declarationMap": true,`, "")) : + noop, + expectedDiagnostics: [ + getExpectedDiagnosticForProjectsInBuild("src/tsconfig.json"), + [Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, "src/tsconfig.json", "src/lib/a.d.ts"], + [Diagnostics.Building_project_0, "/src/tsconfig.json"] + ] + }, + incrementalDtsChangedBuild: { + modifyFs: fs => replaceText(fs, "/src/src/a.ts", "b: B;", "b: B; foo: any;"), + expectedDiagnostics: [ + getExpectedDiagnosticForProjectsInBuild("src/tsconfig.json"), + [Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, "src/tsconfig.json", "src/lib/a.d.ts", "src/src/a.ts"], + [Diagnostics.Building_project_0, "/src/tsconfig.json"] + ] + }, + baselineOnly: true, + verifyDiagnostics: true + }); + } + verifyEmitDeclarationOnly(); + verifyEmitDeclarationOnly(/*disableMap*/ true); + + verifyTsbuildOutput({ + scenario: `only dts output in non circular imports project with emitDeclarationOnly`, + projFs: () => projFs, + time, + tick, + proj: "emitDeclarationOnly", + rootNames: ["/src"], + lastProjectOutput: `/src/lib/a.d.ts`, + outputFiles: [ + "/src/lib/a.d.ts", + "/src/lib/b.d.ts", + "/src/lib/c.d.ts", + "/src/tsconfig.tsbuildinfo", + "/src/lib/a.d.ts.map", + "/src/lib/b.d.ts.map", + "/src/lib/c.d.ts.map", + ], + initialBuild: { + modifyFs: fs => { + fs.rimrafSync("/src/src/index.ts"); + replaceText(fs, "/src/src/a.ts", `import { B } from "./b";`, `export class B { prop = "hello"; }`); + }, + expectedDiagnostics: [ + getExpectedDiagnosticForProjectsInBuild("src/tsconfig.json"), + [Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, "src/tsconfig.json", "src/lib/a.d.ts"], + [Diagnostics.Building_project_0, "/src/tsconfig.json"] + ] + }, + incrementalDtsChangedBuild: { + modifyFs: fs => replaceText(fs, "/src/src/a.ts", "b: B;", "b: B; foo: any;"), + expectedDiagnostics: [ + getExpectedDiagnosticForProjectsInBuild("src/tsconfig.json"), + [Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, "src/tsconfig.json", "src/lib/a.d.ts", "src/src/a.ts"], + [Diagnostics.Building_project_0, "/src/tsconfig.json"] + ] + }, + incrementalDtsUnchangedBuild: { + modifyFs: fs => replaceText(fs, "/src/src/a.ts", "export interface A {", `class C { } +export interface A {`), + expectedDiagnostics: [ + getExpectedDiagnosticForProjectsInBuild("src/tsconfig.json"), + [Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, "src/tsconfig.json", "src/lib/a.d.ts", "src/src/a.ts"], + [Diagnostics.Building_project_0, "/src/tsconfig.json"], + [Diagnostics.Updating_unchanged_output_timestamps_of_project_0, "/src/tsconfig.json"] + ] + }, + baselineOnly: true, + verifyDiagnostics: true + }); + }); +} diff --git a/src/testRunner/unittests/tsbuild/helpers.ts b/src/testRunner/unittests/tsbuild/helpers.ts index 1346a0d3dc7..2d25ec5c871 100644 --- a/src/testRunner/unittests/tsbuild/helpers.ts +++ b/src/testRunner/unittests/tsbuild/helpers.ts @@ -102,7 +102,22 @@ namespace ts { interface ReadonlyArray {} declare const console: { log(msg: any): void; };`; - export function loadProjectFromDisk(root: string, time?: vfs.FileSystemOptions["time"]): vfs.FileSystem { + export const symbolLibContent = ` +interface SymbolConstructor { + readonly species: symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +} +`; + + export function loadProjectFromDisk( + root: string, + time?: vfs.FileSystemOptions["time"], + libContentToAppend?: string + ): vfs.FileSystem { const resolver = vfs.createResolver(Harness.IO); const fs = new vfs.FileSystem(/*ignoreCase*/ true, { files: { @@ -112,12 +127,31 @@ declare const console: { log(msg: any): void; };`; meta: { defaultLibLocation: "/lib" }, time }); - fs.mkdirSync("/lib"); - fs.writeFileSync("/lib/lib.d.ts", libContent); - fs.makeReadonly(); + addLibAndMakeReadonly(fs, libContentToAppend); return fs; } + export function loadProjectFromFiles( + files: vfs.FileSet, + time?: vfs.FileSystemOptions["time"], + libContentToAppend?: string + ): vfs.FileSystem { + const fs = new vfs.FileSystem(/*ignoreCase*/ true, { + files, + cwd: "/", + meta: { defaultLibLocation: "/lib" }, + time + }); + addLibAndMakeReadonly(fs, libContentToAppend); + return fs; + } + + function addLibAndMakeReadonly(fs: vfs.FileSystem, libContentToAppend?: string) { + fs.mkdirSync("/lib"); + fs.writeFileSync("/lib/lib.d.ts", libContentToAppend ? `${libContent}${libContentToAppend}` : libContent); + fs.makeReadonly(); + } + export function verifyOutputsPresent(fs: vfs.FileSystem, outputs: readonly string[]) { for (const output of outputs) { assert(fs.existsSync(output), `Expect file ${output} to exist`); @@ -199,7 +233,7 @@ declare const console: { log(msg: any): void; };`; fs: vfs.FileSystem; tick: () => void; rootNames: readonly string[]; - expectedMapFileNames: readonly string[]; + expectedMapFileNames?: readonly string[]; expectedBuildInfoFilesForSectionBaselines?: readonly BuildInfoSectionBaselineFiles[]; modifyFs: (fs: vfs.FileSystem) => void; } @@ -221,7 +255,7 @@ declare const console: { log(msg: any): void; };`; return originalReadFile.call(host, path); }; builder.build(); - generateSourceMapBaselineFiles(fs, expectedMapFileNames); + if (expectedMapFileNames) generateSourceMapBaselineFiles(fs, expectedMapFileNames); generateBuildInfoSectionBaselineFiles(fs, expectedBuildInfoFilesForSectionBaselines || emptyArray); fs.makeReadonly(); return { fs, actualReadFileMap, host, builder }; @@ -267,9 +301,10 @@ Mismatch Actual(path, actual, expected): ${JSON.stringify(arrayFrom(mapDefinedIt tick: () => void; proj: string; rootNames: readonly string[]; - expectedMapFileNames: readonly string[]; + /** map file names to generate baseline of */ + expectedMapFileNames?: readonly string[]; expectedBuildInfoFilesForSectionBaselines?: readonly BuildInfoSectionBaselineFiles[]; - lastProjectOutputJs: string; + lastProjectOutput: string; initialBuild: BuildState; outputFiles?: readonly string[]; incrementalDtsChangedBuild?: BuildState; @@ -281,7 +316,7 @@ Mismatch Actual(path, actual, expected): ${JSON.stringify(arrayFrom(mapDefinedIt export function verifyTsbuildOutput({ scenario, projFs, time, tick, proj, rootNames, outputFiles, baselineOnly, verifyDiagnostics, - expectedMapFileNames, expectedBuildInfoFilesForSectionBaselines, lastProjectOutputJs, + expectedMapFileNames, expectedBuildInfoFilesForSectionBaselines, lastProjectOutput, initialBuild, incrementalDtsChangedBuild, incrementalDtsUnchangedBuild, incrementalHeaderChangedBuild }: VerifyTsBuildInput) { describe(`tsc --b ${proj}:: ${scenario}`, () => { @@ -330,7 +365,7 @@ Mismatch Actual(path, actual, expected): ${JSON.stringify(arrayFrom(mapDefinedIt let beforeBuildTime: number; let afterBuildTime: number; before(() => { - beforeBuildTime = fs.statSync(lastProjectOutputJs).mtimeMs; + beforeBuildTime = fs.statSync(lastProjectOutput).mtimeMs; tick(); newFs = fs.shadow(); tick(); @@ -342,7 +377,7 @@ Mismatch Actual(path, actual, expected): ${JSON.stringify(arrayFrom(mapDefinedIt expectedBuildInfoFilesForSectionBaselines, modifyFs: incrementalModifyFs, })); - afterBuildTime = newFs.statSync(lastProjectOutputJs).mtimeMs; + afterBuildTime = newFs.statSync(lastProjectOutput).mtimeMs; }); after(() => { newFs = undefined!; @@ -358,6 +393,12 @@ Mismatch Actual(path, actual, expected): ${JSON.stringify(arrayFrom(mapDefinedIt host.assertDiagnosticMessages(...(incrementalExpectedDiagnostics || emptyArray)); }); } + else { + // Build should pass without errors if not verifying diagnostics + it(`verify no errors`, () => { + host.assertErrors(/*empty*/); + }); + } it(`Generates files matching the baseline`, () => { generateBaseline(newFs, proj, scenario, subScenario, fs); }); @@ -372,7 +413,6 @@ Mismatch Actual(path, actual, expected): ${JSON.stringify(arrayFrom(mapDefinedIt fs: newFs.shadow(), tick, rootNames, - expectedMapFileNames: emptyArray, modifyFs: fs => { // Delete output files for (const outputFile of expectedOutputFiles) { diff --git a/src/testRunner/unittests/tsbuild/inferredTypeFromTransitiveModule.ts b/src/testRunner/unittests/tsbuild/inferredTypeFromTransitiveModule.ts index 792fefb7ba7..301f9894fde 100644 --- a/src/testRunner/unittests/tsbuild/inferredTypeFromTransitiveModule.ts +++ b/src/testRunner/unittests/tsbuild/inferredTypeFromTransitiveModule.ts @@ -16,8 +16,7 @@ namespace ts { tick, proj: "inferredTypeFromTransitiveModule", rootNames: ["/src"], - expectedMapFileNames: emptyArray, - lastProjectOutputJs: `/src/obj/index.js`, + lastProjectOutput: `/src/obj/index.js`, outputFiles: [ "/src/obj/bar.js", "/src/obj/bar.d.ts", "/src/obj/bundling.js", "/src/obj/bundling.d.ts", diff --git a/src/testRunner/unittests/tsbuild/lateBoundSymbol.ts b/src/testRunner/unittests/tsbuild/lateBoundSymbol.ts index ff9f1fc7c7a..781dd6938b9 100644 --- a/src/testRunner/unittests/tsbuild/lateBoundSymbol.ts +++ b/src/testRunner/unittests/tsbuild/lateBoundSymbol.ts @@ -16,8 +16,7 @@ namespace ts { tick, proj: "lateBoundSymbol", rootNames: ["/src/tsconfig.json"], - expectedMapFileNames: emptyArray, - lastProjectOutputJs: "/src/src/main.js", + lastProjectOutput: "/src/src/main.js", outputFiles: [ "/src/src/hkt.js", "/src/src/main.js", diff --git a/src/testRunner/unittests/tsbuild/moduleSpecifiers.ts b/src/testRunner/unittests/tsbuild/moduleSpecifiers.ts index ad0a229e876..c6737b9d2f7 100644 --- a/src/testRunner/unittests/tsbuild/moduleSpecifiers.ts +++ b/src/testRunner/unittests/tsbuild/moduleSpecifiers.ts @@ -1,8 +1,10 @@ namespace ts { // https://github.com/microsoft/TypeScript/issues/31696 - it("unittests:: tsbuild:: moduleSpecifiers:: synthesized module specifiers to referenced projects resolve correctly", () => { - const baseFs = vfs.createFromFileSystem(Harness.IO, /*ignoreCase*/ false, { - files: { + describe("unittests:: tsbuild:: moduleSpecifiers:: synthesized module specifiers to referenced projects resolve correctly", () => { + let projFs: vfs.FileSystem; + const { time, tick } = getTime(); + before(() => { + projFs = loadProjectFromFiles({ "/src/common/nominal.ts": utils.dedent` export declare type Nominal = T & { [Symbol.species]: Name; @@ -71,7 +73,6 @@ namespace ts { "skipLibCheck": true, "rootDir": "./", "outDir": "lib", - "lib": ["dom", "es2015", "es2015.symbol.wellknown"] } }`, "/tsconfig.json": utils.dedent`{ @@ -83,16 +84,23 @@ namespace ts { ], "include": [] }` - }, - cwd: "/" + }, time, symbolLibContent); + }); + after(() => { + projFs = undefined!; + }); + verifyTsbuildOutput({ + scenario: `synthesized module specifiers resolve correctly`, + projFs: () => projFs, + time, + tick, + proj: "moduleSpecifiers", + rootNames: ["/"], + lastProjectOutput: `/src/lib/index.d.ts`, + initialBuild: { + modifyFs: noop, + }, + baselineOnly: true }); - const fs = baseFs.makeReadonly().shadow(); - const sys = new fakes.System(fs, { executingFilePath: "/", newLine: "\n" }); - const host = new fakes.SolutionBuilderHost(sys); - const builder = createSolutionBuilder(host, ["/tsconfig.json"], { dry: false, force: false, verbose: false }); - builder.build(); - - // Prior to fixing GH31696 the import in `/lib/src/sub-project-2/index.d.ts` was `import("../../lib/src/common/nonterminal")`, which was invalid. - Harness.Baseline.runBaseline("tsbuild/moduleSpecifiers/initial-build/resolves-correctly.js", vfs.formatPatch(fs.diff(baseFs))); }); -} \ No newline at end of file +} diff --git a/src/testRunner/unittests/tsbuild/outFile.ts b/src/testRunner/unittests/tsbuild/outFile.ts index 71f4470823d..f9aafee0e4d 100644 --- a/src/testRunner/unittests/tsbuild/outFile.ts +++ b/src/testRunner/unittests/tsbuild/outFile.ts @@ -288,7 +288,7 @@ namespace ts { rootNames: ["/src/third"], expectedMapFileNames, expectedBuildInfoFilesForSectionBaselines: expectedBuildInfoFilesForSectionBaselines || expectedTsbuildInfoFileNames, - lastProjectOutputJs: outputFiles[project.third][ext.js], + lastProjectOutput: outputFiles[project.third][ext.js], initialBuild: { modifyFs, expectedDiagnostics: initialExpectedDiagnostics, diff --git a/src/testRunner/unittests/tsbuild/sample.ts b/src/testRunner/unittests/tsbuild/sample.ts index 8dcc69d06d9..91574c3a920 100644 --- a/src/testRunner/unittests/tsbuild/sample.ts +++ b/src/testRunner/unittests/tsbuild/sample.ts @@ -617,7 +617,7 @@ export class cNew {}`); "/src/core/index.d.ts.map", "/src/logic/index.js.map" ], - lastProjectOutputJs: "/src/tests/index.js", + lastProjectOutput: "/src/tests/index.js", initialBuild, incrementalDtsChangedBuild: { modifyFs: fs => appendText(fs, "/src/core/index.ts", ` @@ -727,7 +727,7 @@ class someClass { }`), "/src/core/index.d.ts.map", "/src/logic/index.js.map" ], - lastProjectOutputJs: "/src/tests/index.js", + lastProjectOutput: "/src/tests/index.js", initialBuild, incrementalDtsChangedBuild: { modifyFs: fs => replaceText(fs, "/src/logic/tsconfig.json", `"declaration": true,`, `"declaration": true, @@ -795,7 +795,7 @@ class someClass { }`), "/src/core/index.d.ts.map", "/src/logic/index.js.map" ], - lastProjectOutputJs: "/src/tests/index.js", + lastProjectOutput: "/src/tests/index.js", initialBuild: { modifyFs: fs => replaceText(fs, "/src/logic/tsconfig.json", `"composite": true,`, `"composite": true, "tsBuildInfoFile": "ownFile.tsbuildinfo",`), @@ -851,8 +851,7 @@ class someClass { }`), tick, proj: "sample1", rootNames: ["/src/core"], - expectedMapFileNames: emptyArray, - lastProjectOutputJs: "/src/core/index.js", + lastProjectOutput: "/src/core/index.js", initialBuild: { modifyFs: fs => fs.writeFileSync("/src/core/tsconfig.json", `{ "compilerOptions": { @@ -892,8 +891,7 @@ class someClass { }`), tick, proj: "sample1", rootNames: ["/src/core"], - expectedMapFileNames: emptyArray, - lastProjectOutputJs: "/src/core/index.js", + lastProjectOutput: "/src/core/index.js", initialBuild: { modifyFs: fs => { fs.writeFileSync("/lib/lib.esnext.full.d.ts", `/// @@ -942,8 +940,7 @@ class someClass { }`), tick, proj: "sample1", rootNames: ["/src/core"], - expectedMapFileNames: emptyArray, - lastProjectOutputJs: "/src/core/index.js", + lastProjectOutput: "/src/core/index.js", initialBuild: { modifyFs: fs => fs.writeFileSync("/src/core/tsconfig.json", `{ "compilerOptions": { @@ -981,8 +978,7 @@ class someClass { }`), tick, proj: "sample1", rootNames: ["/src/tests"], - expectedMapFileNames: emptyArray, - lastProjectOutputJs: "/src/tests/index.js", + lastProjectOutput: "/src/tests/index.js", initialBuild: { modifyFs: fs => fs.writeFileSync("/src/tests/tsconfig.json", `{ "references": [ diff --git a/src/testRunner/unittests/tscWatch/incremental.ts b/src/testRunner/unittests/tscWatch/incremental.ts index e3be07691e1..0217ed91ee3 100644 --- a/src/testRunner/unittests/tscWatch/incremental.ts +++ b/src/testRunner/unittests/tscWatch/incremental.ts @@ -16,17 +16,17 @@ namespace ts.tscWatch { expectedIncrementalEmit?: readonly File[]; expectedIncrementalErrors?: readonly string[]; } - function verifyIncrementalWatchEmit(input: VerifyIncrementalWatchEmitInput) { + function verifyIncrementalWatchEmit(input: () => VerifyIncrementalWatchEmitInput) { it("with tsc --w", () => { verifyIncrementalWatchEmitWorker({ - input, + input: input(), emitAndReportErrors: createWatchOfConfigFile, verifyErrors: checkOutputErrorsInitial }); }); it("with tsc", () => { verifyIncrementalWatchEmitWorker({ - input, + input: input(), emitAndReportErrors: incrementalBuild, verifyErrors: checkNormalBuildErrors }); @@ -122,7 +122,7 @@ namespace ts.tscWatch { function checkFileEmit(actual: Map, expected: readonly File[]) { assert.equal(actual.size, expected.length, `Actual: ${JSON.stringify(arrayFrom(actual.entries()), /*replacer*/ undefined, " ")}\nExpected: ${JSON.stringify(expected, /*replacer*/ undefined, " ")}`); - expected.forEach(file => { + for (const file of expected) { let expectedContent = file.content; let actualContent = actual.get(file.path); if (isBuildInfoFile(file.path)) { @@ -130,7 +130,7 @@ namespace ts.tscWatch { expectedContent = sanitizeBuildInfo(expectedContent); } assert.equal(actualContent, expectedContent, `Emit for ${file.path}`); - }); + } } const libFileInfo: BuilderState.FileInfo = { @@ -170,7 +170,7 @@ namespace ts.tscWatch { describe("own file emit without errors", () => { function verify(optionsToExtend?: CompilerOptions, expectedBuildinfoOptions?: CompilerOptions) { const modifiedFile2Content = file2.content.replace("y", "z").replace("20", "10"); - verifyIncrementalWatchEmit({ + verifyIncrementalWatchEmit(() => ({ files: [libFile, file1, file2, configFile], optionsToExtend, expectedInitialEmit: [ @@ -226,7 +226,7 @@ namespace ts.tscWatch { } ], expectedIncrementalErrors: emptyArray, - }); + })); } verify(); describe("with commandline parameters that are not relative", () => { @@ -259,7 +259,7 @@ namespace ts.tscWatch { "file2.ts(1,7): error TS2322: Type '20' is not assignable to type 'string'.\n" ]; const modifiedFile1Content = file1.content.replace("x", "z"); - verifyIncrementalWatchEmit({ + verifyIncrementalWatchEmit(() => ({ files: [libFile, file1, fileModified, configFile], expectedInitialEmit: [ file1Js, @@ -320,7 +320,7 @@ namespace ts.tscWatch { } ], expectedIncrementalErrors: file2Errors, - }); + })); }); describe("with --out", () => { @@ -332,7 +332,7 @@ namespace ts.tscWatch { path: `${project}/out.js`, content: "var x = 10;\nvar y = 20;\n" }; - verifyIncrementalWatchEmit({ + verifyIncrementalWatchEmit(() => ({ files: [libFile, file1, file2, config], expectedInitialEmit: [ outFile, @@ -353,7 +353,7 @@ namespace ts.tscWatch { } ], expectedInitialErrors: emptyArray - }); + })); }); }); @@ -397,7 +397,7 @@ namespace ts.tscWatch { describe("own file emit without errors", () => { const modifiedFile2Content = file2.content.replace("y", "z").replace("20", "10"); - verifyIncrementalWatchEmit({ + verifyIncrementalWatchEmit(() => ({ files: [libFile, file1, file2, config], expectedInitialEmit: [ file1Js, @@ -451,7 +451,7 @@ namespace ts.tscWatch { } ], expectedIncrementalErrors: emptyArray, - }); + })); }); describe("own file emit with errors", () => { @@ -479,7 +479,7 @@ namespace ts.tscWatch { "file2.ts(1,14): error TS2322: Type '20' is not assignable to type 'string'.\n" ]; const modifiedFile1Content = file1.content.replace("x = 10", "z = 10"); - verifyIncrementalWatchEmit({ + verifyIncrementalWatchEmit(() => ({ files: [libFile, file1, fileModified, config], expectedInitialEmit: [ file1Js, @@ -541,6 +541,49 @@ namespace ts.tscWatch { } ], expectedIncrementalErrors: file2Errors, + })); + + it("verify that state is read correctly", () => { + const system = createWatchedSystem([libFile, file1, fileModified, config], { currentDirectory: project }); + incrementalBuild("tsconfig.json", system); + + const command = parseConfigFileWithSystem("tsconfig.json", {}, system, noop)!; + const builderProgram = createIncrementalProgram({ + rootNames: command.fileNames, + options: command.options, + projectReferences: command.projectReferences, + configFileParsingDiagnostics: getConfigFileParsingDiagnostics(command), + host: createIncrementalCompilerHost(command.options, system) + }); + + const state = builderProgram.getState(); + assert.equal(state.changedFilesSet!.size, 0, "changes"); + + assert.equal(state.fileInfos.size, 3, "FileInfo size"); + assert.deepEqual(state.fileInfos.get(libFile.path), libFileInfo); + assert.deepEqual(state.fileInfos.get(file1.path), getFileInfo(file1.content)); + assert.deepEqual(state.fileInfos.get(file2.path), file2FileInfo); + + assert.deepEqual(state.compilerOptions, { + incremental: true, + module: ModuleKind.AMD, + configFilePath: config.path + }); + + assert.equal(state.referencedMap!.size, 0); + assert.equal(state.exportedModulesMap!.size, 0); + + assert.equal(state.semanticDiagnosticsPerFile!.size, 3); + assert.deepEqual(state.semanticDiagnosticsPerFile!.get(libFile.path), emptyArray); + assert.deepEqual(state.semanticDiagnosticsPerFile!.get(file1.path), emptyArray); + const { file: _, relatedInformation: __, ...rest } = file2ReuasableError[1][0]; + assert.deepEqual(state.semanticDiagnosticsPerFile!.get(file2.path), [{ + ...rest, + file: state.program!.getSourceFileByPath(file2.path as Path)!, + relatedInformation: undefined, + reportsUnnecessary: undefined, + source: undefined + }]); }); }); @@ -561,7 +604,7 @@ namespace ts.tscWatch { }); `; } - verifyIncrementalWatchEmit({ + verifyIncrementalWatchEmit(() => ({ files: [libFile, file1, file2, config], expectedInitialEmit: [ outFile, @@ -582,7 +625,140 @@ namespace ts.tscWatch { } ], expectedInitialErrors: emptyArray - }); + })); + }); + }); + + describe("incremental with circular references", () => { + function getFileInfo(content: string): BuilderState.FileInfo { + const signature = Harness.mockHash(content); + return { version: signature, signature }; + } + const config: File = { + path: configFile.path, + content: JSON.stringify({ + compilerOptions: { + incremental: true, + target: "es5", + module: "commonjs", + declaration: true, + emitDeclarationOnly: true + } + }) + }; + const aTs: File = { + path: `${project}/a.ts`, + content: `import { B } from "./b"; +export interface A { + b: B; +} +` + }; + const bTs: File = { + path: `${project}/b.ts`, + content: `import { C } from "./c"; +export interface B { + b: C; +} +` + }; + const cTs: File = { + path: `${project}/c.ts`, + content: `import { A } from "./a"; +export interface C { + a: A; +} +` + }; + const indexTs: File = { + path: `${project}/index.ts`, + content: `export { A } from "./a"; +export { B } from "./b"; +export { C } from "./c"; +` + }; + + verifyIncrementalWatchEmit(() => { + const referencedMap: MapLike = { + "./a.ts": ["./b.ts"], + "./b.ts": ["./c.ts"], + "./c.ts": ["./a.ts"], + "./index.ts": ["./a.ts", "./b.ts", "./c.ts"], + }; + const initialProgram: ProgramBuildInfo = { + fileInfos: { + [libFilePath]: libFileInfo, + "./c.ts": getFileInfo(cTs.content), + "./b.ts": getFileInfo(bTs.content), + "./a.ts": getFileInfo(aTs.content), + "./index.ts": getFileInfo(indexTs.content) + }, + options: { + incremental: true, + target: ScriptTarget.ES5, + module: ModuleKind.CommonJS, + declaration: true, + emitDeclarationOnly: true, + configFilePath: "./tsconfig.json" + }, + referencedMap, + exportedModulesMap: referencedMap, + semanticDiagnosticsPerFile: [ + libFilePath, + "./a.ts", + "./b.ts", + "./c.ts", + "./index.ts", + ] + }; + const { fileInfos, ...rest } = initialProgram; + const expectedADts: File = { path: `${project}/a.d.ts`, content: aTs.content }; + const expectedBDts: File = { path: `${project}/b.d.ts`, content: bTs.content }; + const expectedCDts: File = { path: `${project}/c.d.ts`, content: cTs.content }; + const expectedIndexDts: File = { path: `${project}/index.d.ts`, content: indexTs.content }; + const modifiedATsContent = aTs.content.replace("b: B;", `b: B; + foo: any;`); + return { + files: [libFile, aTs, bTs, cTs, indexTs, config], + expectedInitialEmit: [ + expectedADts, + expectedBDts, + expectedCDts, + expectedIndexDts, + { + path: `${project}/tsconfig.tsbuildinfo`, + content: getBuildInfoText({ + program: initialProgram, + version + }) + } + ], + expectedInitialErrors: emptyArray, + modifyFs: host => host.writeFile(aTs.path, modifiedATsContent), + expectedIncrementalEmit: [ + { path: expectedADts.path, content: modifiedATsContent }, + expectedBDts, + expectedCDts, + expectedIndexDts, + { + path: `${project}/tsconfig.tsbuildinfo`, + content: getBuildInfoText({ + program: { + fileInfos: { + [libFilePath]: libFileInfo, + "./c.ts": getFileInfo(cTs.content), + "./b.ts": getFileInfo(bTs.content), + "./a.ts": getFileInfo(modifiedATsContent), + "./index.ts": getFileInfo(indexTs.content) + }, + ...rest + }, + version + }) + } + ], + expectedIncrementalErrors: emptyArray + }; }); }); }); diff --git a/tests/baselines/reference/docker/azure-sdk.log b/tests/baselines/reference/docker/azure-sdk.log index 9ec9a2bf71e..fa91089f9d8 100644 --- a/tests/baselines/reference/docker/azure-sdk.log +++ b/tests/baselines/reference/docker/azure-sdk.log @@ -2,41 +2,26 @@ Exit Code: 1 Standard output: Rush Multi-Project Build Tool 5.X.X - https://rushjs.io -Node.js version is 12.9.0 (pre-LTS) +Node.js version is 12.9.1 (pre-LTS) Starting "rush rebuild" Executing a maximum of ?simultaneous processes... XX of XX: [@azure/abort-controller] completed successfully in ? seconds XX of XX: [@azure/core-auth] completed successfully in ? seconds -npm ERR! code ELIFECYCLE -npm ERR! errno 2 -npm ERR! @azure/core-http@X.X.X-preview.3 build:tsc: `tsc -p tsconfig.es.json` -npm ERR! Exit status 2 -npm ERR! -npm ERR! Failed at the @azure/core-http@X.X.X-preview.3 build:tsc script. -npm ERR! This is probably not a problem with npm. There is likely additional logging output above. -npm ERR! A complete log of this run can be found in: -npm ERR! /root/.npm/_logs/XXXX-XX-XXXXXXXXX-debug.log -ERROR: "build:tsc" exited with 2. -npm ERR! code ELIFECYCLE -npm ERR! errno 1 -npm ERR! @azure/core-http@X.X.X-preview.3 build:lib: `run-s build:tsc build:rollup build:minify-browser` -npm ERR! Exit status 1 -npm ERR! -npm ERR! Failed at the @azure/core-http@X.X.X-preview.3 build:lib script. -npm ERR! This is probably not a problem with npm. There is likely additional logging output above. -npm ERR! A complete log of this run can be found in: -npm ERR! /root/.npm/_logs/XXXX-XX-XXXXXXXXX-debug.log -ERROR: "build:lib" exited with 1. +XX of XX: [@azure/core-http] completed successfully in ? seconds +XX of XX: [@azure/identity] completed successfully in ? seconds +XX of XX: [@azure/core-amqp] completed successfully in ? seconds +XX of XX: [@azure/core-arm] completed successfully in ? seconds +XX of XX: [@azure/core-paging] completed successfully in ? seconds XX of XX: [@azure/event-processor-host] completed successfully in ? seconds XX of XX: [@azure/test-utils-recorder] completed successfully in ? seconds +XX of XX: [@azure/app-configuration] completed successfully in ? seconds XX of XX: [@azure/core-asynciterator-polyfill] completed successfully in ? seconds -XX of XX: [@azure/core-paging] completed successfully in ? seconds XX of XX: [@azure/core-tracing] completed successfully in ? seconds Warning: You have changed the public API signature for this project. Updating review/cosmos.api.md dist-esm/index.js → dist/index.js... (!) Unresolved dependencies https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency -tslib (imported by dist-esm/queryIterator.js, dist-esm/auth.js, dist-esm/CosmosClient.js, dist-esm/plugins/Plugin.js, dist-esm/ClientContext.js, dist-esm/globalEndpointManager.js, dist-esm/client/Conflict/Conflict.js, dist-esm/client/Container/Container.js, dist-esm/client/Container/Containers.js, dist-esm/client/Database/Database.js, dist-esm/client/Database/Databases.js, dist-esm/client/Item/Item.js, dist-esm/client/Item/Items.js, dist-esm/client/Offer/Offer.js, dist-esm/client/Permission/Permission.js, dist-esm/client/Permission/Permissions.js, dist-esm/client/StoredProcedure/StoredProcedure.js, dist-esm/client/StoredProcedure/StoredProcedures.js, dist-esm/client/Trigger/Trigger.js, dist-esm/client/Trigger/Triggers.js, dist-esm/client/User/User.js, dist-esm/client/User/Users.js, dist-esm/client/UserDefinedFunction/UserDefinedFunction.js, dist-esm/client/UserDefinedFunction/UserDefinedFunctions.js, dist-esm/queryExecutionContext/defaultQueryExecutionContext.js, dist-esm/queryExecutionContext/documentProducer.js, dist-esm/queryExecutionContext/parallelQueryExecutionContextBase.js, dist-esm/queryExecutionContext/pipelinedQueryExecutionContext.js, dist-esm/request/request.js, dist-esm/request/RequestHandler.js, dist-esm/ChangeFeedIterator.js, dist-esm/routing/smartRoutingMapProvider.js, dist-esm/queryExecutionContext/EndpointComponent/AggregateEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js, dist-esm/retry/retryUtility.js, dist-esm/routing/partitionKeyRangeCache.js, dist-esm/retry/defaultRetryPolicy.js, dist-esm/retry/endpointDiscoveryRetryPolicy.js, dist-esm/retry/resourceThrottleRetryPolicy.js, dist-esm/retry/sessionRetryPolicy.js) +tslib (imported by dist-esm/auth.js, dist-esm/queryIterator.js, dist-esm/CosmosClient.js, dist-esm/plugins/Plugin.js, dist-esm/ClientContext.js, dist-esm/globalEndpointManager.js, dist-esm/client/Conflict/Conflict.js, dist-esm/client/Container/Container.js, dist-esm/client/Container/Containers.js, dist-esm/client/Database/Database.js, dist-esm/client/Database/Databases.js, dist-esm/client/Item/Item.js, dist-esm/client/Item/Items.js, dist-esm/client/Offer/Offer.js, dist-esm/client/Permission/Permission.js, dist-esm/client/Permission/Permissions.js, dist-esm/client/StoredProcedure/StoredProcedure.js, dist-esm/client/Trigger/Trigger.js, dist-esm/client/Trigger/Triggers.js, dist-esm/client/User/User.js, dist-esm/client/User/Users.js, dist-esm/client/UserDefinedFunction/UserDefinedFunction.js, dist-esm/client/UserDefinedFunction/UserDefinedFunctions.js, dist-esm/queryExecutionContext/defaultQueryExecutionContext.js, dist-esm/queryExecutionContext/documentProducer.js, dist-esm/queryExecutionContext/parallelQueryExecutionContextBase.js, dist-esm/queryExecutionContext/pipelinedQueryExecutionContext.js, dist-esm/request/request.js, dist-esm/request/RequestHandler.js, dist-esm/client/StoredProcedure/StoredProcedures.js, dist-esm/ChangeFeedIterator.js, dist-esm/routing/smartRoutingMapProvider.js, dist-esm/queryExecutionContext/EndpointComponent/AggregateEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js, dist-esm/retry/retryUtility.js, dist-esm/routing/partitionKeyRangeCache.js, dist-esm/retry/resourceThrottleRetryPolicy.js, dist-esm/retry/endpointDiscoveryRetryPolicy.js, dist-esm/retry/sessionRetryPolicy.js, dist-esm/retry/defaultRetryPolicy.js) @azure/cosmos-sign (imported by dist-esm/auth.js) universal-user-agent (imported by dist-esm/common/platform.js) uuid/v4 (imported by dist-esm/client/Item/Items.js) @@ -66,33 +51,47 @@ atob (guessing 'atob') (!) Circular dependency: dist-esm/index.js -> dist-esm/CosmosClient.js -> dist-esm/client/Database/index.js -> dist-esm/client/Database/Database.js -> dist-esm/client/Container/index.js -> dist-esm/client/Container/Container.js -> dist-esm/client/Script/Scripts.js -> dist-esm/index.js (!) Circular dependency: dist-esm/request/RequestHandler.js -> dist-esm/retry/retryUtility.js -> dist-esm/request/RequestHandler.js created dist/index.js in ?s +Warning: You have changed the public API signature for this project. Updating review/event-hubs.api.md +XX of XX: [@azure/keyvault-certificates] completed successfully in ? seconds +XX of XX: [@azure/keyvault-keys] completed successfully in ? seconds +XX of XX: [@azure/keyvault-secrets] completed successfully in ? seconds Warning: You have changed the public API signature for this project. Updating review/service-bus.api.md XX of XX: [@azure/storage-blob] completed successfully in ? seconds XX of XX: [@azure/storage-file] completed successfully in ? seconds XX of XX: [@azure/storage-queue] completed successfully in ? seconds +XX of XX: [@azure/template] completed successfully in ? seconds XX of XX: [testhub] completed successfully in ? seconds -SUCCESS (11) +SUCCESS (20) ================================ @azure/abort-controller (? seconds) @azure/core-auth (? seconds) +@azure/core-http (? seconds) +@azure/identity (? seconds) +@azure/core-amqp (? seconds) +@azure/core-arm (? seconds) +@azure/core-paging (? seconds) @azure/event-processor-host (? seconds) @azure/test-utils-recorder (? seconds) +@azure/app-configuration (? seconds) @azure/core-asynciterator-polyfill (? seconds) -@azure/core-paging (? seconds) @azure/core-tracing (? seconds) +@azure/keyvault-certificates (? seconds) +@azure/keyvault-keys (? seconds) +@azure/keyvault-secrets (? seconds) @azure/storage-blob (? seconds) @azure/storage-file (? seconds) @azure/storage-queue (? seconds) +@azure/template (? seconds) testhub (? seconds) ================================ -SUCCESS WITH WARNINGS (2) +SUCCESS WITH WARNINGS (3) ================================ @azure/cosmos (? seconds) Warning: You have changed the public API signature for this project. Updating review/cosmos.api.md dist-esm/index.js → dist/index.js... (!) Unresolved dependencies https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency -tslib (imported by dist-esm/queryIterator.js, dist-esm/auth.js, dist-esm/CosmosClient.js, dist-esm/plugins/Plugin.js, dist-esm/ClientContext.js, dist-esm/globalEndpointManager.js, dist-esm/client/Conflict/Conflict.js, dist-esm/client/Container/Container.js, dist-esm/client/Container/Containers.js, dist-esm/client/Database/Database.js, dist-esm/client/Database/Databases.js, dist-esm/client/Item/Item.js, dist-esm/client/Item/Items.js, dist-esm/client/Offer/Offer.js, dist-esm/client/Permission/Permission.js, dist-esm/client/Permission/Permissions.js, dist-esm/client/StoredProcedure/StoredProcedure.js, dist-esm/client/StoredProcedure/StoredProcedures.js, dist-esm/client/Trigger/Trigger.js, dist-esm/client/Trigger/Triggers.js, dist-esm/client/User/User.js, dist-esm/client/User/Users.js, dist-esm/client/UserDefinedFunction/UserDefinedFunction.js, dist-esm/client/UserDefinedFunction/UserDefinedFunctions.js, dist-esm/queryExecutionContext/defaultQueryExecutionContext.js, dist-esm/queryExecutionContext/documentProducer.js, dist-esm/queryExecutionContext/parallelQueryExecutionContextBase.js, dist-esm/queryExecutionContext/pipelinedQueryExecutionContext.js, dist-esm/request/request.js, dist-esm/request/RequestHandler.js, dist-esm/ChangeFeedIterator.js, dist-esm/routing/smartRoutingMapProvider.js, dist-esm/queryExecutionContext/EndpointComponent/AggregateEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js, dist-esm/retry/retryUtility.js, dist-esm/routing/partitionKeyRangeCache.js, dist-esm/retry/defaultRetryPolicy.js, dist-esm/retry/endpointDiscoveryRetryPolicy.js, dist-esm/retry/resourceThrottleRetryPolicy.js, dist-esm/retry/sessionRetryPolicy.js) +tslib (imported by dist-esm/auth.js, dist-esm/queryIterator.js, dist-esm/CosmosClient.js, dist-esm/plugins/Plugin.js, dist-esm/ClientContext.js, dist-esm/globalEndpointManager.js, dist-esm/client/Conflict/Conflict.js, dist-esm/client/Container/Container.js, dist-esm/client/Container/Containers.js, dist-esm/client/Database/Database.js, dist-esm/client/Database/Databases.js, dist-esm/client/Item/Item.js, dist-esm/client/Item/Items.js, dist-esm/client/Offer/Offer.js, dist-esm/client/Permission/Permission.js, dist-esm/client/Permission/Permissions.js, dist-esm/client/StoredProcedure/StoredProcedure.js, dist-esm/client/Trigger/Trigger.js, dist-esm/client/Trigger/Triggers.js, dist-esm/client/User/User.js, dist-esm/client/User/Users.js, dist-esm/client/UserDefinedFunction/UserDefinedFunction.js, dist-esm/client/UserDefinedFunction/UserDefinedFunctions.js, dist-esm/queryExecutionContext/defaultQueryExecutionContext.js, dist-esm/queryExecutionContext/documentProducer.js, dist-esm/queryExecutionContext/parallelQueryExecutionContextBase.js, dist-esm/queryExecutionContext/pipelinedQueryExecutionContext.js, dist-esm/request/request.js, dist-esm/request/RequestHandler.js, dist-esm/client/StoredProcedure/StoredProcedures.js, dist-esm/ChangeFeedIterator.js, dist-esm/routing/smartRoutingMapProvider.js, dist-esm/queryExecutionContext/EndpointComponent/AggregateEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js, dist-esm/retry/retryUtility.js, dist-esm/routing/partitionKeyRangeCache.js, dist-esm/retry/resourceThrottleRetryPolicy.js, dist-esm/retry/endpointDiscoveryRetryPolicy.js, dist-esm/retry/sessionRetryPolicy.js, dist-esm/retry/defaultRetryPolicy.js) @azure/cosmos-sign (imported by dist-esm/auth.js) universal-user-agent (imported by dist-esm/common/platform.js) uuid/v4 (imported by dist-esm/client/Item/Items.js) @@ -122,60 +121,17 @@ atob (guessing 'atob') (!) Circular dependency: dist-esm/index.js -> dist-esm/CosmosClient.js -> dist-esm/client/Database/index.js -> dist-esm/client/Database/Database.js -> dist-esm/client/Container/index.js -> dist-esm/client/Container/Container.js -> dist-esm/client/Script/Scripts.js -> dist-esm/index.js (!) Circular dependency: dist-esm/request/RequestHandler.js -> dist-esm/retry/retryUtility.js -> dist-esm/request/RequestHandler.js created dist/index.js in ?s +@azure/event-hubs (? seconds) +Warning: You have changed the public API signature for this project. Updating review/event-hubs.api.md @azure/service-bus (? seconds) Warning: You have changed the public API signature for this project. Updating review/service-bus.api.md ================================ -BLOCKED (8) -================================ -@azure/identity -@azure/core-amqp -@azure/core-arm -@azure/event-hubs -@azure/keyvault-certificates -@azure/keyvault-keys -@azure/keyvault-secrets -@azure/template -================================ -FAILURE (1) -================================ -@azure/core-http ( ? seconds) -npm ERR! code ELIFECYCLE -npm ERR! errno 2 -npm ERR! @azure/core-http@X.X.X-preview.3 build:tsc: `tsc -p tsconfig.es.json` -npm ERR! Exit status 2 -npm ERR! -npm ERR! Failed at the @azure/core-http@X.X.X-preview.3 build:tsc script. -npm ERR! This is probably not a problem with npm. There is likely additional logging output above. -npm ERR! A complete log of this run can be found in: -npm ERR! /root/.npm/_logs/XXXX-XX-XXXXXXXXX-debug.log -ERROR: "build:tsc" exited with 2. -npm ERR! code ELIFECYCLE -npm ERR! errno 1 -npm ERR! @azure/core-http@X.X.X-preview.3 build:lib: `run-s build:tsc build:rollup build:minify-browser` -npm ERR! Exit status 1 -npm ERR! -npm ERR! Failed at the @azure/core-http@X.X.X-preview.3 build:lib script. -npm ERR! This is probably not a problem with npm. There is likely additional logging output above. -npm ERR! A complete log of this run can be found in: -npm ERR! /root/.npm/_logs/XXXX-XX-XXXXXXXXX-debug.log -ERROR: "build:lib" exited with 1. -================================ -Error: Project(s) failed to build -rush rebuild - Errors! ( ? seconds) +rush rebuild ( ? seconds) Standard error: - -XX of XX: [@azure/core-http] failed to build! -XX of XX: [@azure/core-arm] blocked by [@azure/core-http]! -XX of XX: [@azure/keyvault-certificates] blocked by [@azure/core-http]! -XX of XX: [@azure/keyvault-keys] blocked by [@azure/core-http]! -XX of XX: [@azure/keyvault-secrets] blocked by [@azure/core-http]! -XX of XX: [@azure/identity] blocked by [@azure/core-http]! -XX of XX: [@azure/core-amqp] blocked by [@azure/core-http]! -XX of XX: [@azure/event-hubs] blocked by [@azure/core-http]! -XX of XX: [@azure/template] blocked by [@azure/core-http]! XX of XX: [@azure/cosmos] completed with warnings in ? seconds +XX of XX: [@azure/event-hubs] completed with warnings in ? seconds XX of XX: [@azure/service-bus] completed with warnings in ? seconds -[@azure/core-http] Returned error code: 1 +Project(s) succeeded with warnings diff --git a/tests/baselines/reference/docker/office-ui-fabric.log b/tests/baselines/reference/docker/office-ui-fabric.log index fbdb089dd03..96605f33b9d 100644 --- a/tests/baselines/reference/docker/office-ui-fabric.log +++ b/tests/baselines/reference/docker/office-ui-fabric.log @@ -3,16 +3,31 @@ Standard output: @uifabric/codepen-loader: yarn run vX.X.X @uifabric/codepen-loader: $ just-scripts build --production --lint @uifabric/codepen-loader: [XX:XX:XX XM] ■ Removing [lib, temp, dist, coverage, lib-commonjs] -@uifabric/codepen-loader: [XX:XX:XX XM] ■ Copying [../office-ui-fabric-react/src/utilities/exampleData.ts, ../office-ui-fabric-react/src/components/ExtendedPicker/examples/PeopleExampleData.ts, ../office-ui-fabric-react/src/common/TestImages.ts] to 'lib' @uifabric/codepen-loader: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/codepen-loader/tsconfig.json @uifabric/codepen-loader: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --module commonjs --outDir "./lib" --project "/office-ui-fabric-react/packages/codepen-loader/tsconfig.json" @uifabric/codepen-loader: [XX:XX:XX XM] ■ Running Jest -@uifabric/codepen-loader: [XX:XX:XX XM] ■ /usr/local/bin/node "/office-ui-fabric-react/node_modules/jest/bin/jest.js" --config "/office-ui-fabric-react/packages/codepen-loader/jest.config.js" --passWithNoTests --colors +@uifabric/codepen-loader: [XX:XX:XX XM] ■ /usr/local/bin/node "/office-ui-fabric-react/node_modules/jest/bin/jest.js" --config "/office-ui-fabric-react/packages/codepen-loader/jest.config.js" --passWithNoTests --colors --forceExit @uifabric/codepen-loader: PASS src/__tests__/codepenTransform.test.ts @uifabric/codepen-loader: Done in ?s. @uifabric/build: yarn run vX.X.X @uifabric/build: $ node ./just-scripts.js no-op --production --lint @uifabric/build: Done in ?s. +@uifabric/example-data: yarn run vX.X.X +@uifabric/example-data: $ just-scripts build --production --lint +@uifabric/example-data: [XX:XX:XX XM] ■ Removing [lib, temp, dist, lib-amd, lib-commonjs, lib-es2015, coverage, src/**/*.scss.ts] +@uifabric/example-data: [XX:XX:XX XM] ■ Running tslint +@uifabric/example-data: [XX:XX:XX XM] ■ /usr/local/bin/node "/office-ui-fabric-react/node_modules/tslint/lib/tslintCli.js" --project "/office-ui-fabric-react/packages/example-data/tsconfig.json" -t stylish -r /office-ui-fabric-react/node_modules/tslint-microsoft-contrib +@uifabric/example-data: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/example-data/tsconfig.json +@uifabric/example-data: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --inlineSources --sourceRoot "../src" --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/example-data/tsconfig.json" +@uifabric/example-data: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/example-data/tsconfig.json +@uifabric/example-data: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --inlineSources --sourceRoot "../src" --outDir lib --module esnext --project "/office-ui-fabric-react/packages/example-data/tsconfig.json" +@uifabric/example-data: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/example-data/tsconfig.json +@uifabric/example-data: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --inlineSources --sourceRoot "../src" --outDir lib-amd --module amd --project "/office-ui-fabric-react/packages/example-data/tsconfig.json" +@uifabric/example-data: [XX:XX:XX XM] ■ Running Webpack +@uifabric/example-data: [XX:XX:XX XM] ■ Webpack Config Path: /office-ui-fabric-react/packages/example-data/webpack.config.js +@uifabric/example-data: Webpack version: 4.29.5 +@uifabric/example-data: [XX:XX:XX XM] ■ Extracting Public API surface from '/office-ui-fabric-react/packages/example-data/lib/index.d.ts' +@uifabric/example-data: Done in ?s. @uifabric/migration: yarn run vX.X.X @uifabric/migration: $ just-scripts build --production --lint @uifabric/migration: [XX:XX:XX XM] ■ Removing [lib, temp, dist, lib-amd, lib-commonjs, lib-es2015, coverage, src/**/*.scss.ts] @@ -54,7 +69,7 @@ Standard output: @uifabric/merge-styles: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/merge-styles/tsconfig.json @uifabric/merge-styles: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --inlineSources --sourceRoot "../src" --outDir lib-amd --module amd --project "/office-ui-fabric-react/packages/merge-styles/tsconfig.json" @uifabric/merge-styles: [XX:XX:XX XM] ■ Running Jest -@uifabric/merge-styles: [XX:XX:XX XM] ■ /usr/local/bin/node "/office-ui-fabric-react/node_modules/jest/bin/jest.js" --config "/office-ui-fabric-react/packages/merge-styles/jest.config.js" --passWithNoTests --colors +@uifabric/merge-styles: [XX:XX:XX XM] ■ /usr/local/bin/node "/office-ui-fabric-react/node_modules/jest/bin/jest.js" --config "/office-ui-fabric-react/packages/merge-styles/jest.config.js" --passWithNoTests --colors --forceExit @uifabric/merge-styles: [XX:XX:XX XM] ■ Running Webpack @uifabric/merge-styles: [XX:XX:XX XM] ■ Webpack Config Path: /office-ui-fabric-react/packages/merge-styles/webpack.config.js @uifabric/merge-styles: Webpack version: 4.29.5 @@ -69,8 +84,6 @@ Standard output: @uifabric/merge-styles: PASS src/Stylesheet.test.ts @uifabric/merge-styles: PASS src/extractStyleParts.test.ts @uifabric/merge-styles: PASS src/server.test.ts -@uifabric/merge-styles: PASS src/fontFace.test.ts -@uifabric/merge-styles: PASS src/transforms/kebabRules.test.ts @uifabric/merge-styles: [XX:XX:XX XM] ■ Extracting Public API surface from '/office-ui-fabric-react/packages/merge-styles/lib/index.d.ts' @uifabric/merge-styles: Done in ?s. @uifabric/jest-serializer-merge-styles: yarn run vX.X.X @@ -82,7 +95,7 @@ Standard output: @uifabric/jest-serializer-merge-styles: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/jest-serializer-merge-styles/tsconfig.json @uifabric/jest-serializer-merge-styles: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --inlineSources --sourceRoot "../src" --outDir lib-amd --module amd --project "/office-ui-fabric-react/packages/jest-serializer-merge-styles/tsconfig.json" @uifabric/jest-serializer-merge-styles: [XX:XX:XX XM] ■ Running Jest -@uifabric/jest-serializer-merge-styles: [XX:XX:XX XM] ■ /usr/local/bin/node "/office-ui-fabric-react/node_modules/jest/bin/jest.js" --config "/office-ui-fabric-react/packages/jest-serializer-merge-styles/jest.config.js" --passWithNoTests --colors +@uifabric/jest-serializer-merge-styles: [XX:XX:XX XM] ■ /usr/local/bin/node "/office-ui-fabric-react/node_modules/jest/bin/jest.js" --config "/office-ui-fabric-react/packages/jest-serializer-merge-styles/jest.config.js" --passWithNoTests --colors --forceExit @uifabric/jest-serializer-merge-styles: PASS src/index.test.tsx @uifabric/jest-serializer-merge-styles: Done in ?s. @uifabric/test-utilities: yarn run vX.X.X @@ -107,7 +120,7 @@ Standard output: @uifabric/utilities: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/utilities/tsconfig.json @uifabric/utilities: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --inlineSources --sourceRoot "../src" --outDir lib-amd --module amd --project "/office-ui-fabric-react/packages/utilities/tsconfig.json" @uifabric/utilities: [XX:XX:XX XM] ■ Running Jest -@uifabric/utilities: [XX:XX:XX XM] ■ /usr/local/bin/node "/office-ui-fabric-react/node_modules/jest/bin/jest.js" --config "/office-ui-fabric-react/packages/utilities/jest.config.js" --passWithNoTests --colors +@uifabric/utilities: [XX:XX:XX XM] ■ /usr/local/bin/node "/office-ui-fabric-react/node_modules/jest/bin/jest.js" --config "/office-ui-fabric-react/packages/utilities/jest.config.js" --passWithNoTests --colors --forceExit @uifabric/utilities: [XX:XX:XX XM] ■ Running Webpack @uifabric/utilities: [XX:XX:XX XM] ■ Webpack Config Path: null @uifabric/utilities: [XX:XX:XX XM] ■ webpack.config.js not found, skipping webpack @@ -145,7 +158,6 @@ Standard output: @uifabric/utilities: PASS src/initializeComponentRef.test.tsx @uifabric/utilities: PASS src/BaseComponent.test.tsx @uifabric/utilities: PASS src/keyboard.test.ts -@uifabric/utilities: PASS src/css.test.ts @uifabric/utilities: [XX:XX:XX XM] ■ Extracting Public API surface from '/office-ui-fabric-react/packages/utilities/lib/index.d.ts' @uifabric/utilities: Done in ?s. @uifabric/styling: yarn run vX.X.X @@ -160,7 +172,7 @@ Standard output: @uifabric/styling: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/styling/tsconfig.json @uifabric/styling: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --inlineSources --sourceRoot "../src" --outDir lib-amd --module amd --project "/office-ui-fabric-react/packages/styling/tsconfig.json" @uifabric/styling: [XX:XX:XX XM] ■ Running Jest -@uifabric/styling: [XX:XX:XX XM] ■ /usr/local/bin/node "/office-ui-fabric-react/node_modules/jest/bin/jest.js" --config "/office-ui-fabric-react/packages/styling/jest.config.js" --passWithNoTests --colors +@uifabric/styling: [XX:XX:XX XM] ■ /usr/local/bin/node "/office-ui-fabric-react/node_modules/jest/bin/jest.js" --config "/office-ui-fabric-react/packages/styling/jest.config.js" --passWithNoTests --colors --forceExit @uifabric/styling: [XX:XX:XX XM] ■ Running Webpack @uifabric/styling: [XX:XX:XX XM] ■ Webpack Config Path: null @uifabric/styling: [XX:XX:XX XM] ■ webpack.config.js not found, skipping webpack @@ -168,7 +180,6 @@ Standard output: @uifabric/styling: PASS src/styles/scheme.test.ts @uifabric/styling: PASS src/styles/getGlobalClassNames.test.ts @uifabric/styling: PASS src/utilities/icons.test.ts -@uifabric/styling: PASS src/styles/fonts.test.ts @uifabric/styling: [XX:XX:XX XM] ■ Extracting Public API surface from '/office-ui-fabric-react/packages/styling/lib/index.d.ts' @uifabric/styling: Done in ?s. @uifabric/file-type-icons: yarn run vX.X.X @@ -198,12 +209,11 @@ Standard output: @uifabric/foundation: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/foundation/tsconfig.json @uifabric/foundation: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --inlineSources --sourceRoot "../src" --outDir lib-amd --module amd --project "/office-ui-fabric-react/packages/foundation/tsconfig.json" @uifabric/foundation: [XX:XX:XX XM] ■ Running Jest -@uifabric/foundation: [XX:XX:XX XM] ■ /usr/local/bin/node "/office-ui-fabric-react/node_modules/jest/bin/jest.js" --config "/office-ui-fabric-react/packages/foundation/jest.config.js" --passWithNoTests --colors +@uifabric/foundation: [XX:XX:XX XM] ■ /usr/local/bin/node "/office-ui-fabric-react/node_modules/jest/bin/jest.js" --config "/office-ui-fabric-react/packages/foundation/jest.config.js" --passWithNoTests --colors --forceExit @uifabric/foundation: [XX:XX:XX XM] ■ Running Webpack @uifabric/foundation: [XX:XX:XX XM] ■ Webpack Config Path: /office-ui-fabric-react/packages/foundation/webpack.config.js @uifabric/foundation: Webpack version: 4.29.5 @uifabric/foundation: FAIL src/slots.test.tsx -@uifabric/foundation: PASS src/hooks/controlled.test.tsx @uifabric/foundation: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. @@ -211,16 +221,32 @@ Standard output: Standard error: info cli using local version of lerna lerna notice cli vX.X.X -lerna info Executing command in 40 packages: "yarn run build --production --lint" +lerna info Executing command in 41 packages: "yarn run build --production --lint" @uifabric/codepen-loader: ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions. +@uifabric/codepen-loader: Force exiting Jest +@uifabric/codepen-loader: +@uifabric/codepen-loader: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? +@uifabric/example-data: [XX:XX:XX XM] ▲ One of these [node-sass, postcss, autoprefixer] is not installed, so this task has no effect @uifabric/set-version: [XX:XX:XX XM] ▲ One of these [node-sass, postcss, autoprefixer] is not installed, so this task has no effect @uifabric/merge-styles: [XX:XX:XX XM] ▲ One of these [node-sass, postcss, autoprefixer] is not installed, so this task has no effect @uifabric/merge-styles: ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions. +@uifabric/merge-styles: Force exiting Jest +@uifabric/merge-styles: +@uifabric/merge-styles: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? @uifabric/jest-serializer-merge-styles: ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions. +@uifabric/jest-serializer-merge-styles: Force exiting Jest +@uifabric/jest-serializer-merge-styles: +@uifabric/jest-serializer-merge-styles: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? @uifabric/utilities: [XX:XX:XX XM] ▲ One of these [node-sass, postcss, autoprefixer] is not installed, so this task has no effect @uifabric/utilities: ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions. +@uifabric/utilities: Force exiting Jest +@uifabric/utilities: +@uifabric/utilities: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? @uifabric/styling: [XX:XX:XX XM] ▲ One of these [node-sass, postcss, autoprefixer] is not installed, so this task has no effect @uifabric/styling: ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions. +@uifabric/styling: Force exiting Jest +@uifabric/styling: +@uifabric/styling: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? @uifabric/file-type-icons: [XX:XX:XX XM] ▲ One of these [node-sass, postcss, autoprefixer] is not installed, so this task has no effect @uifabric/foundation: [XX:XX:XX XM] ▲ One of these [node-sass, postcss, autoprefixer] is not installed, so this task has no effect @uifabric/foundation: ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions. @@ -421,15 +447,19 @@ lerna info Executing command in 40 packages: "yarn run build --production --lint @uifabric/foundation: at _renderSlot (src/slots.tsx:221:100) @uifabric/foundation: at Object.slot [as testSlot1] (src/slots.tsx:142:16) @uifabric/foundation: at Object. (src/slots.test.tsx:399:24) +@uifabric/foundation: Force exiting Jest +@uifabric/foundation: +@uifabric/foundation: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? @uifabric/foundation: [XX:XX:XX XM] x Error detected while running 'jest' @uifabric/foundation: [XX:XX:XX XM] x ------------------------------------ -@uifabric/foundation: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node /office-ui-fabric-react/node_modules/jest/bin/jest.js --config /office-ui-fabric-react/packages/foundation/jest.config.js --passWithNoTests --colors -@uifabric/foundation: at ChildProcess. (/office-ui-fabric-react/node_modules/just-scripts-utils/lib/exec.js:70:31) +@uifabric/foundation: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node /office-ui-fabric-react/node_modules/jest/bin/jest.js --config /office-ui-fabric-react/packages/foundation/jest.config.js --passWithNoTests --colors --forceExit +@uifabric/foundation: at ChildProcess. (/office-ui-fabric-react/node_modules/just-scripts/node_modules/just-scripts-utils/lib/exec.js:70:31) @uifabric/foundation: at ChildProcess.emit (events.js:209:13) @uifabric/foundation: at ChildProcess.EventEmitter.emit (domain.js:499:23) @uifabric/foundation: at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) @uifabric/foundation: [XX:XX:XX XM] x ------------------------------------ @uifabric/foundation: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@uifabric/foundation: [XX:XX:XX XM] x Other tasks that did not complete: [webpack] @uifabric/foundation: error Command failed with exit code 1. lerna ERR! yarn run build --production --lint exited 1 in '@uifabric/foundation' lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately. diff --git a/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-changes/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js b/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-changes/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js new file mode 100644 index 00000000000..9a793388ac0 --- /dev/null +++ b/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-changes/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js @@ -0,0 +1,103 @@ +//// [/src/lib/a.d.ts] +import { B } from "./b"; +export interface A { + b: B; + foo: any; +} +//# sourceMappingURL=a.d.ts.map + +//// [/src/lib/a.d.ts.map] +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["../src/a.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,CAAC;IAChB,CAAC,EAAE,CAAC,CAAC;IAAC,GAAG,EAAE,GAAG,CAAC;CAChB"} + +//// [/src/src/a.ts] +import { B } from "./b"; + +export interface A { + b: B; foo: any; +} + + +//// [/src/tsconfig.tsbuildinfo] +{ + "program": { + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" + }, + "./src/c.ts": { + "version": "429593025-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n", + "signature": "-21569163793-import { A } from \"./a\";\r\nexport interface C {\r\n a: A;\r\n}\r\n//# sourceMappingURL=c.d.ts.map" + }, + "./src/b.ts": { + "version": "-2273488249-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n", + "signature": "25318058868-import { C } from \"./c\";\r\nexport interface B {\r\n b: C;\r\n}\r\n//# sourceMappingURL=b.d.ts.map" + }, + "./src/a.ts": { + "version": "-14761736732-import { B } from \"./b\";\n\nexport interface A {\n b: B; foo: any;\n}\n", + "signature": "-11119001497-import { B } from \"./b\";\r\nexport interface A {\r\n b: B;\r\n foo: any;\r\n}\r\n//# sourceMappingURL=a.d.ts.map" + }, + "./src/index.ts": { + "version": "1286756397-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n", + "signature": "14762544269-export { A } from \"./a\";\r\nexport { B } from \"./b\";\r\nexport { C } from \"./c\";\r\n//# sourceMappingURL=index.d.ts.map" + } + }, + "options": { + "incremental": true, + "target": 1, + "module": 1, + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "outDir": "./lib", + "composite": true, + "strict": true, + "esModuleInterop": true, + "alwaysStrict": true, + "rootDir": "./src", + "emitDeclarationOnly": true, + "configFilePath": "./tsconfig.json" + }, + "referencedMap": { + "./src/a.ts": [ + "./src/b.ts" + ], + "./src/b.ts": [ + "./src/c.ts" + ], + "./src/c.ts": [ + "./src/a.ts" + ], + "./src/index.ts": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + }, + "exportedModulesMap": { + "./src/a.ts": [ + "./src/b.ts" + ], + "./src/b.ts": [ + "./src/c.ts" + ], + "./src/c.ts": [ + "./src/a.ts" + ], + "./src/index.ts": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/index.ts" + ] + }, + "version": "FakeTSVersion" +} + diff --git a/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-changes/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js b/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-changes/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js new file mode 100644 index 00000000000..a86656dbed5 --- /dev/null +++ b/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-changes/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js @@ -0,0 +1,99 @@ +//// [/src/lib/a.d.ts] +import { B } from "./b"; +export interface A { + b: B; + foo: any; +} + + +//// [/src/src/a.ts] +import { B } from "./b"; + +export interface A { + b: B; foo: any; +} + + +//// [/src/tsconfig.tsbuildinfo] +{ + "program": { + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" + }, + "./src/c.ts": { + "version": "429593025-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n", + "signature": "-2697851509-import { A } from \"./a\";\r\nexport interface C {\r\n a: A;\r\n}\r\n" + }, + "./src/b.ts": { + "version": "-2273488249-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n", + "signature": "20298635505-import { C } from \"./c\";\r\nexport interface B {\r\n b: C;\r\n}\r\n" + }, + "./src/a.ts": { + "version": "-14761736732-import { B } from \"./b\";\n\nexport interface A {\n b: B; foo: any;\n}\n", + "signature": "-7639584379-import { B } from \"./b\";\r\nexport interface A {\r\n b: B;\r\n foo: any;\r\n}\r\n" + }, + "./src/index.ts": { + "version": "1286756397-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n", + "signature": "-6009477228-export { A } from \"./a\";\r\nexport { B } from \"./b\";\r\nexport { C } from \"./c\";\r\n" + } + }, + "options": { + "incremental": true, + "target": 1, + "module": 1, + "declaration": true, + "sourceMap": true, + "outDir": "./lib", + "composite": true, + "strict": true, + "esModuleInterop": true, + "alwaysStrict": true, + "rootDir": "./src", + "emitDeclarationOnly": true, + "configFilePath": "./tsconfig.json" + }, + "referencedMap": { + "./src/a.ts": [ + "./src/b.ts" + ], + "./src/b.ts": [ + "./src/c.ts" + ], + "./src/c.ts": [ + "./src/a.ts" + ], + "./src/index.ts": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + }, + "exportedModulesMap": { + "./src/a.ts": [ + "./src/b.ts" + ], + "./src/b.ts": [ + "./src/c.ts" + ], + "./src/c.ts": [ + "./src/a.ts" + ], + "./src/index.ts": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/index.ts" + ] + }, + "version": "FakeTSVersion" +} + diff --git a/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-changes/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js b/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-changes/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js new file mode 100644 index 00000000000..8a70278d315 --- /dev/null +++ b/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-changes/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js @@ -0,0 +1,84 @@ +//// [/src/lib/a.d.ts] +export declare class B { + prop: string; +} +export interface A { + b: B; + foo: any; +} +//# sourceMappingURL=a.d.ts.map + +//// [/src/lib/a.d.ts.map] +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["../src/a.ts"],"names":[],"mappings":"AAAA,qBAAa,CAAC;IAAG,IAAI,SAAW;CAAE;AAElC,MAAM,WAAW,CAAC;IAChB,CAAC,EAAE,CAAC,CAAC;IAAC,GAAG,EAAE,GAAG,CAAC;CAChB"} + +//// [/src/src/a.ts] +export class B { prop = "hello"; } + +export interface A { + b: B; foo: any; +} + + +//// [/src/tsconfig.tsbuildinfo] +{ + "program": { + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" + }, + "./src/a.ts": { + "version": "7973388544-export class B { prop = \"hello\"; }\n\nexport interface A {\n b: B; foo: any;\n}\n", + "signature": "3224647069-export declare class B {\r\n prop: string;\r\n}\r\nexport interface A {\r\n b: B;\r\n foo: any;\r\n}\r\n//# sourceMappingURL=a.d.ts.map" + }, + "./src/c.ts": { + "version": "429593025-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n", + "signature": "-21569163793-import { A } from \"./a\";\r\nexport interface C {\r\n a: A;\r\n}\r\n//# sourceMappingURL=c.d.ts.map" + }, + "./src/b.ts": { + "version": "-2273488249-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n", + "signature": "25318058868-import { C } from \"./c\";\r\nexport interface B {\r\n b: C;\r\n}\r\n//# sourceMappingURL=b.d.ts.map" + } + }, + "options": { + "incremental": true, + "target": 1, + "module": 1, + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "outDir": "./lib", + "composite": true, + "strict": true, + "esModuleInterop": true, + "alwaysStrict": true, + "rootDir": "./src", + "emitDeclarationOnly": true, + "configFilePath": "./tsconfig.json" + }, + "referencedMap": { + "./src/b.ts": [ + "./src/c.ts" + ], + "./src/c.ts": [ + "./src/a.ts" + ] + }, + "exportedModulesMap": { + "./src/b.ts": [ + "./src/c.ts" + ], + "./src/c.ts": [ + "./src/a.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + }, + "version": "FakeTSVersion" +} + diff --git a/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-doesnt-change/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js b/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-doesnt-change/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js new file mode 100644 index 00000000000..7facc60eef5 --- /dev/null +++ b/tests/baselines/reference/tsbuild/emitDeclarationOnly/incremental-declaration-doesnt-change/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js @@ -0,0 +1,75 @@ +//// [/src/lib/a.d.ts.map] +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["../src/a.ts"],"names":[],"mappings":"AAAA,qBAAa,CAAC;IAAG,IAAI,SAAW;CAAE;AAGlC,MAAM,WAAW,CAAC;IAChB,CAAC,EAAE,CAAC,CAAC;CACN"} + +//// [/src/src/a.ts] +export class B { prop = "hello"; } + +class C { } +export interface A { + b: B; +} + + +//// [/src/tsconfig.tsbuildinfo] +{ + "program": { + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" + }, + "./src/a.ts": { + "version": "6651905050-export class B { prop = \"hello\"; }\n\nclass C { }\nexport interface A {\n b: B;\n}\n", + "signature": "-14608980923-export declare class B {\r\n prop: string;\r\n}\r\nexport interface A {\r\n b: B;\r\n}\r\n//# sourceMappingURL=a.d.ts.map" + }, + "./src/c.ts": { + "version": "429593025-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n", + "signature": "-21569163793-import { A } from \"./a\";\r\nexport interface C {\r\n a: A;\r\n}\r\n//# sourceMappingURL=c.d.ts.map" + }, + "./src/b.ts": { + "version": "-2273488249-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n", + "signature": "25318058868-import { C } from \"./c\";\r\nexport interface B {\r\n b: C;\r\n}\r\n//# sourceMappingURL=b.d.ts.map" + } + }, + "options": { + "incremental": true, + "target": 1, + "module": 1, + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "outDir": "./lib", + "composite": true, + "strict": true, + "esModuleInterop": true, + "alwaysStrict": true, + "rootDir": "./src", + "emitDeclarationOnly": true, + "configFilePath": "./tsconfig.json" + }, + "referencedMap": { + "./src/b.ts": [ + "./src/c.ts" + ], + "./src/c.ts": [ + "./src/a.ts" + ] + }, + "exportedModulesMap": { + "./src/b.ts": [ + "./src/c.ts" + ], + "./src/c.ts": [ + "./src/a.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + }, + "version": "FakeTSVersion" +} + diff --git a/tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-Build/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js b/tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-Build/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js new file mode 100644 index 00000000000..838bf28950f --- /dev/null +++ b/tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-Build/only-dts-output-in-circular-import-project-with-emitDeclarationOnly-and-declarationMap.js @@ -0,0 +1,123 @@ +//// [/src/lib/a.d.ts] +import { B } from "./b"; +export interface A { + b: B; +} +//# sourceMappingURL=a.d.ts.map + +//// [/src/lib/a.d.ts.map] +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["../src/a.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,CAAC;IAChB,CAAC,EAAE,CAAC,CAAC;CACN"} + +//// [/src/lib/b.d.ts] +import { C } from "./c"; +export interface B { + b: C; +} +//# sourceMappingURL=b.d.ts.map + +//// [/src/lib/b.d.ts.map] +{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["../src/b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,CAAC;IAChB,CAAC,EAAE,CAAC,CAAC;CACN"} + +//// [/src/lib/c.d.ts] +import { A } from "./a"; +export interface C { + a: A; +} +//# sourceMappingURL=c.d.ts.map + +//// [/src/lib/c.d.ts.map] +{"version":3,"file":"c.d.ts","sourceRoot":"","sources":["../src/c.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,CAAC;IAChB,CAAC,EAAE,CAAC,CAAC;CACN"} + +//// [/src/lib/index.d.ts] +export { A } from "./a"; +export { B } from "./b"; +export { C } from "./c"; +//# sourceMappingURL=index.d.ts.map + +//// [/src/lib/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC"} + +//// [/src/tsconfig.tsbuildinfo] +{ + "program": { + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" + }, + "./src/c.ts": { + "version": "429593025-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n", + "signature": "-21569163793-import { A } from \"./a\";\r\nexport interface C {\r\n a: A;\r\n}\r\n//# sourceMappingURL=c.d.ts.map" + }, + "./src/b.ts": { + "version": "-2273488249-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n", + "signature": "25318058868-import { C } from \"./c\";\r\nexport interface B {\r\n b: C;\r\n}\r\n//# sourceMappingURL=b.d.ts.map" + }, + "./src/a.ts": { + "version": "-15463561693-import { B } from \"./b\";\n\nexport interface A {\n b: B;\n}\n", + "signature": "-4935617457-import { B } from \"./b\";\r\nexport interface A {\r\n b: B;\r\n}\r\n//# sourceMappingURL=a.d.ts.map" + }, + "./src/index.ts": { + "version": "1286756397-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n", + "signature": "14762544269-export { A } from \"./a\";\r\nexport { B } from \"./b\";\r\nexport { C } from \"./c\";\r\n//# sourceMappingURL=index.d.ts.map" + } + }, + "options": { + "incremental": true, + "target": 1, + "module": 1, + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "outDir": "./lib", + "composite": true, + "strict": true, + "esModuleInterop": true, + "alwaysStrict": true, + "rootDir": "./src", + "emitDeclarationOnly": true, + "configFilePath": "./tsconfig.json" + }, + "referencedMap": { + "./src/a.ts": [ + "./src/b.ts" + ], + "./src/b.ts": [ + "./src/c.ts" + ], + "./src/c.ts": [ + "./src/a.ts" + ], + "./src/index.ts": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + }, + "exportedModulesMap": { + "./src/a.ts": [ + "./src/b.ts" + ], + "./src/b.ts": [ + "./src/c.ts" + ], + "./src/c.ts": [ + "./src/a.ts" + ], + "./src/index.ts": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/index.ts" + ] + }, + "version": "FakeTSVersion" +} + diff --git a/tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-Build/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js b/tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-Build/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js new file mode 100644 index 00000000000..d07b0914c32 --- /dev/null +++ b/tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-Build/only-dts-output-in-circular-import-project-with-emitDeclarationOnly.js @@ -0,0 +1,132 @@ +//// [/src/lib/a.d.ts] +import { B } from "./b"; +export interface A { + b: B; +} + + +//// [/src/lib/b.d.ts] +import { C } from "./c"; +export interface B { + b: C; +} + + +//// [/src/lib/c.d.ts] +import { A } from "./a"; +export interface C { + a: A; +} + + +//// [/src/lib/index.d.ts] +export { A } from "./a"; +export { B } from "./b"; +export { C } from "./c"; + + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + "declaration": true, /* Generates corresponding '.d.ts' file. */ + /* Generates a sourcemap for each corresponding '.d.ts' file. */ + "sourceMap": true, /* Generates corresponding '.map' file. */ + "outDir": "./lib", /* Redirect output structure to the directory. */ + "composite": true, /* Enable project compilation */ + "strict": true, /* Enable all strict type-checking options. */ + + "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + + "alwaysStrict": true, + "rootDir": "src", + "emitDeclarationOnly": true + } +} + + +//// [/src/tsconfig.tsbuildinfo] +{ + "program": { + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" + }, + "./src/c.ts": { + "version": "429593025-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n", + "signature": "-2697851509-import { A } from \"./a\";\r\nexport interface C {\r\n a: A;\r\n}\r\n" + }, + "./src/b.ts": { + "version": "-2273488249-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n", + "signature": "20298635505-import { C } from \"./c\";\r\nexport interface B {\r\n b: C;\r\n}\r\n" + }, + "./src/a.ts": { + "version": "-15463561693-import { B } from \"./b\";\n\nexport interface A {\n b: B;\n}\n", + "signature": "-4206296467-import { B } from \"./b\";\r\nexport interface A {\r\n b: B;\r\n}\r\n" + }, + "./src/index.ts": { + "version": "1286756397-export { A } from \"./a\";\nexport { B } from \"./b\";\nexport { C } from \"./c\";\n", + "signature": "-6009477228-export { A } from \"./a\";\r\nexport { B } from \"./b\";\r\nexport { C } from \"./c\";\r\n" + } + }, + "options": { + "incremental": true, + "target": 1, + "module": 1, + "declaration": true, + "sourceMap": true, + "outDir": "./lib", + "composite": true, + "strict": true, + "esModuleInterop": true, + "alwaysStrict": true, + "rootDir": "./src", + "emitDeclarationOnly": true, + "configFilePath": "./tsconfig.json" + }, + "referencedMap": { + "./src/a.ts": [ + "./src/b.ts" + ], + "./src/b.ts": [ + "./src/c.ts" + ], + "./src/c.ts": [ + "./src/a.ts" + ], + "./src/index.ts": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + }, + "exportedModulesMap": { + "./src/a.ts": [ + "./src/b.ts" + ], + "./src/b.ts": [ + "./src/c.ts" + ], + "./src/c.ts": [ + "./src/a.ts" + ], + "./src/index.ts": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/index.ts" + ] + }, + "version": "FakeTSVersion" +} + diff --git a/tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-Build/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js b/tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-Build/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js new file mode 100644 index 00000000000..86f7dc6e8bc --- /dev/null +++ b/tests/baselines/reference/tsbuild/emitDeclarationOnly/initial-Build/only-dts-output-in-non-circular-imports-project-with-emitDeclarationOnly.js @@ -0,0 +1,104 @@ +//// [/src/lib/a.d.ts] +export declare class B { + prop: string; +} +export interface A { + b: B; +} +//# sourceMappingURL=a.d.ts.map + +//// [/src/lib/a.d.ts.map] +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["../src/a.ts"],"names":[],"mappings":"AAAA,qBAAa,CAAC;IAAG,IAAI,SAAW;CAAE;AAElC,MAAM,WAAW,CAAC;IAChB,CAAC,EAAE,CAAC,CAAC;CACN"} + +//// [/src/lib/b.d.ts] +import { C } from "./c"; +export interface B { + b: C; +} +//# sourceMappingURL=b.d.ts.map + +//// [/src/lib/b.d.ts.map] +{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["../src/b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,CAAC;IAChB,CAAC,EAAE,CAAC,CAAC;CACN"} + +//// [/src/lib/c.d.ts] +import { A } from "./a"; +export interface C { + a: A; +} +//# sourceMappingURL=c.d.ts.map + +//// [/src/lib/c.d.ts.map] +{"version":3,"file":"c.d.ts","sourceRoot":"","sources":["../src/c.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,CAAC;IAChB,CAAC,EAAE,CAAC,CAAC;CACN"} + +//// [/src/src/index.ts] unlink +//// [/src/src/a.ts] +export class B { prop = "hello"; } + +export interface A { + b: B; +} + + +//// [/src/tsconfig.tsbuildinfo] +{ + "program": { + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" + }, + "./src/a.ts": { + "version": "11179224639-export class B { prop = \"hello\"; }\n\nexport interface A {\n b: B;\n}\n", + "signature": "-14608980923-export declare class B {\r\n prop: string;\r\n}\r\nexport interface A {\r\n b: B;\r\n}\r\n//# sourceMappingURL=a.d.ts.map" + }, + "./src/c.ts": { + "version": "429593025-import { A } from \"./a\";\n\nexport interface C {\n a: A;\n}\n", + "signature": "-21569163793-import { A } from \"./a\";\r\nexport interface C {\r\n a: A;\r\n}\r\n//# sourceMappingURL=c.d.ts.map" + }, + "./src/b.ts": { + "version": "-2273488249-import { C } from \"./c\";\n\nexport interface B {\n b: C;\n}\n", + "signature": "25318058868-import { C } from \"./c\";\r\nexport interface B {\r\n b: C;\r\n}\r\n//# sourceMappingURL=b.d.ts.map" + } + }, + "options": { + "incremental": true, + "target": 1, + "module": 1, + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "outDir": "./lib", + "composite": true, + "strict": true, + "esModuleInterop": true, + "alwaysStrict": true, + "rootDir": "./src", + "emitDeclarationOnly": true, + "configFilePath": "./tsconfig.json" + }, + "referencedMap": { + "./src/b.ts": [ + "./src/c.ts" + ], + "./src/c.ts": [ + "./src/a.ts" + ] + }, + "exportedModulesMap": { + "./src/b.ts": [ + "./src/c.ts" + ], + "./src/c.ts": [ + "./src/a.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts" + ] + }, + "version": "FakeTSVersion" +} + diff --git a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/incremental-declaration-changes/inferred-type-from-transitive-module.js b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/incremental-declaration-changes/inferred-type-from-transitive-module.js index 0c32ba7c167..727875a5d40 100644 --- a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/incremental-declaration-changes/inferred-type-from-transitive-module.js +++ b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/incremental-declaration-changes/inferred-type-from-transitive-module.js @@ -31,28 +31,28 @@ export declare const lazyBar: LazyAction<() => void, typeof import("./lazyIndex" "program": { "fileInfos": { "../../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "../bar.ts": { - "version": "747071916", - "signature": "-9232740537" + "version": "747071916-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(): void {\r\n});", + "signature": "-9232740537-declare const _default: () => void;\r\nexport default _default;\r\n" }, "../bundling.ts": { - "version": "-21659820217", - "signature": "-40032907372" + "version": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n", + "signature": "-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n" }, "../global.d.ts": { - "version": "-9780226215", - "signature": "-9780226215" + "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", + "signature": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}" }, "../lazyindex.ts": { - "version": "-6956449754", - "signature": "-6224542381" + "version": "-6956449754-export { default as bar } from './bar';\n", + "signature": "-6224542381-export { default as bar } from './bar';\r\n" }, "../index.ts": { - "version": "-11602502901", - "signature": "6256067474" + "version": "-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);", + "signature": "6256067474-import { LazyAction } from './bundling';\r\nexport declare const lazyBar: LazyAction<() => void, typeof import(\"./lazyIndex\")>;\r\n" } }, "options": { diff --git a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-Build/inferred-type-from-transitive-module.js b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-Build/inferred-type-from-transitive-module.js index 2a6aee9c8db..a04669bd971 100644 --- a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-Build/inferred-type-from-transitive-module.js +++ b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/initial-Build/inferred-type-from-transitive-module.js @@ -69,28 +69,28 @@ exports.bar = bar_1.default; "program": { "fileInfos": { "../../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "../bar.ts": { - "version": "5936740878", - "signature": "11191036521" + "version": "5936740878-interface RawAction {\r\n (...args: any[]): Promise | void;\r\n}\r\ninterface ActionFactory {\r\n (target: T): T;\r\n}\r\ndeclare function foo(): ActionFactory;\r\nexport default foo()(function foobar(param: string): void {\r\n});", + "signature": "11191036521-declare const _default: (param: string) => void;\r\nexport default _default;\r\n" }, "../bundling.ts": { - "version": "-21659820217", - "signature": "-40032907372" + "version": "-21659820217-export class LazyModule {\r\n constructor(private importCallback: () => Promise) {}\r\n}\r\n\r\nexport class LazyAction<\r\n TAction extends (...args: any[]) => any,\r\n TModule\r\n> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\r\n }\r\n}\r\n", + "signature": "-40032907372-export declare class LazyModule {\r\n private importCallback;\r\n constructor(importCallback: () => Promise);\r\n}\r\nexport declare class LazyAction any, TModule> {\r\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\r\n}\r\n" }, "../global.d.ts": { - "version": "-9780226215", - "signature": "-9780226215" + "version": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}", + "signature": "-9780226215-interface PromiseConstructor {\r\n new (): Promise;\r\n}\r\ndeclare var Promise: PromiseConstructor;\r\ninterface Promise {\r\n}" }, "../lazyindex.ts": { - "version": "-6956449754", - "signature": "-6224542381" + "version": "-6956449754-export { default as bar } from './bar';\n", + "signature": "-6224542381-export { default as bar } from './bar';\r\n" }, "../index.ts": { - "version": "-11602502901", - "signature": "18468008756" + "version": "-11602502901-import { LazyAction, LazyModule } from './bundling';\r\nconst lazyModule = new LazyModule(() =>\r\n import('./lazyIndex')\r\n);\r\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);", + "signature": "18468008756-import { LazyAction } from './bundling';\r\nexport declare const lazyBar: LazyAction<(param: string) => void, typeof import(\"./lazyIndex\")>;\r\n" } }, "options": { diff --git a/tests/baselines/reference/tsbuild/lateBoundSymbol/incremental-declaration-doesnt-change/interface-is-merged-and-contains-late-bound-member.js b/tests/baselines/reference/tsbuild/lateBoundSymbol/incremental-declaration-doesnt-change/interface-is-merged-and-contains-late-bound-member.js index 84fe88219b1..bdd69739968 100644 --- a/tests/baselines/reference/tsbuild/lateBoundSymbol/incremental-declaration-doesnt-change/interface-is-merged-and-contains-late-bound-member.js +++ b/tests/baselines/reference/tsbuild/lateBoundSymbol/incremental-declaration-doesnt-change/interface-is-merged-and-contains-late-bound-member.js @@ -22,20 +22,20 @@ type A = HKT[typeof sym]; "program": { "fileInfos": { "../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "./src/globals.d.ts": { - "version": "-1994196675", - "signature": "-1994196675" + "version": "-1994196675-interface SymbolConstructor {\n (description?: string | number): symbol;\n}\ndeclare var Symbol: SymbolConstructor;", + "signature": "-1994196675-interface SymbolConstructor {\n (description?: string | number): symbol;\n}\ndeclare var Symbol: SymbolConstructor;" }, "./src/hkt.ts": { - "version": "675797797", - "signature": "2373810515" + "version": "675797797-export interface HKT { }", + "signature": "2373810515-export interface HKT {\r\n}\r\n" }, "./src/main.ts": { - "version": "-27494779858", - "signature": "-7779857705" + "version": "-27494779858-import { HKT } from \"./hkt\";\r\n\r\nconst sym = Symbol();\r\n\r\ndeclare module \"./hkt\" {\r\n interface HKT {\r\n [sym]: { a: T }\r\n }\r\n}\r\n\r\ntype A = HKT[typeof sym];", + "signature": "-7779857705-declare const sym: unique symbol;\r\ndeclare module \"./hkt\" {\r\n interface HKT {\r\n [sym]: {\r\n a: T;\r\n };\r\n }\r\n}\r\nexport {};\r\n" } }, "options": { diff --git a/tests/baselines/reference/tsbuild/lateBoundSymbol/initial-Build/interface-is-merged-and-contains-late-bound-member.js b/tests/baselines/reference/tsbuild/lateBoundSymbol/initial-Build/interface-is-merged-and-contains-late-bound-member.js index afb887c35f8..949eb773431 100644 --- a/tests/baselines/reference/tsbuild/lateBoundSymbol/initial-Build/interface-is-merged-and-contains-late-bound-member.js +++ b/tests/baselines/reference/tsbuild/lateBoundSymbol/initial-Build/interface-is-merged-and-contains-late-bound-member.js @@ -15,20 +15,20 @@ var x = 10; "program": { "fileInfos": { "../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "./src/globals.d.ts": { - "version": "-1994196675", - "signature": "-1994196675" + "version": "-1994196675-interface SymbolConstructor {\n (description?: string | number): symbol;\n}\ndeclare var Symbol: SymbolConstructor;", + "signature": "-1994196675-interface SymbolConstructor {\n (description?: string | number): symbol;\n}\ndeclare var Symbol: SymbolConstructor;" }, "./src/hkt.ts": { - "version": "675797797", - "signature": "2373810515" + "version": "675797797-export interface HKT { }", + "signature": "2373810515-export interface HKT {\r\n}\r\n" }, "./src/main.ts": { - "version": "-28387946490", - "signature": "-7779857705" + "version": "-28387946490-import { HKT } from \"./hkt\";\r\n\r\nconst sym = Symbol();\r\n\r\ndeclare module \"./hkt\" {\r\n interface HKT {\r\n [sym]: { a: T }\r\n }\r\n}\r\nconst x = 10;\r\ntype A = HKT[typeof sym];", + "signature": "-7779857705-declare const sym: unique symbol;\r\ndeclare module \"./hkt\" {\r\n interface HKT {\r\n [sym]: {\r\n a: T;\r\n };\r\n }\r\n}\r\nexport {};\r\n" } }, "options": { diff --git a/tests/baselines/reference/tsbuild/moduleSpecifiers/initial-Build/synthesized-module-specifiers-resolve-correctly.js b/tests/baselines/reference/tsbuild/moduleSpecifiers/initial-Build/synthesized-module-specifiers-resolve-correctly.js new file mode 100644 index 00000000000..cd12638d637 --- /dev/null +++ b/tests/baselines/reference/tsbuild/moduleSpecifiers/initial-Build/synthesized-module-specifiers-resolve-correctly.js @@ -0,0 +1,168 @@ +//// [/lib/src/common/nominal.d.ts] +export declare type Nominal = T & { + [Symbol.species]: Name; +}; + + +//// [/lib/src/common/nominal.js] +"use strict"; +exports.__esModule = true; + + +//// [/lib/src/common/tsconfig.tsbuildinfo] +{ + "program": { + "fileInfos": { + "../../lib.d.ts": { + "version": "-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n", + "signature": "-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n" + }, + "../../../src/common/nominal.ts": { + "version": "-24498031910-export declare type Nominal = T & {\n [Symbol.species]: Name;\n};\n", + "signature": "-9513375615-export declare type Nominal = T & {\r\n [Symbol.species]: Name;\r\n};\r\n" + } + }, + "options": { + "skipLibCheck": true, + "rootDir": "../../..", + "outDir": "../..", + "composite": true, + "configFilePath": "../../../src/common/tsconfig.json" + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../src/common/nominal.ts", + "../../lib.d.ts" + ] + }, + "version": "FakeTSVersion" +} + +//// [/lib/src/sub-project/index.d.ts] +import { Nominal } from '../common/nominal'; +export declare type MyNominal = Nominal; + + +//// [/lib/src/sub-project/index.js] +"use strict"; +exports.__esModule = true; + + +//// [/lib/src/sub-project/tsconfig.tsbuildinfo] +{ + "program": { + "fileInfos": { + "../../lib.d.ts": { + "version": "-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n", + "signature": "-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n" + }, + "../../../src/common/nominal.ts": { + "version": "-9513375615-export declare type Nominal = T & {\r\n [Symbol.species]: Name;\r\n};\r\n", + "signature": "-9513375615-export declare type Nominal = T & {\r\n [Symbol.species]: Name;\r\n};\r\n" + }, + "../../../src/sub-project/index.ts": { + "version": "-22894055505-import { Nominal } from '../common/nominal';\n\nexport type MyNominal = Nominal;\n", + "signature": "-21416888433-import { Nominal } from '../common/nominal';\r\nexport declare type MyNominal = Nominal;\r\n" + } + }, + "options": { + "skipLibCheck": true, + "rootDir": "../../..", + "outDir": "../..", + "composite": true, + "configFilePath": "../../../src/sub-project/tsconfig.json" + }, + "referencedMap": { + "../../../src/sub-project/index.ts": [ + "../common/nominal.d.ts" + ] + }, + "exportedModulesMap": { + "../../../src/sub-project/index.ts": [ + "../common/nominal.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../src/common/nominal.ts", + "../../../src/sub-project/index.ts", + "../../lib.d.ts" + ] + }, + "version": "FakeTSVersion" +} + +//// [/lib/src/sub-project-2/index.d.ts] +declare const variable: { + key: import("../common/nominal").Nominal; +}; +export declare function getVar(): keyof typeof variable; +export {}; + + +//// [/lib/src/sub-project-2/index.js] +"use strict"; +exports.__esModule = true; +var variable = { + key: 'value' +}; +function getVar() { + return 'key'; +} +exports.getVar = getVar; + + +//// [/lib/src/sub-project-2/tsconfig.tsbuildinfo] +{ + "program": { + "fileInfos": { + "../../lib.d.ts": { + "version": "-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n", + "signature": "-32082413277-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };\ninterface SymbolConstructor {\n readonly species: symbol;\n readonly toStringTag: symbol;\n}\ndeclare var Symbol: SymbolConstructor;\ninterface Symbol {\n readonly [Symbol.toStringTag]: string;\n}\n" + }, + "../../../src/common/nominal.ts": { + "version": "-9513375615-export declare type Nominal = T & {\r\n [Symbol.species]: Name;\r\n};\r\n", + "signature": "-9513375615-export declare type Nominal = T & {\r\n [Symbol.species]: Name;\r\n};\r\n" + }, + "../../../src/sub-project/index.ts": { + "version": "-21416888433-import { Nominal } from '../common/nominal';\r\nexport declare type MyNominal = Nominal;\r\n", + "signature": "-21416888433-import { Nominal } from '../common/nominal';\r\nexport declare type MyNominal = Nominal;\r\n" + }, + "../../../src/sub-project-2/index.ts": { + "version": "-13939373533-import { MyNominal } from '../sub-project/index';\n\nconst variable = {\n key: 'value' as MyNominal,\n};\n\nexport function getVar(): keyof typeof variable {\n return 'key';\n}\n", + "signature": "-17233212183-declare const variable: {\r\n key: import(\"../common/nominal\").Nominal;\r\n};\r\nexport declare function getVar(): keyof typeof variable;\r\nexport {};\r\n" + } + }, + "options": { + "skipLibCheck": true, + "rootDir": "../../..", + "outDir": "../..", + "composite": true, + "configFilePath": "../../../src/sub-project-2/tsconfig.json" + }, + "referencedMap": { + "../../../src/sub-project-2/index.ts": [ + "../sub-project/index.d.ts" + ], + "../../../src/sub-project/index.ts": [ + "../common/nominal.d.ts" + ] + }, + "exportedModulesMap": { + "../../../src/sub-project-2/index.ts": [ + "../common/nominal.d.ts" + ], + "../../../src/sub-project/index.ts": [ + "../common/nominal.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../src/common/nominal.ts", + "../../../src/sub-project-2/index.ts", + "../../../src/sub-project/index.ts", + "../../lib.d.ts" + ] + }, + "version": "FakeTSVersion" +} + diff --git a/tests/baselines/reference/tsbuild/moduleSpecifiers/initial-build/resolves-correctly.js b/tests/baselines/reference/tsbuild/moduleSpecifiers/initial-build/resolves-correctly.js deleted file mode 100644 index 0994cf3c043..00000000000 --- a/tests/baselines/reference/tsbuild/moduleSpecifiers/initial-build/resolves-correctly.js +++ /dev/null @@ -1,348 +0,0 @@ -//// [/lib/src/common/nominal.d.ts] -export declare type Nominal = T & { - [Symbol.species]: Name; -}; - - -//// [/lib/src/common/nominal.js] -"use strict"; -exports.__esModule = true; - - -//// [/lib/src/common/tsconfig.tsbuildinfo] -{ - "program": { - "fileInfos": { - "../../../.ts/lib.es5.d.ts": { - "version": "776794059135", - "signature": "776794059135" - }, - "../../../.ts/lib.es2015.d.ts": { - "version": "57263133672", - "signature": "57263133672" - }, - "../../../.ts/lib.dom.d.ts": { - "version": "-1041975536091", - "signature": "-1041975536091" - }, - "../../../.ts/lib.es2015.core.d.ts": { - "version": "250160071717", - "signature": "250160071717" - }, - "../../../.ts/lib.es2015.collection.d.ts": { - "version": "-105748826588", - "signature": "-105748826588" - }, - "../../../.ts/lib.es2015.generator.d.ts": { - "version": "10837180865", - "signature": "10837180865" - }, - "../../../.ts/lib.es2015.iterable.d.ts": { - "version": "232404497324", - "signature": "232404497324" - }, - "../../../.ts/lib.es2015.promise.d.ts": { - "version": "235321148269", - "signature": "235321148269" - }, - "../../../.ts/lib.es2015.proxy.d.ts": { - "version": "55479865087", - "signature": "55479865087" - }, - "../../../.ts/lib.es2015.reflect.d.ts": { - "version": "30748787093", - "signature": "30748787093" - }, - "../../../.ts/lib.es2015.symbol.d.ts": { - "version": "9409688441", - "signature": "9409688441" - }, - "../../../.ts/lib.es2015.symbol.wellknown.d.ts": { - "version": "-67261006573", - "signature": "-67261006573" - }, - "../../../src/common/nominal.ts": { - "version": "-24498031910", - "signature": "-24498031910" - } - }, - "options": { - "skipLibCheck": true, - "rootDir": "../../..", - "outDir": "../..", - "lib": [ - "lib.dom.d.ts", - "lib.es2015.d.ts", - "lib.es2015.symbol.wellknown.d.ts" - ], - "composite": true, - "configFilePath": "../../../src/common/tsconfig.json" - }, - "referencedMap": {}, - "exportedModulesMap": {}, - "semanticDiagnosticsPerFile": [ - "../../../.ts/lib.dom.d.ts", - "../../../.ts/lib.es2015.collection.d.ts", - "../../../.ts/lib.es2015.core.d.ts", - "../../../.ts/lib.es2015.d.ts", - "../../../.ts/lib.es2015.generator.d.ts", - "../../../.ts/lib.es2015.iterable.d.ts", - "../../../.ts/lib.es2015.promise.d.ts", - "../../../.ts/lib.es2015.proxy.d.ts", - "../../../.ts/lib.es2015.reflect.d.ts", - "../../../.ts/lib.es2015.symbol.d.ts", - "../../../.ts/lib.es2015.symbol.wellknown.d.ts", - "../../../.ts/lib.es5.d.ts", - "../../../src/common/nominal.ts" - ] - }, - "version": "FakeTSVersion" -} - -//// [/lib/src/sub-project/index.d.ts] -import { Nominal } from '../common/nominal'; -export declare type MyNominal = Nominal; - - -//// [/lib/src/sub-project/index.js] -"use strict"; -exports.__esModule = true; - - -//// [/lib/src/sub-project/tsconfig.tsbuildinfo] -{ - "program": { - "fileInfos": { - "../../../.ts/lib.es5.d.ts": { - "version": "776794059135", - "signature": "776794059135" - }, - "../../../.ts/lib.es2015.d.ts": { - "version": "57263133672", - "signature": "57263133672" - }, - "../../../.ts/lib.dom.d.ts": { - "version": "-1041975536091", - "signature": "-1041975536091" - }, - "../../../.ts/lib.es2015.core.d.ts": { - "version": "250160071717", - "signature": "250160071717" - }, - "../../../.ts/lib.es2015.collection.d.ts": { - "version": "-105748826588", - "signature": "-105748826588" - }, - "../../../.ts/lib.es2015.generator.d.ts": { - "version": "10837180865", - "signature": "10837180865" - }, - "../../../.ts/lib.es2015.iterable.d.ts": { - "version": "232404497324", - "signature": "232404497324" - }, - "../../../.ts/lib.es2015.promise.d.ts": { - "version": "235321148269", - "signature": "235321148269" - }, - "../../../.ts/lib.es2015.proxy.d.ts": { - "version": "55479865087", - "signature": "55479865087" - }, - "../../../.ts/lib.es2015.reflect.d.ts": { - "version": "30748787093", - "signature": "30748787093" - }, - "../../../.ts/lib.es2015.symbol.d.ts": { - "version": "9409688441", - "signature": "9409688441" - }, - "../../../.ts/lib.es2015.symbol.wellknown.d.ts": { - "version": "-67261006573", - "signature": "-67261006573" - }, - "../../../src/common/nominal.ts": { - "version": "-24498031910", - "signature": "-24498031910" - }, - "../../../src/sub-project/index.ts": { - "version": "-22894055505", - "signature": "-18559108619" - } - }, - "options": { - "skipLibCheck": true, - "rootDir": "../../..", - "outDir": "../..", - "lib": [ - "lib.dom.d.ts", - "lib.es2015.d.ts", - "lib.es2015.symbol.wellknown.d.ts" - ], - "composite": true, - "configFilePath": "../../../src/sub-project/tsconfig.json" - }, - "referencedMap": { - "../../../src/sub-project/index.ts": [ - "../common/nominal.d.ts" - ] - }, - "exportedModulesMap": { - "../../../src/sub-project/index.ts": [ - "../common/nominal.d.ts" - ] - }, - "semanticDiagnosticsPerFile": [ - "../../../.ts/lib.dom.d.ts", - "../../../.ts/lib.es2015.collection.d.ts", - "../../../.ts/lib.es2015.core.d.ts", - "../../../.ts/lib.es2015.d.ts", - "../../../.ts/lib.es2015.generator.d.ts", - "../../../.ts/lib.es2015.iterable.d.ts", - "../../../.ts/lib.es2015.promise.d.ts", - "../../../.ts/lib.es2015.proxy.d.ts", - "../../../.ts/lib.es2015.reflect.d.ts", - "../../../.ts/lib.es2015.symbol.d.ts", - "../../../.ts/lib.es2015.symbol.wellknown.d.ts", - "../../../.ts/lib.es5.d.ts", - "../../../src/common/nominal.ts", - "../../../src/sub-project/index.ts" - ] - }, - "version": "FakeTSVersion" -} - -//// [/lib/src/sub-project-2/index.d.ts] -declare const variable: { - key: import("../common/nominal").Nominal; -}; -export declare function getVar(): keyof typeof variable; -export {}; - - -//// [/lib/src/sub-project-2/index.js] -"use strict"; -exports.__esModule = true; -var variable = { - key: 'value' -}; -function getVar() { - return 'key'; -} -exports.getVar = getVar; - - -//// [/lib/src/sub-project-2/tsconfig.tsbuildinfo] -{ - "program": { - "fileInfos": { - "../../../.ts/lib.es5.d.ts": { - "version": "776794059135", - "signature": "776794059135" - }, - "../../../.ts/lib.es2015.d.ts": { - "version": "57263133672", - "signature": "57263133672" - }, - "../../../.ts/lib.dom.d.ts": { - "version": "-1041975536091", - "signature": "-1041975536091" - }, - "../../../.ts/lib.es2015.core.d.ts": { - "version": "250160071717", - "signature": "250160071717" - }, - "../../../.ts/lib.es2015.collection.d.ts": { - "version": "-105748826588", - "signature": "-105748826588" - }, - "../../../.ts/lib.es2015.generator.d.ts": { - "version": "10837180865", - "signature": "10837180865" - }, - "../../../.ts/lib.es2015.iterable.d.ts": { - "version": "232404497324", - "signature": "232404497324" - }, - "../../../.ts/lib.es2015.promise.d.ts": { - "version": "235321148269", - "signature": "235321148269" - }, - "../../../.ts/lib.es2015.proxy.d.ts": { - "version": "55479865087", - "signature": "55479865087" - }, - "../../../.ts/lib.es2015.reflect.d.ts": { - "version": "30748787093", - "signature": "30748787093" - }, - "../../../.ts/lib.es2015.symbol.d.ts": { - "version": "9409688441", - "signature": "9409688441" - }, - "../../../.ts/lib.es2015.symbol.wellknown.d.ts": { - "version": "-67261006573", - "signature": "-67261006573" - }, - "../../../src/common/nominal.ts": { - "version": "-24498031910", - "signature": "-24498031910" - }, - "../../../src/sub-project/index.ts": { - "version": "-18559108619", - "signature": "-18559108619" - }, - "../../../src/sub-project-2/index.ts": { - "version": "-13939373533", - "signature": "-33844181688" - } - }, - "options": { - "skipLibCheck": true, - "rootDir": "../../..", - "outDir": "../..", - "lib": [ - "lib.dom.d.ts", - "lib.es2015.d.ts", - "lib.es2015.symbol.wellknown.d.ts" - ], - "composite": true, - "configFilePath": "../../../src/sub-project-2/tsconfig.json" - }, - "referencedMap": { - "../../../src/sub-project-2/index.ts": [ - "../sub-project/index.d.ts" - ], - "../../../src/sub-project/index.ts": [ - "../common/nominal.d.ts" - ] - }, - "exportedModulesMap": { - "../../../src/sub-project-2/index.ts": [ - "../common/nominal.d.ts" - ], - "../../../src/sub-project/index.ts": [ - "../common/nominal.d.ts" - ] - }, - "semanticDiagnosticsPerFile": [ - "../../../.ts/lib.dom.d.ts", - "../../../.ts/lib.es2015.collection.d.ts", - "../../../.ts/lib.es2015.core.d.ts", - "../../../.ts/lib.es2015.d.ts", - "../../../.ts/lib.es2015.generator.d.ts", - "../../../.ts/lib.es2015.iterable.d.ts", - "../../../.ts/lib.es2015.promise.d.ts", - "../../../.ts/lib.es2015.proxy.d.ts", - "../../../.ts/lib.es2015.reflect.d.ts", - "../../../.ts/lib.es2015.symbol.d.ts", - "../../../.ts/lib.es2015.symbol.wellknown.d.ts", - "../../../.ts/lib.es5.d.ts", - "../../../src/common/nominal.ts", - "../../../src/sub-project-2/index.ts", - "../../../src/sub-project/index.ts" - ] - }, - "version": "FakeTSVersion" -} - diff --git a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/sample.js b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/sample.js index be4e09ba5b5..f1124ae44eb 100644 --- a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/sample.js +++ b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/sample.js @@ -172,20 +172,20 @@ export class someClass { } "program": { "fileInfos": { "../../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "./anothermodule.ts": { - "version": "-2676574883", - "signature": "25219880154" + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" }, "./index.ts": { - "version": "-13387000654", - "signature": "12514354613" + "version": "-13387000654-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nexport class someClass { }", + "signature": "-2069755619-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n//# sourceMappingURL=index.d.ts.map" }, "./some_decl.d.ts": { - "version": "-9253692965", - "signature": "-9253692965" + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n" } }, "options": { @@ -212,20 +212,20 @@ export class someClass { } "program": { "fileInfos": { "../../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "../core/index.ts": { - "version": "-2069755619", - "signature": "-2069755619" + "version": "-2069755619-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-2069755619-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n//# sourceMappingURL=index.d.ts.map" }, "../core/anothermodule.ts": { - "version": "7652028357", - "signature": "7652028357" + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" }, "./index.ts": { - "version": "-5786964698", - "signature": "-6548680073" + "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -262,24 +262,24 @@ export class someClass { } "program": { "fileInfos": { "../../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "../core/index.ts": { - "version": "-2069755619", - "signature": "-2069755619" + "version": "-2069755619-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-2069755619-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\nexport declare class someClass {\r\n}\r\n//# sourceMappingURL=index.d.ts.map" }, "../core/anothermodule.ts": { - "version": "7652028357", - "signature": "7652028357" + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" }, "../logic/index.ts": { - "version": "-6548680073", - "signature": "-6548680073" + "version": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" }, "./index.ts": { - "version": "12336236525", - "signature": "-9209611" + "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-declaration-option-changes.js b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-declaration-option-changes.js index bf28ddcc386..8a87cafe69e 100644 --- a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-declaration-option-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-declaration-option-changes.js @@ -21,20 +21,20 @@ export declare function multiply(a: number, b: number): number; "program": { "fileInfos": { "../../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "./anothermodule.ts": { - "version": "-2676574883", - "signature": "-8396256275" + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { - "version": "-18749805970", - "signature": "1874987148" + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" }, "./some_decl.d.ts": { - "version": "-9253692965", - "signature": "-9253692965" + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n" } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-esModuleInterop-option-changes.js b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-esModuleInterop-option-changes.js index e93ed540970..ce9044faa05 100644 --- a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-esModuleInterop-option-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-esModuleInterop-option-changes.js @@ -37,24 +37,24 @@ exports.m = mod; "program": { "fileInfos": { "../../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "../core/index.ts": { - "version": "-13851440507", - "signature": "-13851440507" + "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" }, "../core/anothermodule.ts": { - "version": "7652028357", - "signature": "7652028357" + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" }, "../logic/index.ts": { - "version": "-6548680073", - "signature": "-6548680073" + "version": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" }, "./index.ts": { - "version": "12336236525", - "signature": "-9209611" + "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-logic-config-changes-declaration-dir.js b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-logic-config-changes-declaration-dir.js index 13204cdf566..13d6ef5c3ba 100644 --- a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-logic-config-changes-declaration-dir.js +++ b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-logic-config-changes-declaration-dir.js @@ -25,20 +25,20 @@ export declare const m: typeof mod; "program": { "fileInfos": { "../../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "../core/index.ts": { - "version": "-13851440507", - "signature": "-13851440507" + "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" }, "../core/anothermodule.ts": { - "version": "7652028357", - "signature": "7652028357" + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" }, "./index.ts": { - "version": "-5786964698", - "signature": "-6548680073" + "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -76,24 +76,24 @@ export declare const m: typeof mod; "program": { "fileInfos": { "../../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "../core/index.ts": { - "version": "-13851440507", - "signature": "-13851440507" + "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" }, "../core/anothermodule.ts": { - "version": "7652028357", - "signature": "7652028357" + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" }, "../logic/index.ts": { - "version": "-6548680073", - "signature": "-6548680073" + "version": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" }, "./index.ts": { - "version": "12336236525", - "signature": "-9209611" + "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-module-option-changes.js b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-module-option-changes.js index bda1af5741c..d6c6fb4d877 100644 --- a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-module-option-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-module-option-changes.js @@ -31,20 +31,20 @@ define(["require", "exports"], function (require, exports) { "program": { "fileInfos": { "../../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "./anothermodule.ts": { - "version": "-2676574883", - "signature": "-8396256275" + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { - "version": "-18749805970", - "signature": "1874987148" + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" }, "./some_decl.d.ts": { - "version": "-9253692965", - "signature": "-9253692965" + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n" } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-target-option-changes.js b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-target-option-changes.js index 99721cc54b9..0dc8156158d 100644 --- a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-target-option-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-changes/when-target-option-changes.js @@ -29,24 +29,24 @@ exports.multiply = multiply; "program": { "fileInfos": { "../../lib/lib.d.ts": { - "version": "8926001564", - "signature": "8926001564" + "version": "8926001564-/// \n/// ", + "signature": "8926001564-/// \n/// " }, "../../lib/lib.esnext.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "./anothermodule.ts": { - "version": "-2676574883", - "signature": "-8396256275" + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { - "version": "-18749805970", - "signature": "1874987148" + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" }, "./some_decl.d.ts": { - "version": "-9253692965", - "signature": "-9253692965" + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n" } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-doesnt-change/sample.js b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-doesnt-change/sample.js index 2b4b56abbf8..82e64bc9330 100644 --- a/tests/baselines/reference/tsbuild/sample1/incremental-declaration-doesnt-change/sample.js +++ b/tests/baselines/reference/tsbuild/sample1/incremental-declaration-doesnt-change/sample.js @@ -25,20 +25,20 @@ class someClass { } "program": { "fileInfos": { "../../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "./anothermodule.ts": { - "version": "-2676574883", - "signature": "25219880154" + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" }, "./index.ts": { - "version": "-16698397488", - "signature": "11051732871" + "version": "-16698397488-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n\nclass someClass { }", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" }, "./some_decl.d.ts": { - "version": "-9253692965", - "signature": "-9253692965" + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n" } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/initial-Build/sample.js b/tests/baselines/reference/tsbuild/sample1/initial-Build/sample.js index 829dbe1718f..7a9f9a2ea95 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-Build/sample.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-Build/sample.js @@ -185,20 +185,20 @@ exports.multiply = multiply; "program": { "fileInfos": { "../../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "./anothermodule.ts": { - "version": "-2676574883", - "signature": "25219880154" + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" }, "./index.ts": { - "version": "-18749805970", - "signature": "11051732871" + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" }, "./some_decl.d.ts": { - "version": "-9253692965", - "signature": "-9253692965" + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n" } }, "options": { @@ -370,20 +370,20 @@ sourceFile:index.ts "program": { "fileInfos": { "../../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "../core/index.ts": { - "version": "-13851440507", - "signature": "-13851440507" + "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" }, "../core/anothermodule.ts": { - "version": "7652028357", - "signature": "7652028357" + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" }, "./index.ts": { - "version": "-5786964698", - "signature": "-6548680073" + "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -436,24 +436,24 @@ exports.m = mod; "program": { "fileInfos": { "../../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "../core/index.ts": { - "version": "-13851440507", - "signature": "-13851440507" + "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" }, "../core/anothermodule.ts": { - "version": "7652028357", - "signature": "7652028357" + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" }, "../logic/index.ts": { - "version": "-6548680073", - "signature": "-6548680073" + "version": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" }, "./index.ts": { - "version": "12336236525", - "signature": "-9209611" + "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/initial-Build/when-declaration-option-changes.js b/tests/baselines/reference/tsbuild/sample1/initial-Build/when-declaration-option-changes.js index 7c05255bfd1..61e87a815aa 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-Build/when-declaration-option-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-Build/when-declaration-option-changes.js @@ -27,20 +27,20 @@ exports.multiply = multiply; "program": { "fileInfos": { "../../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "./anothermodule.ts": { - "version": "-2676574883", - "signature": "-8396256275" + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { - "version": "-18749805970", - "signature": "1874987148" + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" }, "./some_decl.d.ts": { - "version": "-9253692965", - "signature": "-9253692965" + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n" } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/initial-Build/when-esModuleInterop-option-changes.js b/tests/baselines/reference/tsbuild/sample1/initial-Build/when-esModuleInterop-option-changes.js index 998c09d4710..e24ade14d9d 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-Build/when-esModuleInterop-option-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-Build/when-esModuleInterop-option-changes.js @@ -35,20 +35,20 @@ exports.multiply = multiply; "program": { "fileInfos": { "../../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "./anothermodule.ts": { - "version": "-2676574883", - "signature": "25219880154" + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" }, "./index.ts": { - "version": "-18749805970", - "signature": "11051732871" + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" }, "./some_decl.d.ts": { - "version": "-9253692965", - "signature": "-9253692965" + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n" } }, "options": { @@ -96,20 +96,20 @@ exports.m = mod; "program": { "fileInfos": { "../../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "../core/index.ts": { - "version": "-13851440507", - "signature": "-13851440507" + "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" }, "../core/anothermodule.ts": { - "version": "7652028357", - "signature": "7652028357" + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" }, "./index.ts": { - "version": "-5786964698", - "signature": "-6548680073" + "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -178,24 +178,24 @@ exports.m = mod; "program": { "fileInfos": { "../../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "../core/index.ts": { - "version": "-13851440507", - "signature": "-13851440507" + "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" }, "../core/anothermodule.ts": { - "version": "7652028357", - "signature": "7652028357" + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" }, "../logic/index.ts": { - "version": "-6548680073", - "signature": "-6548680073" + "version": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" }, "./index.ts": { - "version": "12336236525", - "signature": "-9209611" + "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/initial-Build/when-logic-config-changes-declaration-dir.js b/tests/baselines/reference/tsbuild/sample1/initial-Build/when-logic-config-changes-declaration-dir.js index 829dbe1718f..7a9f9a2ea95 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-Build/when-logic-config-changes-declaration-dir.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-Build/when-logic-config-changes-declaration-dir.js @@ -185,20 +185,20 @@ exports.multiply = multiply; "program": { "fileInfos": { "../../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "./anothermodule.ts": { - "version": "-2676574883", - "signature": "25219880154" + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" }, "./index.ts": { - "version": "-18749805970", - "signature": "11051732871" + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" }, "./some_decl.d.ts": { - "version": "-9253692965", - "signature": "-9253692965" + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n" } }, "options": { @@ -370,20 +370,20 @@ sourceFile:index.ts "program": { "fileInfos": { "../../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "../core/index.ts": { - "version": "-13851440507", - "signature": "-13851440507" + "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" }, "../core/anothermodule.ts": { - "version": "7652028357", - "signature": "7652028357" + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" }, "./index.ts": { - "version": "-5786964698", - "signature": "-6548680073" + "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -436,24 +436,24 @@ exports.m = mod; "program": { "fileInfos": { "../../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "../core/index.ts": { - "version": "-13851440507", - "signature": "-13851440507" + "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" }, "../core/anothermodule.ts": { - "version": "7652028357", - "signature": "7652028357" + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" }, "../logic/index.ts": { - "version": "-6548680073", - "signature": "-6548680073" + "version": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" }, "./index.ts": { - "version": "12336236525", - "signature": "-9209611" + "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/initial-Build/when-logic-specifies-tsBuildInfoFile.js b/tests/baselines/reference/tsbuild/sample1/initial-Build/when-logic-specifies-tsBuildInfoFile.js index 5dab84c64ac..b7623e1af56 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-Build/when-logic-specifies-tsBuildInfoFile.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-Build/when-logic-specifies-tsBuildInfoFile.js @@ -185,20 +185,20 @@ exports.multiply = multiply; "program": { "fileInfos": { "../../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "./anothermodule.ts": { - "version": "-2676574883", - "signature": "25219880154" + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" }, "./index.ts": { - "version": "-18749805970", - "signature": "11051732871" + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" }, "./some_decl.d.ts": { - "version": "-9253692965", - "signature": "-9253692965" + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n" } }, "options": { @@ -370,20 +370,20 @@ sourceFile:index.ts "program": { "fileInfos": { "../../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "../core/index.ts": { - "version": "-13851440507", - "signature": "-13851440507" + "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" }, "../core/anothermodule.ts": { - "version": "7652028357", - "signature": "7652028357" + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" }, "./index.ts": { - "version": "-5786964698", - "signature": "-6548680073" + "version": "-5786964698-import * as c from '../core/index';\r\nexport function getSecondsInDay() {\r\n return c.multiply(10, 15);\r\n}\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { @@ -453,24 +453,24 @@ exports.m = mod; "program": { "fileInfos": { "../../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "../core/index.ts": { - "version": "-13851440507", - "signature": "-13851440507" + "version": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map", + "signature": "-13851440507-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" }, "../core/anothermodule.ts": { - "version": "7652028357", - "signature": "7652028357" + "version": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map", + "signature": "7652028357-export declare const World = \"hello\";\r\n//# sourceMappingURL=anotherModule.d.ts.map" }, "../logic/index.ts": { - "version": "-6548680073", - "signature": "-6548680073" + "version": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n", + "signature": "-6548680073-export declare function getSecondsInDay(): number;\r\nimport * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" }, "./index.ts": { - "version": "12336236525", - "signature": "-9209611" + "version": "12336236525-import * as c from '../core/index';\r\nimport * as logic from '../logic/index';\r\n\r\nc.leftPad(\"\", 10);\r\nlogic.getSecondsInDay();\r\n\r\nimport * as mod from '../core/anotherModule';\r\nexport const m = mod;\r\n", + "signature": "-9209611-import * as mod from '../core/anotherModule';\r\nexport declare const m: typeof mod;\r\n" } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/initial-Build/when-module-option-changes.js b/tests/baselines/reference/tsbuild/sample1/initial-Build/when-module-option-changes.js index abc90d83d09..ad19329a2e0 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-Build/when-module-option-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-Build/when-module-option-changes.js @@ -27,20 +27,20 @@ exports.multiply = multiply; "program": { "fileInfos": { "../../lib/lib.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "./anothermodule.ts": { - "version": "-2676574883", - "signature": "-8396256275" + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { - "version": "-18749805970", - "signature": "1874987148" + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" }, "./some_decl.d.ts": { - "version": "-9253692965", - "signature": "-9253692965" + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n" } }, "options": { diff --git a/tests/baselines/reference/tsbuild/sample1/initial-Build/when-target-option-changes.js b/tests/baselines/reference/tsbuild/sample1/initial-Build/when-target-option-changes.js index 74efec1e633..c8fc2b1fbde 100644 --- a/tests/baselines/reference/tsbuild/sample1/initial-Build/when-target-option-changes.js +++ b/tests/baselines/reference/tsbuild/sample1/initial-Build/when-target-option-changes.js @@ -46,24 +46,24 @@ export function multiply(a, b) { return a * b; } "program": { "fileInfos": { "../../lib/lib.esnext.d.ts": { - "version": "3858781397", - "signature": "3858781397" + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" }, "../../lib/lib.esnext.full.d.ts": { - "version": "8926001564", - "signature": "8926001564" + "version": "8926001564-/// \n/// ", + "signature": "8926001564-/// \n/// " }, "./anothermodule.ts": { - "version": "-2676574883", - "signature": "-8396256275" + "version": "-2676574883-export const World = \"hello\";\r\n", + "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { - "version": "-18749805970", - "signature": "1874987148" + "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" }, "./some_decl.d.ts": { - "version": "-9253692965", - "signature": "-9253692965" + "version": "-9253692965-declare const dts: any;\r\n", + "signature": "-9253692965-declare const dts: any;\r\n" } }, "options": { diff --git a/tests/baselines/reference/user/follow-redirects.log b/tests/baselines/reference/user/follow-redirects.log index a5a92443227..34010feffeb 100644 --- a/tests/baselines/reference/user/follow-redirects.log +++ b/tests/baselines/reference/user/follow-redirects.log @@ -1,17 +1,18 @@ Exit Code: 1 Standard output: -node_modules/follow-redirects/index.js(105,10): error TS2339: Property 'emit' does not exist on type 'RedirectableRequest'. -node_modules/follow-redirects/index.js(106,10): error TS2339: Property 'abort' does not exist on type 'RedirectableRequest'. -node_modules/follow-redirects/index.js(153,10): error TS2339: Property 'once' does not exist on type 'RedirectableRequest'. -node_modules/follow-redirects/index.js(156,12): error TS2339: Property 'socket' does not exist on type 'RedirectableRequest'. -node_modules/follow-redirects/index.js(166,8): error TS2339: Property 'once' does not exist on type 'RedirectableRequest'. -node_modules/follow-redirects/index.js(167,8): error TS2339: Property 'once' does not exist on type 'RedirectableRequest'. -node_modules/follow-redirects/index.js(206,10): error TS2339: Property 'emit' does not exist on type 'RedirectableRequest'. -node_modules/follow-redirects/index.js(245,16): error TS2339: Property 'emit' does not exist on type 'RedirectableRequest'. -node_modules/follow-redirects/index.js(292,12): error TS2339: Property 'emit' does not exist on type 'RedirectableRequest'. -node_modules/follow-redirects/index.js(326,35): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. +node_modules/follow-redirects/index.js(82,10): error TS2339: Property 'emit' does not exist on type 'RedirectableRequest'. +node_modules/follow-redirects/index.js(83,10): error TS2339: Property 'abort' does not exist on type 'RedirectableRequest'. +node_modules/follow-redirects/index.js(130,10): error TS2339: Property 'once' does not exist on type 'RedirectableRequest'. +node_modules/follow-redirects/index.js(133,12): error TS2339: Property 'socket' does not exist on type 'RedirectableRequest'. +node_modules/follow-redirects/index.js(143,8): error TS2339: Property 'once' does not exist on type 'RedirectableRequest'. +node_modules/follow-redirects/index.js(144,8): error TS2339: Property 'once' does not exist on type 'RedirectableRequest'. +node_modules/follow-redirects/index.js(214,10): error TS2339: Property 'emit' does not exist on type 'RedirectableRequest'. +node_modules/follow-redirects/index.js(253,16): error TS2339: Property 'emit' does not exist on type 'RedirectableRequest'. +node_modules/follow-redirects/index.js(303,12): error TS2339: Property 'emit' does not exist on type 'RedirectableRequest'. +node_modules/follow-redirects/index.js(337,35): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. -node_modules/follow-redirects/index.js(339,10): error TS2339: Property 'emit' does not exist on type 'RedirectableRequest'. +node_modules/follow-redirects/index.js(345,14): error TS2339: Property 'emit' does not exist on type 'RedirectableRequest'. +node_modules/follow-redirects/index.js(357,10): error TS2339: Property 'emit' does not exist on type 'RedirectableRequest'. diff --git a/tests/baselines/reference/user/prettier.log b/tests/baselines/reference/user/prettier.log index 908defe0972..65a671bd378 100644 --- a/tests/baselines/reference/user/prettier.log +++ b/tests/baselines/reference/user/prettier.log @@ -184,7 +184,7 @@ src/language-js/index.js(66,26): error TS2307: Cannot find module 'linguist-lang src/language-js/index.js(76,26): error TS2307: Cannot find module 'linguist-languages/data/json5'. src/language-js/index.js(76,60): error TS2345: Argument of type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; }'. Property 'extend' is missing in type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' but required in type '{ extend: any; override: any; }'. -src/language-js/needs-parens.js(890,14): error TS2769: No overload matches this call. +src/language-js/needs-parens.js(871,14): error TS2769: No overload matches this call. Overload 1 of 2, '(...items: ConcatArray<(childPath: any) => any>[]): ((childPath: any) => any)[]', gave the following error. Argument of type '(string | number)[]' is not assignable to parameter of type 'ConcatArray<(childPath: any) => any>'. Types of property 'slice' are incompatible. @@ -206,47 +206,47 @@ src/language-js/printer-estree.js(400,9): error TS2769: No overload matches this Overload 2 of 2, '(...items: ConcatArray[]): never[]', gave the following error. Argument of type '{ type: string; parts: any; } | { type: string; contents: any; n: any; }' is not assignable to parameter of type 'ConcatArray'. Type '{ type: string; parts: any; }' is not assignable to type 'ConcatArray'. -src/language-js/printer-estree.js(1472,28): error TS2769: No overload matches this call. +src/language-js/printer-estree.js(1473,28): error TS2769: No overload matches this call. Overload 1 of 2, '(...items: ConcatArray[]): (string | { type: string; id: any; contents: any; break: boolean; expandedStates: any; })[]', gave the following error. Argument of type '{ type: string; parts: any; }' is not assignable to parameter of type 'ConcatArray'. Type '{ type: string; parts: any; }' is missing the following properties from type 'ConcatArray': length, join, slice Overload 2 of 2, '(...items: (string | { type: string; id: any; contents: any; break: boolean; expandedStates: any; } | ConcatArray)[]): (string | { ...; })[]', gave the following error. Argument of type '{ type: string; parts: any; }' is not assignable to parameter of type 'string | { type: string; id: any; contents: any; break: boolean; expandedStates: any; } | ConcatArray'. Type '{ type: string; parts: any; }' is missing the following properties from type '{ type: string; id: any; contents: any; break: boolean; expandedStates: any; }': id, contents, break, expandedStates -src/language-js/printer-estree.js(1905,20): error TS2345: Argument of type '" "' is not assignable to parameter of type '{ type: string; id: any; contents: any; break: boolean; expandedStates: any; }'. -src/language-js/printer-estree.js(1907,20): error TS2345: Argument of type '{ type: string; parts: any; }' is not assignable to parameter of type '{ type: string; id: any; contents: any; break: boolean; expandedStates: any; }'. -src/language-js/printer-estree.js(1909,18): error TS2345: Argument of type '"while ("' is not assignable to parameter of type '{ type: string; id: any; contents: any; break: boolean; expandedStates: any; }'. -src/language-js/printer-estree.js(1918,9): error TS2345: Argument of type '")"' is not assignable to parameter of type '{ type: string; id: any; contents: any; break: boolean; expandedStates: any; }'. -src/language-js/printer-estree.js(3464,11): error TS2769: No overload matches this call. +src/language-js/printer-estree.js(1906,20): error TS2345: Argument of type '" "' is not assignable to parameter of type '{ type: string; id: any; contents: any; break: boolean; expandedStates: any; }'. +src/language-js/printer-estree.js(1908,20): error TS2345: Argument of type '{ type: string; parts: any; }' is not assignable to parameter of type '{ type: string; id: any; contents: any; break: boolean; expandedStates: any; }'. +src/language-js/printer-estree.js(1910,18): error TS2345: Argument of type '"while ("' is not assignable to parameter of type '{ type: string; id: any; contents: any; break: boolean; expandedStates: any; }'. +src/language-js/printer-estree.js(1919,9): error TS2345: Argument of type '")"' is not assignable to parameter of type '{ type: string; id: any; contents: any; break: boolean; expandedStates: any; }'. +src/language-js/printer-estree.js(3465,11): error TS2769: No overload matches this call. Overload 1 of 2, '(...items: ConcatArray[]): never[]', gave the following error. Argument of type 'never[] | { type: string; parts: any; }' is not assignable to parameter of type 'ConcatArray'. Type '{ type: string; parts: any; }' is not assignable to type 'ConcatArray'. Overload 2 of 2, '(...items: ConcatArray[]): never[]', gave the following error. Argument of type 'never[] | { type: string; parts: any; }' is not assignable to parameter of type 'ConcatArray'. Type '{ type: string; parts: any; }' is not assignable to type 'ConcatArray'. -src/language-js/printer-estree.js(3893,22): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. -src/language-js/printer-estree.js(3960,14): error TS2339: Property 'comments' does not exist on type 'Expression'. +src/language-js/printer-estree.js(3894,22): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. +src/language-js/printer-estree.js(3961,14): error TS2339: Property 'comments' does not exist on type 'Expression'. Property 'comments' does not exist on type 'Identifier'. -src/language-js/printer-estree.js(3972,9): error TS2367: This condition will always return 'false' since the types '"FunctionExpression" | "ClassExpression" | "ObjectExpression" | "TaggedTemplateExpression" | "CallExpression" | "ConditionalExpression" | "UpdateExpression" | "SequenceExpression" | ... 11 more ... | "MetaProperty"' and '"OptionalMemberExpression"' have no overlap. -src/language-js/printer-estree.js(3973,13): error TS2339: Property 'property' does not exist on type 'SimpleLiteral | RegExpLiteral | FunctionExpression | ArrowFunctionExpression | ArrayExpression | ObjectExpression | YieldExpression | UnaryExpression | UpdateExpression | ... 12 more ... | AwaitExpression'. +src/language-js/printer-estree.js(3973,9): error TS2367: This condition will always return 'false' since the types '"FunctionExpression" | "ClassExpression" | "ObjectExpression" | "TaggedTemplateExpression" | "CallExpression" | "ConditionalExpression" | "UpdateExpression" | "SequenceExpression" | ... 11 more ... | "MetaProperty"' and '"OptionalMemberExpression"' have no overlap. +src/language-js/printer-estree.js(3974,13): error TS2339: Property 'property' does not exist on type 'SimpleLiteral | RegExpLiteral | FunctionExpression | ArrowFunctionExpression | ArrayExpression | ObjectExpression | YieldExpression | UnaryExpression | UpdateExpression | ... 12 more ... | AwaitExpression'. Property 'property' does not exist on type 'SimpleLiteral'. -src/language-js/printer-estree.js(3973,52): error TS2339: Property 'property' does not exist on type 'SimpleLiteral | RegExpLiteral | FunctionExpression | ArrowFunctionExpression | ArrayExpression | ObjectExpression | YieldExpression | UnaryExpression | UpdateExpression | ... 12 more ... | AwaitExpression'. +src/language-js/printer-estree.js(3974,52): error TS2339: Property 'property' does not exist on type 'SimpleLiteral | RegExpLiteral | FunctionExpression | ArrowFunctionExpression | ArrayExpression | ObjectExpression | YieldExpression | UnaryExpression | UpdateExpression | ... 12 more ... | AwaitExpression'. Property 'property' does not exist on type 'SimpleLiteral'. -src/language-js/printer-estree.js(3978,9): error TS2367: This condition will always return 'false' since the types '"FunctionExpression" | "ClassExpression" | "ObjectExpression" | "TaggedTemplateExpression" | "CallExpression" | "ConditionalExpression" | "UpdateExpression" | "SequenceExpression" | ... 11 more ... | "MetaProperty"' and '"OptionalMemberExpression"' have no overlap. -src/language-js/printer-estree.js(3980,29): error TS2339: Property 'object' does not exist on type 'SimpleLiteral | RegExpLiteral | FunctionExpression | ArrowFunctionExpression | ArrayExpression | ObjectExpression | YieldExpression | UnaryExpression | UpdateExpression | ... 12 more ... | AwaitExpression'. +src/language-js/printer-estree.js(3979,9): error TS2367: This condition will always return 'false' since the types '"FunctionExpression" | "ClassExpression" | "ObjectExpression" | "TaggedTemplateExpression" | "CallExpression" | "ConditionalExpression" | "UpdateExpression" | "SequenceExpression" | ... 11 more ... | "MetaProperty"' and '"OptionalMemberExpression"' have no overlap. +src/language-js/printer-estree.js(3981,29): error TS2339: Property 'object' does not exist on type 'SimpleLiteral | RegExpLiteral | FunctionExpression | ArrowFunctionExpression | ArrayExpression | ObjectExpression | YieldExpression | UnaryExpression | UpdateExpression | ... 12 more ... | AwaitExpression'. Property 'object' does not exist on type 'SimpleLiteral'. -src/language-js/printer-estree.js(3981,22): error TS2339: Property 'comments' does not exist on type 'SimpleLiteral | RegExpLiteral | FunctionExpression | ArrowFunctionExpression | ArrayExpression | ObjectExpression | YieldExpression | UnaryExpression | UpdateExpression | ... 12 more ... | AwaitExpression'. +src/language-js/printer-estree.js(3982,22): error TS2339: Property 'comments' does not exist on type 'SimpleLiteral | RegExpLiteral | FunctionExpression | ArrowFunctionExpression | ArrayExpression | ObjectExpression | YieldExpression | UnaryExpression | UpdateExpression | ... 12 more ... | AwaitExpression'. Property 'comments' does not exist on type 'SimpleLiteral'. -src/language-js/printer-estree.js(3987,9): error TS2367: This condition will always return 'false' since the types '"FunctionExpression" | "ClassExpression" | "ObjectExpression" | "TaggedTemplateExpression" | "CallExpression" | "ConditionalExpression" | "UpdateExpression" | "SequenceExpression" | ... 11 more ... | "MetaProperty"' and '"Identifier"' have no overlap. -src/language-js/printer-estree.js(3988,9): error TS2367: This condition will always return 'false' since the types '"FunctionExpression" | "ClassExpression" | "ObjectExpression" | "TaggedTemplateExpression" | "CallExpression" | "ConditionalExpression" | "UpdateExpression" | "SequenceExpression" | ... 11 more ... | "MetaProperty"' and '"ThisExpression"' have no overlap. -src/language-js/printer-estree.js(4192,23): error TS2532: Object is possibly 'undefined'. -src/language-js/printer-estree.js(4193,24): error TS2532: Object is possibly 'undefined'. -src/language-js/printer-estree.js(4546,5): error TS2345: Argument of type '"" | { type: string; parts: any; } | { type: string; contents: any; }' is not assignable to parameter of type 'string'. +src/language-js/printer-estree.js(3988,9): error TS2367: This condition will always return 'false' since the types '"FunctionExpression" | "ClassExpression" | "ObjectExpression" | "TaggedTemplateExpression" | "CallExpression" | "ConditionalExpression" | "UpdateExpression" | "SequenceExpression" | ... 11 more ... | "MetaProperty"' and '"Identifier"' have no overlap. +src/language-js/printer-estree.js(3989,9): error TS2367: This condition will always return 'false' since the types '"FunctionExpression" | "ClassExpression" | "ObjectExpression" | "TaggedTemplateExpression" | "CallExpression" | "ConditionalExpression" | "UpdateExpression" | "SequenceExpression" | ... 11 more ... | "MetaProperty"' and '"ThisExpression"' have no overlap. +src/language-js/printer-estree.js(4193,23): error TS2532: Object is possibly 'undefined'. +src/language-js/printer-estree.js(4194,24): error TS2532: Object is possibly 'undefined'. +src/language-js/printer-estree.js(4550,5): error TS2345: Argument of type '"" | { type: string; parts: any; } | { type: string; contents: any; }' is not assignable to parameter of type 'string'. Type '{ type: string; parts: any; }' is not assignable to type 'string'. -src/language-js/printer-estree.js(4550,16): error TS2345: Argument of type '{ type: string; parts: any; }' is not assignable to parameter of type 'string'. -src/language-js/printer-estree.js(4592,9): error TS2345: Argument of type '{ type: string; parts: any; }' is not assignable to parameter of type 'string'. -src/language-js/printer-estree.js(4894,9): error TS2554: Expected 0-2 arguments, but got 3. -src/language-js/printer-estree.js(6101,7): error TS2769: No overload matches this call. +src/language-js/printer-estree.js(4554,16): error TS2345: Argument of type '{ type: string; parts: any; }' is not assignable to parameter of type 'string'. +src/language-js/printer-estree.js(4596,9): error TS2345: Argument of type '{ type: string; parts: any; }' is not assignable to parameter of type 'string'. +src/language-js/printer-estree.js(4898,9): error TS2554: Expected 0-2 arguments, but got 3. +src/language-js/printer-estree.js(6105,7): error TS2769: No overload matches this call. Overload 1 of 2, '(...items: ConcatArray<(childPath: any) => any>[]): ((childPath: any) => any)[]', gave the following error. Argument of type '(string | number)[]' is not assignable to parameter of type 'ConcatArray<(childPath: any) => any>'. Types of property 'slice' are incompatible. diff --git a/tests/cases/fourslash/formattingObjectLiteralOpenCurlyNewlineAssignment.ts b/tests/cases/fourslash/formattingObjectLiteralOpenCurlyNewlineAssignment.ts new file mode 100644 index 00000000000..3693b49075e --- /dev/null +++ b/tests/cases/fourslash/formattingObjectLiteralOpenCurlyNewlineAssignment.ts @@ -0,0 +1,47 @@ +/// + +//// +//// var obj = {}; +//// obj = +//// { +//// prop: 3 +//// }; +//// +//// var obj2 = obj || +//// { +//// prop: 0 +//// } +//// + +format.document(); +verify.currentFileContentIs( +` +var obj = {}; +obj = +{ + prop: 3 +}; + +var obj2 = obj || +{ + prop: 0 +} +` +); + +format.setOption("indentMultiLineObjectLiteralBeginningOnBlankLine", true); +format.document(); +verify.currentFileContentIs( +` +var obj = {}; +obj = + { + prop: 3 + }; + +var obj2 = obj || + { + prop: 0 + } +` +); \ No newline at end of file diff --git a/tests/cases/user/TypeScript-Node-Starter/TypeScript-Node-Starter b/tests/cases/user/TypeScript-Node-Starter/TypeScript-Node-Starter index 1bf5836cae5..722ebf8053d 160000 --- a/tests/cases/user/TypeScript-Node-Starter/TypeScript-Node-Starter +++ b/tests/cases/user/TypeScript-Node-Starter/TypeScript-Node-Starter @@ -1 +1 @@ -Subproject commit 1bf5836cae5246b89bbf7063c3e84e110222fcdf +Subproject commit 722ebf8053d2bf82bb66134b21c7e291ccae35c4 diff --git a/tests/cases/user/prettier/prettier b/tests/cases/user/prettier/prettier index 2f40dba3177..2523a017aad 160000 --- a/tests/cases/user/prettier/prettier +++ b/tests/cases/user/prettier/prettier @@ -1 +1 @@ -Subproject commit 2f40dba3177c6edd3ceb88b26cdf4718e892a3e5 +Subproject commit 2523a017aad479b006593e9b380e4e27a7caea3d diff --git a/tests/cases/user/webpack/webpack b/tests/cases/user/webpack/webpack index b16ca509d12..6d923f638ab 160000 --- a/tests/cases/user/webpack/webpack +++ b/tests/cases/user/webpack/webpack @@ -1 +1 @@ -Subproject commit b16ca509d12faf36573b65fffcbae50c5b3e7ee3 +Subproject commit 6d923f638abab6ca5d0263be000a48ef85002fd4 diff --git a/tests/projects/emitDeclarationOnly/src/a.ts b/tests/projects/emitDeclarationOnly/src/a.ts new file mode 100644 index 00000000000..330b4fb38d4 --- /dev/null +++ b/tests/projects/emitDeclarationOnly/src/a.ts @@ -0,0 +1,5 @@ +import { B } from "./b"; + +export interface A { + b: B; +} diff --git a/tests/projects/emitDeclarationOnly/src/b.ts b/tests/projects/emitDeclarationOnly/src/b.ts new file mode 100644 index 00000000000..80f920a0e9d --- /dev/null +++ b/tests/projects/emitDeclarationOnly/src/b.ts @@ -0,0 +1,5 @@ +import { C } from "./c"; + +export interface B { + b: C; +} diff --git a/tests/projects/emitDeclarationOnly/src/c.ts b/tests/projects/emitDeclarationOnly/src/c.ts new file mode 100644 index 00000000000..b6b6e67dada --- /dev/null +++ b/tests/projects/emitDeclarationOnly/src/c.ts @@ -0,0 +1,5 @@ +import { A } from "./a"; + +export interface C { + a: A; +} diff --git a/tests/projects/emitDeclarationOnly/src/index.ts b/tests/projects/emitDeclarationOnly/src/index.ts new file mode 100644 index 00000000000..c6a5229cdb9 --- /dev/null +++ b/tests/projects/emitDeclarationOnly/src/index.ts @@ -0,0 +1,3 @@ +export { A } from "./a"; +export { B } from "./b"; +export { C } from "./c"; diff --git a/tests/projects/emitDeclarationOnly/tsconfig.json b/tests/projects/emitDeclarationOnly/tsconfig.json new file mode 100644 index 00000000000..334d67116d9 --- /dev/null +++ b/tests/projects/emitDeclarationOnly/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + "declaration": true, /* Generates corresponding '.d.ts' file. */ + "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + "sourceMap": true, /* Generates corresponding '.map' file. */ + "outDir": "./lib", /* Redirect output structure to the directory. */ + "composite": true, /* Enable project compilation */ + "strict": true, /* Enable all strict type-checking options. */ + + "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + + "alwaysStrict": true, + "rootDir": "src", + "emitDeclarationOnly": true + } +}