diff --git a/src/compiler/builder.ts b/src/compiler/builder.ts index d4a72b4648048..5cf77268837b6 100644 --- a/src/compiler/builder.ts +++ b/src/compiler/builder.ts @@ -59,7 +59,6 @@ import { isJsonSourceFile, isNumber, isString, - map, mapDefinedIterator, maybeBind, noop, @@ -175,6 +174,8 @@ export interface ReusableBuilderProgramState extends BuilderState { * Name of the file whose dts was the latest to change */ latestChangedDtsFile: string | undefined; + /** Recorded if program had errors */ + hasErrors?: boolean; } // dprint-ignore @@ -251,6 +252,7 @@ export interface BuilderProgramState extends BuilderState, ReusableBuilderProgra seenEmittedFiles: Map | undefined; /** Already seen program emit */ seenProgramEmit: BuilderFileEmit | undefined; + hasErrorsFromOldState?: boolean; } interface BuilderProgramStateWithDefinedProgram extends BuilderProgramState { @@ -264,23 +266,6 @@ function toBuilderProgramStateWithDefinedProgram(state: ReusableBuilderProgramSt return state; } -/** @internal */ -export type SavedBuildProgramEmitState = - & Pick< - BuilderProgramState, - | "affectedFilesPendingEmit" - | "seenEmittedFiles" - | "seenProgramEmit" - | "programEmitPending" - | "emitSignatures" - | "outSignature" - | "latestChangedDtsFile" - | "hasChangedEmitSignature" - | "buildInfoEmitPending" - | "emitDiagnosticsPerFile" - > - & { changedFilesSet: BuilderProgramState["changedFilesSet"] | undefined; }; - /** * Get flags determining what all needs to be emitted * @@ -374,6 +359,7 @@ function createBuilderProgramState( canCopySemanticDiagnostics = false; canCopyEmitDiagnostics = false; } + state.hasErrorsFromOldState = oldState!.hasErrors; } else { // We arent using old state, so atleast emit buildInfo with current information @@ -617,48 +603,6 @@ function releaseCache(state: BuilderProgramState) { state.program = undefined; } -function backupBuilderProgramEmitState( - state: Readonly, -): SavedBuildProgramEmitState { - const outFilePath = state.compilerOptions.outFile; - // Only in --out changeFileSet is kept around till emit - Debug.assert(!state.changedFilesSet.size || outFilePath); - return { - affectedFilesPendingEmit: state.affectedFilesPendingEmit && new Map(state.affectedFilesPendingEmit), - seenEmittedFiles: state.seenEmittedFiles && new Map(state.seenEmittedFiles), - seenProgramEmit: state.seenProgramEmit, - programEmitPending: state.programEmitPending, - emitSignatures: state.emitSignatures && new Map(state.emitSignatures), - outSignature: state.outSignature, - latestChangedDtsFile: state.latestChangedDtsFile, - hasChangedEmitSignature: state.hasChangedEmitSignature, - changedFilesSet: outFilePath ? new Set(state.changedFilesSet) : undefined, - buildInfoEmitPending: state.buildInfoEmitPending, - emitDiagnosticsPerFile: state.emitDiagnosticsPerFile && new Map(state.emitDiagnosticsPerFile), - }; -} - -function restoreBuilderProgramEmitState( - state: BuilderProgramState, - savedEmitState: SavedBuildProgramEmitState, -) { - state.affectedFilesPendingEmit = savedEmitState.affectedFilesPendingEmit; - state.seenEmittedFiles = savedEmitState.seenEmittedFiles; - state.seenProgramEmit = savedEmitState.seenProgramEmit; - state.programEmitPending = savedEmitState.programEmitPending; - state.emitSignatures = savedEmitState.emitSignatures; - state.outSignature = savedEmitState.outSignature; - state.latestChangedDtsFile = savedEmitState.latestChangedDtsFile; - state.hasChangedEmitSignature = savedEmitState.hasChangedEmitSignature; - state.buildInfoEmitPending = savedEmitState.buildInfoEmitPending; - state.emitDiagnosticsPerFile = savedEmitState.emitDiagnosticsPerFile; - if (savedEmitState.changedFilesSet) state.changedFilesSet = savedEmitState.changedFilesSet; - if (state.compilerOptions.outFile && state.changedFilesSet.size) { - state.semanticDiagnosticsPerFile.clear(); - state.emitDiagnosticsPerFile = undefined; - } -} - /** * Verifies that source file is ok to be used in calls that arent handled by next */ @@ -1069,6 +1013,7 @@ function getBinderAndCheckerDiagnosticsOfFile( // Diagnostics werent cached, get them from program, and cache the result const diagnostics = state.program.getBindAndCheckDiagnostics(sourceFile, cancellationToken); semanticDiagnosticsPerFile.set(path, diagnostics); + state.buildInfoEmitPending = true; return filterSemanticDiagnostics(diagnostics, state.compilerOptions); } @@ -1136,9 +1081,9 @@ export interface IncrementalBuildInfoBase extends BuildInfo { options: CompilerOptions | undefined; semanticDiagnosticsPerFile: IncrementalBuildInfoDiagnostic[] | undefined; emitDiagnosticsPerFile: IncrementalBuildInfoEmitDiagnostic[] | undefined; - changeFileSet: readonly IncrementalBuildInfoFileId[] | undefined; // Because this is only output file in the program, we dont need fileId to deduplicate name latestChangedDtsFile?: string | undefined; + errors: true | undefined; } /** @internal */ @@ -1182,6 +1127,53 @@ export function isIncrementalBuildInfo(info: BuildInfo): info is IncrementalBuil return !!(info as IncrementalBuildInfo).fileNames; } +/** @internal */ +export interface NonIncrementalBuildInfo extends BuildInfo { + root: readonly string[]; + errors: true | undefined; +} + +/** @internal */ +export function isNonIncrementalBuildInfo(info: BuildInfo): info is NonIncrementalBuildInfo { + return !isIncrementalBuildInfo(info) && !!(info as NonIncrementalBuildInfo).root; +} + +function ensureHasErrorsForState(state: BuilderProgramStateWithDefinedProgram) { + if (state.hasErrors !== undefined) return; + if (isIncrementalCompilation(state.compilerOptions)) { + // Because semantic diagnostics are recorded as is we dont need to get them from program + state.hasErrors = !some(state.program.getSourceFiles(), f => { + const bindAndCheckDiagnostics = state.semanticDiagnosticsPerFile.get(f.resolvedPath); + return bindAndCheckDiagnostics === undefined || // Missing semantic diagnostics in cache will be encoded in buildInfo + !!bindAndCheckDiagnostics.length || // cached semantic diagnostics will be encoded in buildInfo + !!state.emitDiagnosticsPerFile?.get(f.resolvedPath)?.length; // emit diagnostics will be encoded in buildInfo; + }) && ( + hasSyntaxOrGlobalErrors(state) || + some(state.program.getSourceFiles(), f => !!state.program.getProgramDiagnostics(f).length) + ); + } + else { + state.hasErrors = some(state.program.getSourceFiles(), f => { + const bindAndCheckDiagnostics = state.semanticDiagnosticsPerFile.get(f.resolvedPath); + return !!bindAndCheckDiagnostics?.length || // If has semantic diagnostics + !!state.emitDiagnosticsPerFile?.get(f.resolvedPath)?.length; // emit diagnostics will be encoded in buildInfo; + }) || + hasSyntaxOrGlobalErrors(state); + } +} + +function hasSyntaxOrGlobalErrors(state: BuilderProgramStateWithDefinedProgram) { + return !!state.program.getConfigFileParsingDiagnostics().length || + !!state.program.getSyntacticDiagnostics().length || + !!state.program.getOptionsDiagnostics().length || + !!state.program.getGlobalDiagnostics().length; +} + +function getBuildInfoEmitPending(state: BuilderProgramStateWithDefinedProgram) { + ensureHasErrorsForState(state); + return state.buildInfoEmitPending ??= !!state.hasErrorsFromOldState !== !!state.hasErrors; +} + /** * Gets the program information to be emitted in buildInfo so that we can use it to create new program */ @@ -1193,8 +1185,15 @@ function getBuildInfo(state: BuilderProgramStateWithDefinedProgram): BuildInfo { const fileNames: string[] = []; const fileNameToFileId = new Map(); const rootFileNames = new Set(state.program.getRootFileNames().map(f => toPath(f, currentDirectory, state.program.getCanonicalFileName))); - - if (!isIncrementalCompilation(state.compilerOptions)) return { version }; + ensureHasErrorsForState(state); + if (!isIncrementalCompilation(state.compilerOptions)) { + const buildInfo: NonIncrementalBuildInfo = { + root: arrayFrom(rootFileNames, r => relativeToBuildInfo(r)), + errors: state.hasErrors ? true : undefined, + version, + }; + return buildInfo; + } const root: IncrementalBuildInfoRoot[] = []; if (state.compilerOptions.outFile) { @@ -1216,7 +1215,6 @@ function getBuildInfo(state: BuilderProgramStateWithDefinedProgram): BuildInfo { options: toIncrementalBuildInfoCompilerOptions(state.compilerOptions), semanticDiagnosticsPerFile: toIncrementalBuildInfoDiagnostics(), emitDiagnosticsPerFile: toIncrementalBuildInfoEmitDiagnostics(), - changeFileSet: toChangeFileSet(), outSignature: state.outSignature, latestChangedDtsFile, pendingEmit: !state.programEmitPending ? @@ -1224,6 +1222,7 @@ function getBuildInfo(state: BuilderProgramStateWithDefinedProgram): BuildInfo { state.programEmitPending === getBuilderFileEmit(state.compilerOptions) ? false : // Pending emit is same as deteremined by compilerOptions state.programEmitPending, // Actual value + errors: state.hasErrors ? true : undefined, version, }; return buildInfo; @@ -1311,9 +1310,9 @@ function getBuildInfo(state: BuilderProgramStateWithDefinedProgram): BuildInfo { semanticDiagnosticsPerFile, emitDiagnosticsPerFile: toIncrementalBuildInfoEmitDiagnostics(), affectedFilesPendingEmit, - changeFileSet: toChangeFileSet(), emitSignatures, latestChangedDtsFile, + errors: state.hasErrors ? true : undefined, version, }; return buildInfo; @@ -1415,7 +1414,7 @@ function getBuildInfo(state: BuilderProgramStateWithDefinedProgram): BuildInfo { state.fileInfos.forEach((_value, key) => { const value = state.semanticDiagnosticsPerFile.get(key); if (!value) { - if (!state.changedFilesSet.has(key)) result = append(result, toFileId(key)); + result = append(result, toFileId(key)); } else if (value.length) { result = append(result, [ @@ -1495,16 +1494,6 @@ function getBuildInfo(state: BuilderProgramStateWithDefinedProgram): BuildInfo { return result; }) || array; } - - function toChangeFileSet() { - let changeFileSet: IncrementalBuildInfoFileId[] | undefined; - if (state.changedFilesSet.size) { - for (const path of arrayFrom(state.changedFilesSet.keys()).sort(compareStringsCaseSensitive)) { - changeFileSet = append(changeFileSet, toFileId(path)); - } - } - return changeFileSet; - } } /** @internal */ @@ -1634,8 +1623,6 @@ export function createBuilderProgram( const builderProgram = createRedirectedBuilderProgram(state, configFileParsingDiagnostics); builderProgram.state = state; - builderProgram.saveEmitState = () => backupBuilderProgramEmitState(state); - builderProgram.restoreEmitState = saved => restoreBuilderProgramEmitState(state, saved); builderProgram.hasChangedEmitSignature = () => !!state.hasChangedEmitSignature; builderProgram.getAllDependencies = sourceFile => BuilderState.getAllDependencies( @@ -1665,7 +1652,7 @@ export function createBuilderProgram( cancellationToken: CancellationToken | undefined, ): EmitResult { Debug.assert(isBuilderProgramStateWithDefinedProgram(state)); - if (state.buildInfoEmitPending) { + if (getBuildInfoEmitPending(state)) { const result = state.program.emitBuildInfo( writeFile || maybeBind(host, host.writeFile), cancellationToken, @@ -1734,7 +1721,7 @@ export function createBuilderProgram( if (!affected) { // Emit buildinfo if pending - if (!state.buildInfoEmitPending) return undefined; + if (!getBuildInfoEmitPending(state)) return undefined; const affected = state.program; const result = affected.emitBuildInfo( writeFile || maybeBind(host, host.writeFile), @@ -1845,13 +1832,13 @@ export function createBuilderProgram( if (state.compilerOptions.composite) { const filePath = sourceFiles[0].resolvedPath; emitSignature = handleNewSignature(state.emitSignatures?.get(filePath), emitSignature); - if (!emitSignature) return; + if (!emitSignature) return data!.skippedDtsWrite = true; (state.emitSignatures ??= new Map()).set(filePath, emitSignature); } } else if (state.compilerOptions.composite) { const newSignature = handleNewSignature(state.outSignature, /*newSignature*/ undefined); - if (!newSignature) return; + if (!newSignature) return data!.skippedDtsWrite = true; state.outSignature = newSignature; } } @@ -2087,7 +2074,6 @@ export function createBuilderProgramUsingIncrementalBuildInfo( let filePathsSetList: Set[] | undefined; const latestChangedDtsFile = buildInfo.latestChangedDtsFile ? toAbsolutePath(buildInfo.latestChangedDtsFile) : undefined; const fileInfos = new Map(); - const changedFilesSet = new Set(map(buildInfo.changeFileSet, toFilePath)); if (isIncrementalBundleEmitBuildInfo(buildInfo)) { buildInfo.fileInfos.forEach((fileInfo, index) => { const path = toFilePath(index + 1 as IncrementalBuildInfoFileId); @@ -2099,10 +2085,10 @@ export function createBuilderProgramUsingIncrementalBuildInfo( semanticDiagnosticsPerFile: toPerFileSemanticDiagnostics(buildInfo.semanticDiagnosticsPerFile), emitDiagnosticsPerFile: toPerFileEmitDiagnostics(buildInfo.emitDiagnosticsPerFile), hasReusableDiagnostic: true, - changedFilesSet, latestChangedDtsFile, outSignature: buildInfo.outSignature, programEmitPending: buildInfo.pendingEmit === undefined ? undefined : toProgramEmitPending(buildInfo.pendingEmit, buildInfo.options), + hasErrors: buildInfo.errors, }; } else { @@ -2136,16 +2122,14 @@ export function createBuilderProgramUsingIncrementalBuildInfo( emitDiagnosticsPerFile: toPerFileEmitDiagnostics(buildInfo.emitDiagnosticsPerFile), hasReusableDiagnostic: true, affectedFilesPendingEmit: buildInfo.affectedFilesPendingEmit && arrayToMap(buildInfo.affectedFilesPendingEmit, value => toFilePath(isNumber(value) ? value : value[0]), value => toBuilderFileEmit(value, fullEmitForOptions!)), - changedFilesSet, latestChangedDtsFile, emitSignatures: emitSignatures?.size ? emitSignatures : undefined, + hasErrors: buildInfo.errors, }; } return { state, - saveEmitState: noop as BuilderProgram["saveEmitState"], - restoreEmitState: noop, getProgram: notImplemented, getProgramOrUndefined: returnUndefined, releaseProgram: noop, @@ -2197,7 +2181,7 @@ export function createBuilderProgramUsingIncrementalBuildInfo( const semanticDiagnostics = new Map( mapDefinedIterator( fileInfos.keys(), - key => !changedFilesSet.has(key) ? [key, emptyArray] : undefined, + key => [key, emptyArray], ), ); diagnostics?.forEach(value => { @@ -2257,6 +2241,18 @@ export function getBuildInfoFileVersionMap( } } +/** @internal */ +export function getNonIncrementalBuildInfoRoots( + buildInfo: BuildInfo, + buildInfoPath: string, + host: Pick, +) { + if (!isNonIncrementalBuildInfo(buildInfo)) return undefined; + const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory())); + const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames()); + return buildInfo.root.map(r => toPath(r, buildInfoDirectory, getCanonicalFileName)); +} + /** @internal */ export function createRedirectedBuilderProgram( state: Pick, @@ -2264,8 +2260,6 @@ export function createRedirectedBuilderProgram( ): BuilderProgram { return { state: undefined!, - saveEmitState: noop as BuilderProgram["saveEmitState"], - restoreEmitState: noop, getProgram, getProgramOrUndefined: () => state.program, releaseProgram: () => state.program = undefined, diff --git a/src/compiler/builderPublic.ts b/src/compiler/builderPublic.ts index ac63aafd7c8cf..7a0265f84a579 100644 --- a/src/compiler/builderPublic.ts +++ b/src/compiler/builderPublic.ts @@ -13,7 +13,6 @@ import { Program, ProjectReference, ReusableBuilderProgramState, - SavedBuildProgramEmitState, SourceFile, WriteFileCallback, } from "./_namespaces/ts.js"; @@ -48,10 +47,6 @@ export interface BuilderProgram { /** @internal */ state: ReusableBuilderProgramState; /** @internal */ - saveEmitState(): SavedBuildProgramEmitState; - /** @internal */ - restoreEmitState(saved: SavedBuildProgramEmitState): void; - /** @internal */ hasChangedEmitSignature?(): boolean; /** * Returns current program diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index c6af2f15d37ea..9c9d579d194cd 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -4365,10 +4365,6 @@ "category": "Error", "code": 5012 }, - "Failed to parse file '{0}': {1}.": { - "category": "Error", - "code": 5014 - }, "Unknown compiler option '{0}'.": { "category": "Error", "code": 5023 @@ -5898,6 +5894,14 @@ "category": "Message", "code": 6418 }, + "Project '{0}' is out of date because buildinfo file '{1}' indicates that program needs to report errors.": { + "category": "Message", + "code": 6419 + }, + "Project '{0}' is out of date because {1}.": { + "category": "Message", + "code": 6420 + }, "The expected type comes from property '{0}' which is declared here on type '{1}'": { "category": "Message", diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 75dc1c1d51964..d2b43f7250f84 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -420,6 +420,7 @@ import { WithStatement, writeCommentRange, writeFile, + WriteFileCallbackData, YieldExpression, } from "./_namespaces/ts.js"; import * as performance from "./_namespaces/ts.performance.js"; @@ -923,7 +924,7 @@ export function emitFiles( isEmitNotificationEnabled: declarationTransform.isEmitNotificationEnabled, substituteNode: declarationTransform.substituteNode, }); - printSourceFileOrBundle( + const dtsWritten = printSourceFileOrBundle( declarationFilePath, declarationMapPath, declarationTransform, @@ -937,7 +938,7 @@ export function emitFiles( }, ); if (emittedFilesList) { - emittedFilesList.push(declarationFilePath); + if (dtsWritten) emittedFilesList.push(declarationFilePath); if (declarationMapPath) { emittedFilesList.push(declarationMapPath); } @@ -1027,10 +1028,12 @@ export function emitFiles( // Write the output file const text = writer.getText(); - writeFile(host, emitterDiagnostics, jsFilePath, text, !!compilerOptions.emitBOM, sourceFiles, { sourceMapUrlPos, diagnostics: transform.diagnostics }); + const data: WriteFileCallbackData = { sourceMapUrlPos, diagnostics: transform.diagnostics }; + writeFile(host, emitterDiagnostics, jsFilePath, text, !!compilerOptions.emitBOM, sourceFiles, data); // Reset state writer.clear(); + return !data.skippedDtsWrite; } interface SourceMapOptions { diff --git a/src/compiler/tsbuild.ts b/src/compiler/tsbuild.ts index 39a448fea9a15..74ec7be532261 100644 --- a/src/compiler/tsbuild.ts +++ b/src/compiler/tsbuild.ts @@ -20,7 +20,8 @@ export enum UpToDateStatusType { ErrorReadingFile, OutOfDateWithSelf, OutOfDateWithUpstream, - OutOfDateBuildInfo, + OutOfDateBuildInfoWithPendingEmit, + OutOfDateBuildInfoWithErrors, OutOfDateOptions, OutOfDateRoots, UpstreamOutOfDate, @@ -76,7 +77,10 @@ export namespace Status { * We track what the newest input file is. */ export interface UpToDate { - type: UpToDateStatusType.UpToDate | UpToDateStatusType.UpToDateWithUpstreamTypes | UpToDateStatusType.UpToDateWithInputFileText; + type: + | UpToDateStatusType.UpToDate + | UpToDateStatusType.UpToDateWithUpstreamTypes + | UpToDateStatusType.UpToDateWithInputFileText; newestInputFileTime?: Date; newestInputFileName?: string; oldestOutputFileName: string; @@ -112,7 +116,10 @@ export namespace Status { * Buildinfo indicates that build is out of date */ export interface OutOfDateBuildInfo { - type: UpToDateStatusType.OutOfDateBuildInfo | UpToDateStatusType.OutOfDateOptions; + type: + | UpToDateStatusType.OutOfDateBuildInfoWithPendingEmit + | UpToDateStatusType.OutOfDateBuildInfoWithErrors + | UpToDateStatusType.OutOfDateOptions; buildInfoFile: string; } diff --git a/src/compiler/tsbuildPublic.ts b/src/compiler/tsbuildPublic.ts index 4a3fab9973ce2..6213b9f63d0d2 100644 --- a/src/compiler/tsbuildPublic.ts +++ b/src/compiler/tsbuildPublic.ts @@ -19,7 +19,6 @@ import { copyProperties, createCompilerDiagnostic, createCompilerHostFromProgramHost, - createDiagnosticCollection, createDiagnosticReporter, createModuleResolutionCache, createModuleResolutionLoader, @@ -33,7 +32,6 @@ import { Debug, Diagnostic, DiagnosticArguments, - DiagnosticCollection, DiagnosticMessage, DiagnosticReporter, Diagnostics, @@ -46,6 +44,7 @@ import { FileWatcher, FileWatcherCallback, findIndex, + firstOrUndefinedIterator, flattenDiagnosticMessageText, forEach, forEachEntry, @@ -57,12 +56,14 @@ import { getBuildInfoFileVersionMap, getConfigFileParsingDiagnostics, getDirectoryPath, + getEmitDeclarations, getErrorCountForSummary, getFileNamesFromConfigSpecs, getFilesInErrorForSummary, getFirstProjectOutput, getLocaleTimeString, getModifiedTime as ts_getModifiedTime, + getNonIncrementalBuildInfoRoots, getNormalizedAbsolutePath, getParsedCommandLineOfConfigFile, getPendingEmitKind, @@ -71,21 +72,21 @@ import { getWatchErrorSummaryDiagnosticMessage, hasProperty, identity, + IncrementalBuildInfo, IncrementalBundleEmitBuildInfo, IncrementalMultiFileEmitBuildInfo, isIgnoredFileFromWildCardWatching, isIncrementalBuildInfo, isIncrementalCompilation, isPackageJsonInfo, - listFiles, loadWithModeAwareCache, maybeBind, missingFileModifiedTime, ModuleResolutionCache, mutateMap, mutateMapSkippingNewValues, + NonIncrementalBuildInfo, noop, - OutputFile, ParseConfigFileHost, parseConfigHostFromCompilerHostLike, ParsedCommandLine, @@ -124,7 +125,6 @@ import { WatchStatusReporter, WatchType, WildcardDirectoryWatcher, - writeFile, WriteFileCallback, } from "./_namespaces/ts.js"; import * as performance from "./_namespaces/ts.performance.js"; @@ -175,14 +175,8 @@ enum BuildResultFlags { * different from the existing files on disk */ DeclarationOutputUnchanged = 1 << 1, - - ConfigFileErrors = 1 << 2, - SyntaxErrors = 1 << 3, - TypeErrors = 1 << 4, - DeclarationEmitErrors = 1 << 5, - EmitErrors = 1 << 6, - - AnyErrors = ConfigFileErrors | SyntaxErrors | TypeErrors | DeclarationEmitErrors | EmitErrors, + /** Errors in the build */ + AnyErrors = 1 << 2, } /** @internal */ @@ -917,10 +911,7 @@ function createUpdateOutputFileStampsProject( enum BuildStep { CreateProgram, - SyntaxDiagnostics, - SemanticDiagnostics, Emit, - EmitBuildInfo, QueueReferencingProjects, Done, } @@ -931,6 +922,7 @@ function createBuildOrUpdateInvalidedProject( projectPath: ResolvedConfigFilePath, projectIndex: number, config: ParsedCommandLine, + status: UpToDateStatus, buildOrder: readonly ResolvedConfigFileName[], ): BuildInvalidedProject { let step = BuildStep.CreateProgram; @@ -993,11 +985,7 @@ function createBuildOrUpdateInvalidedProject( program => program.emit(targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers || state.host.getCustomTransformers?.(project)), ); } - executeSteps(BuildStep.SemanticDiagnostics, cancellationToken); - if (step === BuildStep.EmitBuildInfo) { - return emitBuildInfo(writeFile, cancellationToken); - } - if (step !== BuildStep.Emit) return undefined; + executeSteps(BuildStep.CreateProgram, cancellationToken); return emit(writeFile, cancellationToken, customTransformers); }, done, @@ -1070,166 +1058,100 @@ function createBuildOrUpdateInvalidedProject( step++; } - function handleDiagnostics(diagnostics: readonly Diagnostic[], errorFlags: BuildResultFlags, errorType: string) { - if (diagnostics.length) { - ({ buildResult, step } = buildErrors( - state, - projectPath, - diagnostics, - errorFlags, - errorType, - )); - } - else { - step++; - } - } - - function getSyntaxDiagnostics(cancellationToken?: CancellationToken) { - Debug.assertIsDefined(program); - handleDiagnostics( - [ - ...program.getConfigFileParsingDiagnostics(), - ...program.getOptionsDiagnostics(cancellationToken), - ...program.getGlobalDiagnostics(cancellationToken), - ...program.getSyntacticDiagnostics(/*sourceFile*/ undefined, cancellationToken), - ], - BuildResultFlags.SyntaxErrors, - "Syntactic", - ); - } - - function getSemanticDiagnostics(cancellationToken?: CancellationToken) { - handleDiagnostics( - Debug.checkDefined(program).getSemanticDiagnostics(/*sourceFile*/ undefined, cancellationToken), - BuildResultFlags.TypeErrors, - "Semantic", - ); - } - - function emit(writeFileCallback?: WriteFileCallback, cancellationToken?: CancellationToken, customTransformers?: CustomTransformers): EmitResult { + function emit( + writeFileCallback?: WriteFileCallback, + cancellationToken?: CancellationToken, + customTransformers?: CustomTransformers, + ): EmitResult { Debug.assertIsDefined(program); Debug.assert(step === BuildStep.Emit); - // Before emitting lets backup state, so we can revert it back if there are declaration errors to handle emit and declaration errors correctly - const saved = program.saveEmitState(); - let declDiagnostics: Diagnostic[] | undefined; - const reportDeclarationDiagnostics = (d: Diagnostic) => (declDiagnostics || (declDiagnostics = [])).push(d); - const outputFiles: OutputFile[] = []; - const { emitResult } = emitFilesAndReportErrors( - program, - reportDeclarationDiagnostics, - /*write*/ undefined, - /*reportSummary*/ undefined, - (name, text, writeByteOrderMark, _onError, _sourceFiles, data) => outputFiles.push({ name, text, writeByteOrderMark, data }), - cancellationToken, - /*emitOnlyDtsFiles*/ false, - customTransformers || state.host.getCustomTransformers?.(project), - ); - // Don't emit .d.ts if there are decl file errors - if (declDiagnostics) { - program.restoreEmitState(saved); - ({ buildResult, step } = buildErrors( - state, - projectPath, - declDiagnostics, - BuildResultFlags.DeclarationEmitErrors, - "Declaration file", - )); - return { - emitSkipped: true, - diagnostics: emitResult.diagnostics, - }; - } // Actual Emit const { host, compilerHost } = state; - const resultFlags = program.hasChangedEmitSignature?.() ? BuildResultFlags.None : BuildResultFlags.DeclarationOutputUnchanged; - const emitterDiagnostics = createDiagnosticCollection(); const emittedOutputs = new Map(); const options = program.getCompilerOptions(); const isIncremental = isIncrementalCompilation(options); let outputTimeStampMap: Map | undefined; let now: Date | undefined; - outputFiles.forEach(({ name, text, writeByteOrderMark, data }) => { - const path = toPath(state, name); - emittedOutputs.set(toPath(state, name), name); - if (data?.buildInfo) setBuildInfo(state, data.buildInfo, projectPath, options, resultFlags); - const modifiedTime = data?.differsOnlyInMap ? ts_getModifiedTime(state.host, name) : undefined; - writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark); - // Revert the timestamp for the d.ts that is same - if (data?.differsOnlyInMap) state.host.setModifiedTime(name, modifiedTime!); - else if (!isIncremental && state.watch) { - (outputTimeStampMap ||= getOutputTimeStampMap(state, projectPath)!).set(path, now ||= getCurrentTime(state.host)); - } - }); - - finishEmit( - emitterDiagnostics, - emittedOutputs, - outputFiles.length ? outputFiles[0].name : getFirstProjectOutput(config, !host.useCaseSensitiveFileNames()), - resultFlags, + const { emitResult, diagnostics } = emitFilesAndReportErrors( + program, + d => host.reportDiagnostic(d), + state.write, + /*reportSummary*/ undefined, + (name, text, writeByteOrderMark, onError, sourceFiles, data) => { + const path = toPath(state, name); + emittedOutputs.set(toPath(state, name), name); + if (data?.buildInfo) { + // Update buildInfo cache + now ||= getCurrentTime(state.host); + const isChangedSignature = program!.hasChangedEmitSignature?.(); + const existing = getBuildInfoCacheEntry(state, name, projectPath); + if (existing) { + existing.buildInfo = data.buildInfo; + existing.modifiedTime = now; + if (isChangedSignature) existing.latestChangedDtsTime = now; + } + else { + state.buildInfoCache.set(projectPath, { + path: toPath(state, name), + buildInfo: data.buildInfo, + modifiedTime: now, + latestChangedDtsTime: isChangedSignature ? now : undefined, + }); + } + } + const modifiedTime = data?.differsOnlyInMap ? ts_getModifiedTime(state.host, name) : undefined; + (writeFileCallback || compilerHost.writeFile)( + name, + text, + writeByteOrderMark, + onError, + sourceFiles, + data, + ); + // Revert the timestamp for the d.ts that is same but differs only in d.ts map URL + if (data?.differsOnlyInMap) state.host.setModifiedTime(name, modifiedTime!); + else if (!isIncremental && state.watch) { + (outputTimeStampMap ||= getOutputTimeStampMap(state, projectPath)!).set(path, now ||= getCurrentTime(state.host)); + } + }, + cancellationToken, + /*emitOnlyDtsFiles*/ undefined, + customTransformers || state.host.getCustomTransformers?.(project), ); - return emitResult; - } - function emitBuildInfo(writeFileCallback?: WriteFileCallback, cancellationToken?: CancellationToken): EmitResult { - Debug.assertIsDefined(program); - Debug.assert(step === BuildStep.EmitBuildInfo); - const emitResult = program.emitBuildInfo((name, text, writeByteOrderMark, onError, sourceFiles, data) => { - if (data?.buildInfo) setBuildInfo(state, data.buildInfo, projectPath, program!.getCompilerOptions(), BuildResultFlags.DeclarationOutputUnchanged); - if (writeFileCallback) writeFileCallback(name, text, writeByteOrderMark, onError, sourceFiles, data); - else state.compilerHost.writeFile(name, text, writeByteOrderMark, onError, sourceFiles, data); - }, cancellationToken); - if (emitResult.diagnostics.length) { - reportErrors(state, emitResult.diagnostics); - state.diagnostics.set(projectPath, [...state.diagnostics.get(projectPath)!, ...emitResult.diagnostics]); - buildResult = BuildResultFlags.EmitErrors & buildResult!; + if ( + (!options.noEmitOnError || !diagnostics.length) && + (emittedOutputs.size || status.type !== UpToDateStatusType.OutOfDateBuildInfoWithErrors) + ) { + // Update time stamps for rest of the outputs + updateOutputTimestampsWorker(state, config, projectPath, Diagnostics.Updating_unchanged_output_timestamps_of_project_0, emittedOutputs); } - - if (emitResult.emittedFiles && state.write) { - emitResult.emittedFiles.forEach(name => listEmittedFile(state, config, name)); + state.projectErrorsReported.set(projectPath, true); + if (!diagnostics.length) { + state.diagnostics.delete(projectPath); + state.projectStatus.set(projectPath, { + type: UpToDateStatusType.UpToDate, + oldestOutputFileName: firstOrUndefinedIterator(emittedOutputs.values()) ?? getFirstProjectOutput(config, !host.useCaseSensitiveFileNames()), + }); + buildResult = program.hasChangedEmitSignature?.() ? BuildResultFlags.None : BuildResultFlags.DeclarationOutputUnchanged; + } + else { + state.diagnostics.set(projectPath, diagnostics); + state.projectStatus.set(projectPath, { type: UpToDateStatusType.Unbuildable, reason: `it had errors` }); + buildResult = BuildResultFlags.AnyErrors; } afterProgramDone(state, program); step = BuildStep.QueueReferencingProjects; return emitResult; } - function finishEmit( - emitterDiagnostics: DiagnosticCollection, - emittedOutputs: Map, - oldestOutputFileName: string, - resultFlags: BuildResultFlags, + function executeSteps( + till: BuildStep, + cancellationToken?: CancellationToken, + writeFile?: WriteFileCallback, + customTransformers?: CustomTransformers, ) { - const emitDiagnostics = emitterDiagnostics.getDiagnostics(); - if (emitDiagnostics.length) { - ({ buildResult, step } = buildErrors( - state, - projectPath, - emitDiagnostics, - BuildResultFlags.EmitErrors, - "Emit", - )); - return emitDiagnostics; - } - - if (state.write) { - emittedOutputs.forEach(name => listEmittedFile(state, config, name)); - } - - // Update time stamps for rest of the outputs - updateOutputTimestampsWorker(state, config, projectPath, Diagnostics.Updating_unchanged_output_timestamps_of_project_0, emittedOutputs); - state.diagnostics.delete(projectPath); - state.projectStatus.set(projectPath, { - type: UpToDateStatusType.UpToDate, - oldestOutputFileName, - }); - afterProgramDone(state, program); - step = BuildStep.QueueReferencingProjects; - buildResult = resultFlags; - return emitDiagnostics; - } - - function executeSteps(till: BuildStep, cancellationToken?: CancellationToken, writeFile?: WriteFileCallback, customTransformers?: CustomTransformers) { while (step <= till && step < BuildStep.Done) { const currentStep = step; switch (step) { @@ -1237,22 +1159,10 @@ function createBuildOrUpdateInvalidedProject( createProgram(); break; - case BuildStep.SyntaxDiagnostics: - getSyntaxDiagnostics(cancellationToken); - break; - - case BuildStep.SemanticDiagnostics: - getSemanticDiagnostics(cancellationToken); - break; - case BuildStep.Emit: emit(writeFile, cancellationToken, customTransformers); break; - case BuildStep.EmitBuildInfo: - emitBuildInfo(writeFile, cancellationToken); - break; - case BuildStep.QueueReferencingProjects: queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, Debug.checkDefined(buildResult)); step++; @@ -1397,6 +1307,7 @@ function createInvalidatedProjectWithInfo( info.projectPath, info.projectIndex, info.config, + info.status, buildOrder as BuildOrder, ) : createUpdateOutputFileStampsProject( @@ -1418,12 +1329,6 @@ function getNextInvalidatedProject( return createInvalidatedProjectWithInfo(state, info, buildOrder); } -function listEmittedFile({ write }: SolutionBuilderState, proj: ParsedCommandLine, file: string) { - if (write && proj.options.listEmittedFiles) { - write(`TSFILE: ${file}`); - } -} - function getOldProgram({ options, builderPrograms, compilerHost }: SolutionBuilderState, proj: ResolvedConfigFilePath, parsed: ParsedCommandLine) { if (options.force) return undefined; const value = builderPrograms.get(proj); @@ -1436,7 +1341,6 @@ function afterProgramDone( program: T | undefined, ) { if (program) { - if (state.write) listFiles(program, state.write); if (state.host.afterProgramEmitAndDiagnostics) { state.host.afterProgramEmitAndDiagnostics(program); } @@ -1445,18 +1349,6 @@ function afterProgramDone( state.projectCompilerOptions = state.baseCompilerOptions; } -function buildErrors( - state: SolutionBuilderState, - resolvedPath: ResolvedConfigFilePath, - diagnostics: readonly Diagnostic[], - buildResult: BuildResultFlags, - errorType: string, -) { - reportAndStoreErrors(state, resolvedPath, diagnostics); - state.projectStatus.set(resolvedPath, { type: UpToDateStatusType.Unbuildable, reason: `${errorType} errors` }); - return { buildResult, step: BuildStep.EmitBuildInfo }; -} - function isFileWatcherWithModifiedTime(value: FileWatcherWithModifiedTime | Date): value is FileWatcherWithModifiedTime { return !!(value as FileWatcherWithModifiedTime).watcher; } @@ -1525,31 +1417,6 @@ function getOutputTimeStampMap(state: SolutionBuilderS return result; } -function setBuildInfo( - state: SolutionBuilderState, - buildInfo: BuildInfo, - resolvedConfigPath: ResolvedConfigFilePath, - options: CompilerOptions, - resultFlags: BuildResultFlags, -) { - const buildInfoPath = getTsBuildInfoEmitOutputFilePath(options)!; - const existing = getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath); - const modifiedTime = getCurrentTime(state.host); - if (existing) { - existing.buildInfo = buildInfo; - existing.modifiedTime = modifiedTime; - if (!(resultFlags & BuildResultFlags.DeclarationOutputUnchanged)) existing.latestChangedDtsTime = modifiedTime; - } - else { - state.buildInfoCache.set(resolvedConfigPath, { - path: toPath(state, buildInfoPath), - buildInfo, - modifiedTime, - latestChangedDtsTime: resultFlags & BuildResultFlags.DeclarationOutputUnchanged ? undefined : modifiedTime, - }); - } -} - function getBuildInfoCacheEntry(state: SolutionBuilderState, buildInfoPath: string, resolvedConfigPath: ResolvedConfigFilePath) { const path = toPath(state, buildInfoPath); const existing = state.buildInfoCache.get(resolvedConfigPath); @@ -1668,27 +1535,38 @@ function getUpToDateStatusWorker(state: SolutionBuilde }; } + if ((buildInfo as IncrementalBuildInfo | NonIncrementalBuildInfo).errors) { + return { + type: UpToDateStatusType.OutOfDateBuildInfoWithErrors, + buildInfoFile: buildInfoPath, + }; + } + if (incrementalBuildInfo) { + // If there are errors, we need to build project again to report it + if ( + incrementalBuildInfo.semanticDiagnosticsPerFile?.length || + (!project.options.noEmit && getEmitDeclarations(project.options) && incrementalBuildInfo.emitDiagnosticsPerFile?.length) + ) { + return { + type: UpToDateStatusType.OutOfDateBuildInfoWithErrors, + buildInfoFile: buildInfoPath, + }; + } + // If there are pending changes that are not emitted, project is out of date - // When there are syntax errors, changeFileSet will have list of files changed (irrespective of noEmit) - // But in case of semantic error we need special treatment. - // Checking presence of affectedFilesPendingEmit list is fast and good way to tell if there were semantic errors and file emit was blocked - // But if noEmit is true, affectedFilesPendingEmit will have file list even if there are no semantic errors to preserve list of files to be emitted when running with noEmit false - // So with noEmit set to true, check on semantic diagnostics needs to be explicit as oppose to when it is false when only files pending emit is sufficient if ( - incrementalBuildInfo.changeFileSet?.length || - (!project.options.noEmit ? - (incrementalBuildInfo as IncrementalMultiFileEmitBuildInfo).affectedFilesPendingEmit?.length || - incrementalBuildInfo.emitDiagnosticsPerFile?.length || - (incrementalBuildInfo as IncrementalBundleEmitBuildInfo).pendingEmit !== undefined : - incrementalBuildInfo.semanticDiagnosticsPerFile?.length) + !project.options.noEmit && + ((incrementalBuildInfo as IncrementalMultiFileEmitBuildInfo).affectedFilesPendingEmit?.length || + (incrementalBuildInfo as IncrementalBundleEmitBuildInfo).pendingEmit !== undefined) ) { return { - type: UpToDateStatusType.OutOfDateBuildInfo, + type: UpToDateStatusType.OutOfDateBuildInfoWithPendingEmit, buildInfoFile: buildInfoPath, }; } + // Has not emitted some of the files, project is out of date if (!project.options.noEmit && getPendingEmitKind(project.options, incrementalBuildInfo.options || {})) { return { type: UpToDateStatusType.OutOfDateOptions, @@ -1716,7 +1594,7 @@ function getUpToDateStatusWorker(state: SolutionBuilde }; } - const inputPath = incrementalBuildInfo ? toPath(state, inputFile) : undefined; + const inputPath = toPath(state, inputFile); // If an buildInfo is older than the newest input, we can stop checking if (buildInfoTime < inputTime) { let version: string | undefined; @@ -1724,8 +1602,8 @@ function getUpToDateStatusWorker(state: SolutionBuilde if (incrementalBuildInfo) { // Read files and see if they are same, read is anyways cached if (!buildInfoVersionMap) buildInfoVersionMap = getBuildInfoFileVersionMap(incrementalBuildInfo, buildInfoPath, host); - const resolvedInputPath = buildInfoVersionMap.roots.get(inputPath!); - version = buildInfoVersionMap.fileInfos.get(resolvedInputPath ?? inputPath!); + const resolvedInputPath = buildInfoVersionMap.roots.get(inputPath); + version = buildInfoVersionMap.fileInfos.get(resolvedInputPath ?? inputPath); const text = version ? state.readFileWithCache(resolvedInputPath ?? inputFile) : undefined; currentVersion = text !== undefined ? getSourceFileVersionAsHashFromText(host, text) : undefined; if (version && version === currentVersion) pseudoInputUpToDate = true; @@ -1745,23 +1623,30 @@ function getUpToDateStatusWorker(state: SolutionBuilde newestInputFileTime = inputTime; } - if (incrementalBuildInfo) seenRoots.add(inputPath!); + seenRoots.add(inputPath); } + let existingRoot; if (incrementalBuildInfo) { if (!buildInfoVersionMap) buildInfoVersionMap = getBuildInfoFileVersionMap(incrementalBuildInfo, buildInfoPath, host); - const existingRoot = forEachEntry( + existingRoot = forEachEntry( buildInfoVersionMap.roots, // File was root file when project was built but its not any more (_resolved, existingRoot) => !seenRoots.has(existingRoot) ? existingRoot : undefined, ); - if (existingRoot) { - return { - type: UpToDateStatusType.OutOfDateRoots, - buildInfoFile: buildInfoPath, - inputFile: existingRoot, - }; - } + } + else { + existingRoot = forEach( + getNonIncrementalBuildInfoRoots(buildInfo, buildInfoPath, host), + root => !seenRoots.has(root) ? root : undefined, + ); + } + if (existingRoot) { + return { + type: UpToDateStatusType.OutOfDateRoots, + buildInfoFile: buildInfoPath, + inputFile: existingRoot, + }; } // Now see if all outputs are newer than the newest input @@ -1878,7 +1763,7 @@ function hasSameBuildInfo(state: SolutionBuilderState< function getUpToDateStatus(state: SolutionBuilderState, project: ParsedCommandLine | undefined, resolvedPath: ResolvedConfigFilePath): UpToDateStatus { if (project === undefined) { - return { type: UpToDateStatusType.Unbuildable, reason: "File deleted mid-build" }; + return { type: UpToDateStatusType.Unbuildable, reason: "config file deleted mid-build" }; } const prior = state.projectStatus.get(resolvedPath); @@ -2463,13 +2348,20 @@ function reportUpToDateStatus(state: SolutionBuilderSt relName(state, configFileName), relName(state, status.fileName), ); - case UpToDateStatusType.OutOfDateBuildInfo: + case UpToDateStatusType.OutOfDateBuildInfoWithPendingEmit: return reportStatus( state, Diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted, relName(state, configFileName), relName(state, status.buildInfoFile), ); + case UpToDateStatusType.OutOfDateBuildInfoWithErrors: + return reportStatus( + state, + Diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors, + relName(state, configFileName), + relName(state, status.buildInfoFile), + ); case UpToDateStatusType.OutOfDateOptions: return reportStatus( state, @@ -2528,7 +2420,7 @@ function reportUpToDateStatus(state: SolutionBuilderSt case UpToDateStatusType.Unbuildable: return reportStatus( state, - Diagnostics.Failed_to_parse_file_0_Colon_1, + Diagnostics.Project_0_is_out_of_date_because_1, relName(state, configFileName), status.reason, ); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index b8f9d0bc98ebc..3d4a5e4fda89d 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -4523,6 +4523,7 @@ export interface WriteFileCallbackData { /** @internal */ buildInfo?: BuildInfo; /** @internal */ diagnostics?: readonly DiagnosticWithLocation[]; /** @internal */ differsOnlyInMap?: true; + /** @internal */ skippedDtsWrite?: true; } export type WriteFileCallback = ( fileName: string, diff --git a/src/compiler/watch.ts b/src/compiler/watch.ts index b2f99dd393cfb..97476117e725d 100644 --- a/src/compiler/watch.ts +++ b/src/compiler/watch.ts @@ -333,8 +333,7 @@ export function isBuilderProgram(program: Program | Bu return !!(program as T).state; } -/** @internal */ -export function listFiles(program: Program | T, write: (s: string) => void) { +function listFiles(program: Program | T, write: (s: string) => void) { const options = program.getCompilerOptions(); if (options.explainFiles) { explainFiles(isBuilderProgram(program) ? program.getProgram() : program, write); @@ -598,14 +597,13 @@ export function emitFilesAndReportErrors( const emitResult = isListFilesOnly ? { emitSkipped: true, diagnostics: emptyArray } : program.emit(/*targetSourceFile*/ undefined, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers); - const { emittedFiles, diagnostics: emitDiagnostics } = emitResult; - addRange(allDiagnostics, emitDiagnostics); + addRange(allDiagnostics, emitResult.diagnostics); const diagnostics = sortAndDeduplicateDiagnostics(allDiagnostics); diagnostics.forEach(reportDiagnostic); if (write) { const currentDir = program.getCurrentDirectory(); - forEach(emittedFiles, file => { + forEach(emitResult.emittedFiles, file => { const filepath = getNormalizedAbsolutePath(file, currentDir); write(`TSFILE: ${filepath}`); }); diff --git a/src/testRunner/unittests/helpers/baseline.ts b/src/testRunner/unittests/helpers/baseline.ts index fd082a4a0d4fb..a86bebaa591d6 100644 --- a/src/testRunner/unittests/helpers/baseline.ts +++ b/src/testRunner/unittests/helpers/baseline.ts @@ -136,7 +136,7 @@ export function generateSourceMapBaselineFiles(sys: ts.System & { writtenFiles: } export type ReadableIncrementalBuildInfoDiagnosticOfFile = [file: string, diagnostics: readonly ts.ReusableDiagnostic[]]; -export type ReadableIncrementalBuildInfoDiagnostic = [file: string, "not cached or not changed"] | ReadableIncrementalBuildInfoDiagnosticOfFile; +export type ReadableIncrementalBuildInfoDiagnostic = [file: string, "not cached"] | ReadableIncrementalBuildInfoDiagnosticOfFile; export type ReadableIncrementalBuildInfoEmitDiagnostic = ReadableIncrementalBuildInfoDiagnosticOfFile; export type ReadableBuilderFileEmit = string & { __readableBuilderFileEmit: any; }; export type ReadableIncrementalBuilderInfoFilePendingEmit = [original: string | [string], emitKind: ReadableBuilderFileEmit]; @@ -161,14 +161,12 @@ export type ReadableIncrementalBuildInfoBase = | "resolvedRoot" | "semanticDiagnosticsPerFile" | "emitDiagnosticsPerFile" - | "changeFileSet" > & { root: readonly ReadableIncrementalBuildInfoRoot[]; resolvedRoot: readonly ReadableIncrementalBuildInfoResolvedRoot[] | undefined; semanticDiagnosticsPerFile: readonly ReadableIncrementalBuildInfoDiagnostic[] | undefined; emitDiagnosticsPerFile: readonly ReadableIncrementalBuildInfoEmitDiagnostic[] | undefined; - changeFileSet: readonly string[] | undefined; } & ReadableBuildInfo; export type ReadableIncrementalMultiFileEmitBuildInfo = @@ -182,7 +180,6 @@ export type ReadableIncrementalMultiFileEmitBuildInfo = | "semanticDiagnosticsPerFile" | "emitDiagnosticsPerFile" | "affectedFilesPendingEmit" - | "changeFileSet" | "emitSignatures" > & ReadableIncrementalBuildInfoBase @@ -202,7 +199,6 @@ export type ReadableIncrementalBundleEmitBuildInfo = | "resolvedRoot" | "semanticDiagnosticsPerFile" | "emitDiagnosticsPerFile" - | "changeFileSet" | "pendingEmit" > & ReadableIncrementalBuildInfoBase @@ -251,7 +247,6 @@ function generateBuildInfoBaseline(sys: ts.System, buildInfoPath: string, buildI resolvedRoot: buildInfo.resolvedRoot?.map(toReadableIncrementalBuildInfoResolvedRoot), semanticDiagnosticsPerFile: toReadableIncrementalBuildInfoDiagnostic(buildInfo.semanticDiagnosticsPerFile), emitDiagnosticsPerFile: toReadableIncrementalBuildInfoEmitDiagnostic(buildInfo.emitDiagnosticsPerFile), - changeFileSet: buildInfo.changeFileSet?.map(toFileName), pendingEmit: pendingEmit === undefined ? undefined : [ @@ -277,7 +272,6 @@ function generateBuildInfoBaseline(sys: ts.System, buildInfoPath: string, buildI semanticDiagnosticsPerFile: toReadableIncrementalBuildInfoDiagnostic(buildInfo.semanticDiagnosticsPerFile), emitDiagnosticsPerFile: toReadableIncrementalBuildInfoEmitDiagnostic(buildInfo.emitDiagnosticsPerFile), affectedFilesPendingEmit: buildInfo.affectedFilesPendingEmit?.map(value => toReadableIncrementalBuilderInfoFilePendingEmit(value, fullEmitForOptions!)), - changeFileSet: buildInfo.changeFileSet?.map(toFileName), emitSignatures: buildInfo.emitSignatures?.map(s => ts.isNumber(s) ? toFileName(s) : @@ -370,7 +364,7 @@ function generateBuildInfoBaseline(sys: ts.System, buildInfoPath: string, buildI ): readonly ReadableIncrementalBuildInfoDiagnostic[] | undefined { return diagnostics?.map(d => ts.isNumber(d) ? - [toFileName(d), "not cached or not changed"] : + [toFileName(d), "not cached"] : [toFileName(d[0]), d[1]] ); } diff --git a/src/testRunner/unittests/tsbuild/fileDelete.ts b/src/testRunner/unittests/tsbuild/fileDelete.ts index 9598942877444..6e1ed381a68b4 100644 --- a/src/testRunner/unittests/tsbuild/fileDelete.ts +++ b/src/testRunner/unittests/tsbuild/fileDelete.ts @@ -48,10 +48,6 @@ describe("unittests:: tsbuild:: fileDelete::", () => { fs.rimrafSync("/src/child/child2.js"); fs.rimrafSync("/src/child/child2.d.ts"); }, - discrepancyExplanation: () => [ - "Clean build will not have latestChangedDtsFile as there was no emit and emitSignatures as undefined for files", - "Incremental will store the past latestChangedDtsFile and emitSignatures", - ], }], }); @@ -63,10 +59,6 @@ describe("unittests:: tsbuild:: fileDelete::", () => { edits: [{ caption: "delete child2 file", edit: fs => fs.rimrafSync("/src/child/child2.ts"), - discrepancyExplanation: () => [ - "Clean build will not have latestChangedDtsFile as there was no emit and outSignature as undefined for files", - "Incremental will store the past latestChangedDtsFile and outSignature", - ], }], }); diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/prepend-reports-deprecation-error.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/prepend-reports-deprecation-error.js index e3e32966ca610..e9a403c6dba0a 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/prepend-reports-deprecation-error.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/prepend-reports-deprecation-error.js @@ -106,8 +106,157 @@ Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +//// [/src/app/module.d.ts] +declare module "file3" { + export const z = 30; +} +declare const myVar = 30; +//# sourceMappingURL=module.d.ts.map + +//// [/src/app/module.d.ts.map] +{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["file3.ts","file4.ts"],"names":[],"mappings":";IAAA,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;ACApB,QAAA,MAAM,KAAK,KAAK,CAAC"} + +//// [/src/app/module.d.ts.map.baseline.txt] +=================================================================== +JsFile: module.d.ts +mapUrl: module.d.ts.map +sourceRoot: +sources: file3.ts,file4.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:/src/app/module.d.ts +sourceFile:file3.ts +------------------------------------------------------------------- +>>>declare module "file3" { +>>> export const z = 30; +1 >^^^^ +2 > ^^^^^^ +3 > ^ +4 > ^^^^^^ +5 > ^ +6 > ^^^^^ +7 > ^ +1 > +2 > export +3 > +4 > const +5 > z +6 > = 30 +7 > ; +1 >Emitted(2, 5) Source(1, 1) + SourceIndex(0) +2 >Emitted(2, 11) Source(1, 7) + SourceIndex(0) +3 >Emitted(2, 12) Source(1, 8) + SourceIndex(0) +4 >Emitted(2, 18) Source(1, 14) + SourceIndex(0) +5 >Emitted(2, 19) Source(1, 15) + SourceIndex(0) +6 >Emitted(2, 24) Source(1, 20) + SourceIndex(0) +7 >Emitted(2, 25) Source(1, 21) + SourceIndex(0) +--- +------------------------------------------------------------------- +emittedFile:/src/app/module.d.ts +sourceFile:file4.ts +------------------------------------------------------------------- +>>>} +>>>declare const myVar = 30; +1 > +2 >^^^^^^^^ +3 > ^^^^^^ +4 > ^^^^^ +5 > ^^^^^ +6 > ^ +7 > ^^^^^^^^^^-> +1 > +2 > +3 > const +4 > myVar +5 > = 30 +6 > ; +1 >Emitted(4, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(4, 9) Source(1, 1) + SourceIndex(1) +3 >Emitted(4, 15) Source(1, 7) + SourceIndex(1) +4 >Emitted(4, 20) Source(1, 12) + SourceIndex(1) +5 >Emitted(4, 25) Source(1, 17) + SourceIndex(1) +6 >Emitted(4, 26) Source(1, 18) + SourceIndex(1) +--- +>>>//# sourceMappingURL=module.d.ts.map + +//// [/src/app/module.js] +define("file3", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.z = void 0; + exports.z = 30; +}); +var myVar = 30; +//# sourceMappingURL=module.js.map + +//// [/src/app/module.js.map] +{"version":3,"file":"module.js","sourceRoot":"","sources":["file3.ts","file4.ts"],"names":[],"mappings":";;;;IAAa,QAAA,CAAC,GAAG,EAAE,CAAC;;ACApB,IAAM,KAAK,GAAG,EAAE,CAAC"} + +//// [/src/app/module.js.map.baseline.txt] +=================================================================== +JsFile: module.js +mapUrl: module.js.map +sourceRoot: +sources: file3.ts,file4.ts +=================================================================== +------------------------------------------------------------------- +emittedFile:/src/app/module.js +sourceFile:file3.ts +------------------------------------------------------------------- +>>>define("file3", ["require", "exports"], function (require, exports) { +>>> "use strict"; +>>> Object.defineProperty(exports, "__esModule", { value: true }); +>>> exports.z = void 0; +>>> exports.z = 30; +1 >^^^^ +2 > ^^^^^^^^ +3 > ^ +4 > ^^^ +5 > ^^ +6 > ^ +1 >export const +2 > +3 > z +4 > = +5 > 30 +6 > ; +1 >Emitted(5, 5) Source(1, 14) + SourceIndex(0) +2 >Emitted(5, 13) Source(1, 14) + SourceIndex(0) +3 >Emitted(5, 14) Source(1, 15) + SourceIndex(0) +4 >Emitted(5, 17) Source(1, 18) + SourceIndex(0) +5 >Emitted(5, 19) Source(1, 20) + SourceIndex(0) +6 >Emitted(5, 20) Source(1, 21) + SourceIndex(0) +--- +------------------------------------------------------------------- +emittedFile:/src/app/module.js +sourceFile:file4.ts +------------------------------------------------------------------- +>>>}); +>>>var myVar = 30; +1 > +2 >^^^^ +3 > ^^^^^ +4 > ^^^ +5 > ^^ +6 > ^ +7 > ^^^^^^^^^^^^^^^^^^-> +1 > +2 >const +3 > myVar +4 > = +5 > 30 +6 > ; +1 >Emitted(7, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(7, 5) Source(1, 7) + SourceIndex(1) +3 >Emitted(7, 10) Source(1, 12) + SourceIndex(1) +4 >Emitted(7, 13) Source(1, 15) + SourceIndex(1) +5 >Emitted(7, 15) Source(1, 17) + SourceIndex(1) +6 >Emitted(7, 16) Source(1, 18) + SourceIndex(1) +--- +>>>//# sourceMappingURL=module.js.map + //// [/src/app/module.tsbuildinfo] -{"fileNames":["../../lib/lib.d.ts","../lib/module.d.ts","./file3.ts","./file4.ts"],"fileInfos":["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; };","29754794677-declare const myGlob = 20;\ndeclare module \"file1\" {\n export const x = 10;\n}\ndeclare module \"file2\" {\n export const y = 20;\n}\ndeclare const globalConst = 10;\n","-10505171738-export const z = 30;\nimport { x } from \"file1\";\n","1463681686-const myVar = 30;"],"root":[3,4],"options":{"composite":true,"declarationMap":true,"module":2,"outFile":"./module.js","sourceMap":true,"strict":false,"target":1},"changeFileSet":[1,3,4,2],"version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.d.ts","../lib/module.d.ts","./file3.ts","./file4.ts"],"fileInfos":["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; };","29754794677-declare const myGlob = 20;\ndeclare module \"file1\" {\n export const x = 10;\n}\ndeclare module \"file2\" {\n export const y = 20;\n}\ndeclare const globalConst = 10;\n","-10505171738-export const z = 30;\nimport { x } from \"file1\";\n","1463681686-const myVar = 30;"],"root":[3,4],"options":{"composite":true,"declarationMap":true,"module":2,"outFile":"./module.js","sourceMap":true,"strict":false,"target":1},"semanticDiagnosticsPerFile":[1,2,3,4],"outSignature":"-23302177839-declare module \"file3\" {\n export const z = 30;\n}\ndeclare const myVar = 30;\n","latestChangedDtsFile":"./module.d.ts","version":"FakeTSVersion"} //// [/src/app/module.tsbuildinfo.readable.baseline.txt] { @@ -142,14 +291,28 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated "strict": false, "target": 1 }, - "changeFileSet": [ - "../../lib/lib.d.ts", - "./file3.ts", - "./file4.ts", - "../lib/module.d.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../lib/lib.d.ts", + "not cached" + ], + [ + "../lib/module.d.ts", + "not cached" + ], + [ + "./file3.ts", + "not cached" + ], + [ + "./file4.ts", + "not cached" + ] ], + "outSignature": "-23302177839-declare module \"file3\" {\n export const z = 30;\n}\ndeclare const myVar = 30;\n", + "latestChangedDtsFile": "./module.d.ts", "version": "FakeTSVersion", - "size": 1021 + "size": 1188 } //// [/src/lib/module.d.ts] @@ -486,7 +649,7 @@ Output:: [HH:MM:SS AM] Building project '/src/lib/tsconfig.json'... -[HH:MM:SS AM] Project 'src/app/tsconfig.json' is out of date because buildinfo file 'src/app/module.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/app/tsconfig.json' is out of date because buildinfo file 'src/app/module.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/app/tsconfig.json'... diff --git a/tests/baselines/reference/tsbuild/clean/tsx-with-dts-emit.js b/tests/baselines/reference/tsbuild/clean/tsx-with-dts-emit.js index 1d3dac92e9f30..9c31d0741cb5f 100644 --- a/tests/baselines/reference/tsbuild/clean/tsx-with-dts-emit.js +++ b/tests/baselines/reference/tsbuild/clean/tsx-with-dts-emit.js @@ -59,12 +59,15 @@ exports.x = 10; //// [/src/project/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./src/main.tsx"],"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./src/main.tsx" + ], "version": "FakeTSVersion", - "size": 27 + "size": 53 } diff --git a/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental-discrepancies.js b/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental-discrepancies.js index 9e349c99107ee..6b88d6ee7c768 100644 --- a/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental-discrepancies.js +++ b/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental-discrepancies.js @@ -148,13 +148,31 @@ CleanBuild: "../../project1/src/b.d.ts" ] }, - "changeFileSet": [ - "../../../lib/lib.d.ts", - "../../project1/src/a.d.ts", - "../../project1/src/b.d.ts", - "./e.ts", - "./f.ts", - "./g.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../../lib/lib.d.ts", + "not cached" + ], + [ + "./e.ts", + "not cached" + ], + [ + "../../project1/src/a.d.ts", + "not cached" + ], + [ + "./f.ts", + "not cached" + ], + [ + "../../project1/src/b.d.ts", + "not cached" + ], + [ + "./g.ts", + "not cached" + ] ], "version": "FakeTSVersion" } @@ -207,13 +225,31 @@ IncrementalBuild: "../../project1/src/b.d.ts" ] }, - "changeFileSet": [ - "../../../lib/lib.d.ts", - "../../project1/src/a.d.ts", - "../../project1/src/b.d.ts", - "./e.ts", - "./f.ts", - "./g.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../../lib/lib.d.ts", + "not cached" + ], + [ + "./e.ts", + "not cached" + ], + [ + "../../project1/src/a.d.ts", + "not cached" + ], + [ + "./f.ts", + "not cached" + ], + [ + "../../project1/src/b.d.ts", + "not cached" + ], + [ + "./g.ts", + "not cached" + ] ], "version": "FakeTSVersion" } \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental.js b/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental.js index 5351e7dc67773..bce8eb5a8d6e4 100644 --- a/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental.js +++ b/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental.js @@ -146,7 +146,13 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project2/src/e.ts (computed .d.ts during emit) +/src/project1/src/a.d.ts (used version) +/src/project2/src/f.ts (computed .d.ts during emit) +/src/project1/src/b.d.ts (used version) +/src/project2/src/g.ts (computed .d.ts during emit) //// [/src/project1/src/a.d.ts] @@ -258,8 +264,20 @@ export declare const d = 10; "size": 1224 } +//// [/src/project2/src/e.d.ts] +export declare const e = 10; + + +//// [/src/project2/src/f.d.ts] +export declare const f = 10; + + +//// [/src/project2/src/g.d.ts] +export declare const g = 10; + + //// [/src/project2/src/tsconfig.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.ts"],"fileIdsList":[[3],[5]],"fileInfos":[{"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":false,"affectsGlobalScope":true},{"version":"-13789510868-export const e = 10;","signature":false},{"version":"-3497920574-export declare const a = 10;\n","signature":false},{"version":"-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;","signature":false},{"version":"-3829150557-export declare const b = 10;\n","signature":false},{"version":"-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;","signature":false}],"root":[2,4,6],"options":{"declaration":true,"emitDeclarationOnly":true},"referencedMap":[[4,1],[6,2]],"changeFileSet":[1,3,5,2,4,6],"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.ts"],"fileIdsList":[[3],[5]],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-13789510868-export const e = 10;","signature":"-4822840506-export declare const e = 10;\n"},"-3497920574-export declare const a = 10;\n",{"version":"-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;","signature":"-5154070489-export declare const f = 10;\n"},"-3829150557-export declare const b = 10;\n",{"version":"-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;","signature":"-5485300472-export declare const g = 10;\n"}],"root":[2,4,6],"options":{"declaration":true,"emitDeclarationOnly":true},"referencedMap":[[4,1],[6,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6],"version":"FakeTSVersion"} //// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -283,46 +301,43 @@ export declare const d = 10; "../../../lib/lib.d.ts": { "original": { "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": false, "affectsGlobalScope": true }, "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; };", "affectsGlobalScope": true }, "./e.ts": { "original": { "version": "-13789510868-export const e = 10;", - "signature": false + "signature": "-4822840506-export declare const e = 10;\n" }, - "version": "-13789510868-export const e = 10;" + "version": "-13789510868-export const e = 10;", + "signature": "-4822840506-export declare const e = 10;\n" }, "../../project1/src/a.d.ts": { - "original": { - "version": "-3497920574-export declare const a = 10;\n", - "signature": false - }, - "version": "-3497920574-export declare const a = 10;\n" + "version": "-3497920574-export declare const a = 10;\n", + "signature": "-3497920574-export declare const a = 10;\n" }, "./f.ts": { "original": { "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;", - "signature": false + "signature": "-5154070489-export declare const f = 10;\n" }, - "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;" + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "-5154070489-export declare const f = 10;\n" }, "../../project1/src/b.d.ts": { - "original": { - "version": "-3829150557-export declare const b = 10;\n", - "signature": false - }, - "version": "-3829150557-export declare const b = 10;\n" + "version": "-3829150557-export declare const b = 10;\n", + "signature": "-3829150557-export declare const b = 10;\n" }, "./g.ts": { "original": { "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", - "signature": false + "signature": "-5485300472-export declare const g = 10;\n" }, - "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;" + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "-5485300472-export declare const g = 10;\n" } }, "root": [ @@ -351,16 +366,34 @@ export declare const d = 10; "../../project1/src/b.d.ts" ] }, - "changeFileSet": [ - "../../../lib/lib.d.ts", - "../../project1/src/a.d.ts", - "../../project1/src/b.d.ts", - "./e.ts", - "./f.ts", - "./g.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../../lib/lib.d.ts", + "not cached" + ], + [ + "./e.ts", + "not cached" + ], + [ + "../../project1/src/a.d.ts", + "not cached" + ], + [ + "./f.ts", + "not cached" + ], + [ + "../../project1/src/b.d.ts", + "not cached" + ], + [ + "./g.ts", + "not cached" + ] ], "version": "FakeTSVersion", - "size": 1248 + "size": 1300 } @@ -377,7 +410,7 @@ Output:: [HH:MM:SS AM] Project 'src/project1/src/tsconfig.json' is up to date because newest input 'src/project1/src/d.ts' is older than output 'src/project1/src/tsconfig.tsbuildinfo' -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -439,7 +472,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -619,7 +652,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -813,8 +846,31 @@ exports.d = b_1.b; "size": 1239 } +//// [/src/project2/src/e.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.e = void 0; +exports.e = 10; + + +//// [/src/project2/src/f.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.f = void 0; +var a_1 = require("../../project1/src/a"); +exports.f = a_1.a; + + +//// [/src/project2/src/g.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.g = void 0; +var b_1 = require("../../project1/src/b"); +exports.g = b_1.b; + + //// [/src/project2/src/tsconfig.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.ts"],"fileIdsList":[[3],[5]],"fileInfos":[{"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":false,"affectsGlobalScope":true},{"version":"-13789510868-export const e = 10;","signature":false},{"version":"-3497920574-export declare const a = 10;\n","signature":false},{"version":"-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;","signature":false},{"version":"-3829150557-export declare const b = 10;\n","signature":false},{"version":"-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;","signature":false}],"root":[2,4,6],"options":{"declaration":true,"emitDeclarationOnly":false},"referencedMap":[[4,1],[6,2]],"changeFileSet":[1,3,5,2,4,6],"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.ts"],"fileIdsList":[[3],[5]],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-13789510868-export const e = 10;","signature":"-4822840506-export declare const e = 10;\n"},"-3497920574-export declare const a = 10;\n",{"version":"-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;","signature":"-5154070489-export declare const f = 10;\n"},"-3829150557-export declare const b = 10;\n",{"version":"-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;","signature":"-5485300472-export declare const g = 10;\n"}],"root":[2,4,6],"options":{"declaration":true,"emitDeclarationOnly":false},"referencedMap":[[4,1],[6,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6],"version":"FakeTSVersion"} //// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -838,46 +894,43 @@ exports.d = b_1.b; "../../../lib/lib.d.ts": { "original": { "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": false, "affectsGlobalScope": true }, "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; };", "affectsGlobalScope": true }, "./e.ts": { "original": { "version": "-13789510868-export const e = 10;", - "signature": false + "signature": "-4822840506-export declare const e = 10;\n" }, - "version": "-13789510868-export const e = 10;" + "version": "-13789510868-export const e = 10;", + "signature": "-4822840506-export declare const e = 10;\n" }, "../../project1/src/a.d.ts": { - "original": { - "version": "-3497920574-export declare const a = 10;\n", - "signature": false - }, - "version": "-3497920574-export declare const a = 10;\n" + "version": "-3497920574-export declare const a = 10;\n", + "signature": "-3497920574-export declare const a = 10;\n" }, "./f.ts": { "original": { "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;", - "signature": false + "signature": "-5154070489-export declare const f = 10;\n" }, - "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;" + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "-5154070489-export declare const f = 10;\n" }, "../../project1/src/b.d.ts": { - "original": { - "version": "-3829150557-export declare const b = 10;\n", - "signature": false - }, - "version": "-3829150557-export declare const b = 10;\n" + "version": "-3829150557-export declare const b = 10;\n", + "signature": "-3829150557-export declare const b = 10;\n" }, "./g.ts": { "original": { "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", - "signature": false + "signature": "-5485300472-export declare const g = 10;\n" }, - "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;" + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "-5485300472-export declare const g = 10;\n" } }, "root": [ @@ -906,16 +959,34 @@ exports.d = b_1.b; "../../project1/src/b.d.ts" ] }, - "changeFileSet": [ - "../../../lib/lib.d.ts", - "../../project1/src/a.d.ts", - "../../project1/src/b.d.ts", - "./e.ts", - "./f.ts", - "./g.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../../lib/lib.d.ts", + "not cached" + ], + [ + "./e.ts", + "not cached" + ], + [ + "../../project1/src/a.d.ts", + "not cached" + ], + [ + "./f.ts", + "not cached" + ], + [ + "../../project1/src/b.d.ts", + "not cached" + ], + [ + "./g.ts", + "not cached" + ] ], "version": "FakeTSVersion", - "size": 1249 + "size": 1301 } @@ -932,7 +1003,7 @@ Output:: [HH:MM:SS AM] Project 'src/project1/src/tsconfig.json' is up to date because newest input 'src/project1/src/a.ts' is older than output 'src/project1/src/tsconfig.tsbuildinfo' -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -989,7 +1060,7 @@ Output:: [HH:MM:SS AM] Project 'src/project1/src/tsconfig.json' is up to date because newest input 'src/project1/src/a.ts' is older than output 'src/project1/src/tsconfig.tsbuildinfo' -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -1051,7 +1122,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... diff --git a/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-false-on-commandline-with-declaration.js b/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-false-on-commandline-with-declaration.js index 509642c5da94b..148933cabcd67 100644 --- a/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-false-on-commandline-with-declaration.js +++ b/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-false-on-commandline-with-declaration.js @@ -142,7 +142,13 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project2/src/e.ts (computed .d.ts during emit) +/src/project1/src/a.d.ts (used version) +/src/project2/src/f.ts (computed .d.ts during emit) +/src/project1/src/b.d.ts (used version) +/src/project2/src/g.ts (computed .d.ts during emit) //// [/src/project1/src/a.d.ts] @@ -162,21 +168,45 @@ export declare const d = 10; //// [/src/project1/src/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./a.ts","./b.ts","./c.ts","./d.ts"],"version":"FakeTSVersion"} //// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 72 } +//// [/src/project2/src/e.d.ts] +export declare const e = 10; + + +//// [/src/project2/src/f.d.ts] +export declare const f = 10; + + +//// [/src/project2/src/g.d.ts] +export declare const g = 10; + + //// [/src/project2/src/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./e.ts","./f.ts","./g.ts"],"errors":true,"version":"FakeTSVersion"} //// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./e.ts", + "./f.ts", + "./g.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 77 } @@ -193,7 +223,7 @@ Output:: [HH:MM:SS AM] Project 'src/project1/src/tsconfig.json' is up to date because newest input 'src/project1/src/d.ts' is older than output 'src/project1/src/a.d.ts' -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/src/e.d.ts' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -232,9 +262,18 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project2/src/e.ts (computed .d.ts during emit) +/src/project1/src/a.d.ts (used version) +/src/project2/src/f.ts (computed .d.ts during emit) +/src/project1/src/b.d.ts (used version) +/src/project2/src/g.ts (computed .d.ts during emit) +//// [/src/project2/src/e.d.ts] file written with same contents +//// [/src/project2/src/f.d.ts] file written with same contents +//// [/src/project2/src/g.d.ts] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -256,7 +295,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/src/e.d.ts' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -329,7 +368,13 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project2/src/e.ts (computed .d.ts during emit) +/src/project1/src/a.d.ts (used version) +/src/project2/src/f.ts (computed .d.ts during emit) +/src/project1/src/b.d.ts (used version) +/src/project2/src/g.ts (computed .d.ts during emit) //// [/src/project1/src/a.d.ts] file written with same contents @@ -338,6 +383,9 @@ No shapes updated in the builder:: //// [/src/project1/src/d.d.ts] file written with same contents //// [/src/project1/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/project2/src/e.d.ts] file written with same contents +//// [/src/project2/src/f.d.ts] file written with same contents +//// [/src/project2/src/g.d.ts] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -356,7 +404,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/src/e.js' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -429,7 +477,13 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project2/src/e.ts (computed .d.ts during emit) +/src/project1/src/a.d.ts (used version) +/src/project2/src/f.ts (computed .d.ts during emit) +/src/project1/src/b.d.ts (used version) +/src/project2/src/g.ts (computed .d.ts during emit) //// [/src/project1/src/a.d.ts] file written with same contents @@ -471,6 +525,32 @@ exports.d = b_1.b; //// [/src/project1/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/project2/src/e.d.ts] file written with same contents +//// [/src/project2/src/e.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.e = void 0; +exports.e = 10; + + +//// [/src/project2/src/f.d.ts] file written with same contents +//// [/src/project2/src/f.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.f = void 0; +var a_1 = require("../../project1/src/a"); +exports.f = a_1.a; + + +//// [/src/project2/src/g.d.ts] file written with same contents +//// [/src/project2/src/g.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.g = void 0; +var b_1 = require("../../project1/src/b"); +exports.g = b_1.b; + + //// [/src/project2/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -487,7 +567,7 @@ Output:: [HH:MM:SS AM] Project 'src/project1/src/tsconfig.json' is up to date because newest input 'src/project1/src/a.ts' is older than output 'src/project1/src/a.d.ts' -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/src/e.d.ts' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -526,9 +606,18 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project2/src/e.ts (computed .d.ts during emit) +/src/project1/src/a.d.ts (used version) +/src/project2/src/f.ts (computed .d.ts during emit) +/src/project1/src/b.d.ts (used version) +/src/project2/src/g.ts (computed .d.ts during emit) +//// [/src/project2/src/e.d.ts] file written with same contents +//// [/src/project2/src/f.d.ts] file written with same contents +//// [/src/project2/src/g.d.ts] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -545,7 +634,7 @@ Output:: [HH:MM:SS AM] Project 'src/project1/src/tsconfig.json' is up to date because newest input 'src/project1/src/a.ts' is older than output 'src/project1/src/a.js' -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/src/e.js' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -584,9 +673,21 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: - - +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project2/src/e.ts (computed .d.ts during emit) +/src/project1/src/a.d.ts (used version) +/src/project2/src/f.ts (computed .d.ts during emit) +/src/project1/src/b.d.ts (used version) +/src/project2/src/g.ts (computed .d.ts during emit) + + +//// [/src/project2/src/e.d.ts] file written with same contents +//// [/src/project2/src/e.js] file written with same contents +//// [/src/project2/src/f.d.ts] file written with same contents +//// [/src/project2/src/f.js] file written with same contents +//// [/src/project2/src/g.d.ts] file written with same contents +//// [/src/project2/src/g.js] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -608,7 +709,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/src/e.js' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -681,7 +782,13 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project2/src/e.ts (computed .d.ts during emit) +/src/project1/src/a.d.ts (used version) +/src/project2/src/f.ts (computed .d.ts during emit) +/src/project1/src/b.d.ts (used version) +/src/project2/src/g.ts (computed .d.ts during emit) //// [/src/project1/src/a.d.ts] file written with same contents @@ -702,5 +809,11 @@ var blocal = 10; //// [/src/project1/src/d.js] file written with same contents //// [/src/project1/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/project2/src/e.d.ts] file written with same contents +//// [/src/project2/src/e.js] file written with same contents +//// [/src/project2/src/f.d.ts] file written with same contents +//// [/src/project2/src/f.js] file written with same contents +//// [/src/project2/src/g.d.ts] file written with same contents +//// [/src/project2/src/g.js] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-on-commandline-with-declaration-and-incremental-discrepancies.js b/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-on-commandline-with-declaration-and-incremental-discrepancies.js index 02efd1f231fe1..457fa28d607a0 100644 --- a/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-on-commandline-with-declaration-and-incremental-discrepancies.js +++ b/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-on-commandline-with-declaration-and-incremental-discrepancies.js @@ -147,13 +147,31 @@ CleanBuild: "../../project1/src/b.d.ts" ] }, - "changeFileSet": [ - "../../../lib/lib.d.ts", - "../../project1/src/a.d.ts", - "../../project1/src/b.d.ts", - "./e.ts", - "./f.ts", - "./g.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../../lib/lib.d.ts", + "not cached" + ], + [ + "./e.ts", + "not cached" + ], + [ + "../../project1/src/a.d.ts", + "not cached" + ], + [ + "./f.ts", + "not cached" + ], + [ + "../../project1/src/b.d.ts", + "not cached" + ], + [ + "./g.ts", + "not cached" + ] ], "version": "FakeTSVersion" } @@ -205,13 +223,31 @@ IncrementalBuild: "../../project1/src/b.d.ts" ] }, - "changeFileSet": [ - "../../../lib/lib.d.ts", - "../../project1/src/a.d.ts", - "../../project1/src/b.d.ts", - "./e.ts", - "./f.ts", - "./g.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../../lib/lib.d.ts", + "not cached" + ], + [ + "./e.ts", + "not cached" + ], + [ + "../../project1/src/a.d.ts", + "not cached" + ], + [ + "./f.ts", + "not cached" + ], + [ + "../../project1/src/b.d.ts", + "not cached" + ], + [ + "./g.ts", + "not cached" + ] ], "version": "FakeTSVersion" } @@ -268,13 +304,31 @@ CleanBuild: "../../project1/src/b.d.ts" ] }, - "changeFileSet": [ - "../../../lib/lib.d.ts", - "../../project1/src/a.d.ts", - "../../project1/src/b.d.ts", - "./e.ts", - "./f.ts", - "./g.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../../lib/lib.d.ts", + "not cached" + ], + [ + "./e.ts", + "not cached" + ], + [ + "../../project1/src/a.d.ts", + "not cached" + ], + [ + "./f.ts", + "not cached" + ], + [ + "../../project1/src/b.d.ts", + "not cached" + ], + [ + "./g.ts", + "not cached" + ] ], "version": "FakeTSVersion" } @@ -326,13 +380,31 @@ IncrementalBuild: "../../project1/src/b.d.ts" ] }, - "changeFileSet": [ - "../../../lib/lib.d.ts", - "../../project1/src/a.d.ts", - "../../project1/src/b.d.ts", - "./e.ts", - "./f.ts", - "./g.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../../lib/lib.d.ts", + "not cached" + ], + [ + "./e.ts", + "not cached" + ], + [ + "../../project1/src/a.d.ts", + "not cached" + ], + [ + "./f.ts", + "not cached" + ], + [ + "../../project1/src/b.d.ts", + "not cached" + ], + [ + "./g.ts", + "not cached" + ] ], "version": "FakeTSVersion" } \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-on-commandline-with-declaration-and-incremental.js b/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-on-commandline-with-declaration-and-incremental.js index 1f5a3f43137e9..7574186a74135 100644 --- a/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-on-commandline-with-declaration-and-incremental.js +++ b/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-on-commandline-with-declaration-and-incremental.js @@ -144,7 +144,13 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project2/src/e.ts (computed .d.ts during emit) +/src/project1/src/a.d.ts (used version) +/src/project2/src/f.ts (computed .d.ts during emit) +/src/project1/src/b.d.ts (used version) +/src/project2/src/g.ts (computed .d.ts during emit) //// [/src/project1/src/a.d.ts] @@ -256,8 +262,20 @@ export declare const d = 10; "size": 1224 } +//// [/src/project2/src/e.d.ts] +export declare const e = 10; + + +//// [/src/project2/src/f.d.ts] +export declare const f = 10; + + +//// [/src/project2/src/g.d.ts] +export declare const g = 10; + + //// [/src/project2/src/tsconfig.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.ts"],"fileIdsList":[[3],[5]],"fileInfos":[{"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":false,"affectsGlobalScope":true},{"version":"-13789510868-export const e = 10;","signature":false},{"version":"-3497920574-export declare const a = 10;\n","signature":false},{"version":"-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;","signature":false},{"version":"-3829150557-export declare const b = 10;\n","signature":false},{"version":"-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;","signature":false}],"root":[2,4,6],"options":{"declaration":true,"emitDeclarationOnly":true},"referencedMap":[[4,1],[6,2]],"changeFileSet":[1,3,5,2,4,6],"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.ts"],"fileIdsList":[[3],[5]],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-13789510868-export const e = 10;","signature":"-4822840506-export declare const e = 10;\n"},"-3497920574-export declare const a = 10;\n",{"version":"-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;","signature":"-5154070489-export declare const f = 10;\n"},"-3829150557-export declare const b = 10;\n",{"version":"-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;","signature":"-5485300472-export declare const g = 10;\n"}],"root":[2,4,6],"options":{"declaration":true,"emitDeclarationOnly":true},"referencedMap":[[4,1],[6,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6],"version":"FakeTSVersion"} //// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -281,46 +299,43 @@ export declare const d = 10; "../../../lib/lib.d.ts": { "original": { "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": false, "affectsGlobalScope": true }, "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; };", "affectsGlobalScope": true }, "./e.ts": { "original": { "version": "-13789510868-export const e = 10;", - "signature": false + "signature": "-4822840506-export declare const e = 10;\n" }, - "version": "-13789510868-export const e = 10;" + "version": "-13789510868-export const e = 10;", + "signature": "-4822840506-export declare const e = 10;\n" }, "../../project1/src/a.d.ts": { - "original": { - "version": "-3497920574-export declare const a = 10;\n", - "signature": false - }, - "version": "-3497920574-export declare const a = 10;\n" + "version": "-3497920574-export declare const a = 10;\n", + "signature": "-3497920574-export declare const a = 10;\n" }, "./f.ts": { "original": { "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;", - "signature": false + "signature": "-5154070489-export declare const f = 10;\n" }, - "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;" + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "-5154070489-export declare const f = 10;\n" }, "../../project1/src/b.d.ts": { - "original": { - "version": "-3829150557-export declare const b = 10;\n", - "signature": false - }, - "version": "-3829150557-export declare const b = 10;\n" + "version": "-3829150557-export declare const b = 10;\n", + "signature": "-3829150557-export declare const b = 10;\n" }, "./g.ts": { "original": { "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", - "signature": false + "signature": "-5485300472-export declare const g = 10;\n" }, - "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;" + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "-5485300472-export declare const g = 10;\n" } }, "root": [ @@ -349,16 +364,34 @@ export declare const d = 10; "../../project1/src/b.d.ts" ] }, - "changeFileSet": [ - "../../../lib/lib.d.ts", - "../../project1/src/a.d.ts", - "../../project1/src/b.d.ts", - "./e.ts", - "./f.ts", - "./g.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../../lib/lib.d.ts", + "not cached" + ], + [ + "./e.ts", + "not cached" + ], + [ + "../../project1/src/a.d.ts", + "not cached" + ], + [ + "./f.ts", + "not cached" + ], + [ + "../../project1/src/b.d.ts", + "not cached" + ], + [ + "./g.ts", + "not cached" + ] ], "version": "FakeTSVersion", - "size": 1248 + "size": 1300 } @@ -375,7 +408,7 @@ Output:: [HH:MM:SS AM] Project 'src/project1/src/tsconfig.json' is up to date because newest input 'src/project1/src/d.ts' is older than output 'src/project1/src/tsconfig.tsbuildinfo' -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -437,7 +470,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -620,7 +653,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -689,7 +722,9 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/src/project1/src/a.d.ts (used version) +/src/project2/src/f.ts (computed .d.ts) //// [/src/project1/src/a.d.ts] @@ -791,8 +826,9 @@ export declare const aaa = 10; "size": 1291 } +//// [/src/project2/src/f.d.ts] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.ts"],"fileIdsList":[[3],[5]],"fileInfos":[{"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":false,"affectsGlobalScope":true},{"version":"-13789510868-export const e = 10;","signature":false},{"version":"-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n","signature":false},{"version":"-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;","signature":false},{"version":"-3829150557-export declare const b = 10;\n","signature":false},{"version":"-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;","signature":false}],"root":[2,4,6],"options":{"declaration":true,"emitDeclarationOnly":true},"referencedMap":[[4,1],[6,2]],"changeFileSet":[1,3,5,2,4,6],"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.ts"],"fileIdsList":[[3],[5]],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-13789510868-export const e = 10;","signature":"-4822840506-export declare const e = 10;\n"},"-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n",{"version":"-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;","signature":"-5154070489-export declare const f = 10;\n"},"-3829150557-export declare const b = 10;\n",{"version":"-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;","signature":"-5485300472-export declare const g = 10;\n"}],"root":[2,4,6],"options":{"declaration":true,"emitDeclarationOnly":true},"referencedMap":[[4,1],[6,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6],"version":"FakeTSVersion"} //// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -816,46 +852,43 @@ export declare const aaa = 10; "../../../lib/lib.d.ts": { "original": { "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": false, "affectsGlobalScope": true }, "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; };", "affectsGlobalScope": true }, "./e.ts": { "original": { "version": "-13789510868-export const e = 10;", - "signature": false + "signature": "-4822840506-export declare const e = 10;\n" }, - "version": "-13789510868-export const e = 10;" + "version": "-13789510868-export const e = 10;", + "signature": "-4822840506-export declare const e = 10;\n" }, "../../project1/src/a.d.ts": { - "original": { - "version": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n", - "signature": false - }, - "version": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + "version": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" }, "./f.ts": { "original": { "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;", - "signature": false + "signature": "-5154070489-export declare const f = 10;\n" }, - "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;" + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "-5154070489-export declare const f = 10;\n" }, "../../project1/src/b.d.ts": { - "original": { - "version": "-3829150557-export declare const b = 10;\n", - "signature": false - }, - "version": "-3829150557-export declare const b = 10;\n" + "version": "-3829150557-export declare const b = 10;\n", + "signature": "-3829150557-export declare const b = 10;\n" }, "./g.ts": { "original": { "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", - "signature": false + "signature": "-5485300472-export declare const g = 10;\n" }, - "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;" + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "-5485300472-export declare const g = 10;\n" } }, "root": [ @@ -884,16 +917,34 @@ export declare const aaa = 10; "../../project1/src/b.d.ts" ] }, - "changeFileSet": [ - "../../../lib/lib.d.ts", - "../../project1/src/a.d.ts", - "../../project1/src/b.d.ts", - "./e.ts", - "./f.ts", - "./g.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../../lib/lib.d.ts", + "not cached" + ], + [ + "./e.ts", + "not cached" + ], + [ + "../../project1/src/a.d.ts", + "not cached" + ], + [ + "./f.ts", + "not cached" + ], + [ + "../../project1/src/b.d.ts", + "not cached" + ], + [ + "./g.ts", + "not cached" + ] ], "version": "FakeTSVersion", - "size": 1280 + "size": 1332 } @@ -912,7 +963,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -1104,8 +1155,31 @@ exports.d = b_1.b; "size": 1264 } +//// [/src/project2/src/e.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.e = void 0; +exports.e = 10; + + +//// [/src/project2/src/f.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.f = void 0; +var a_1 = require("../../project1/src/a"); +exports.f = a_1.a; + + +//// [/src/project2/src/g.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.g = void 0; +var b_1 = require("../../project1/src/b"); +exports.g = b_1.b; + + //// [/src/project2/src/tsconfig.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.ts"],"fileIdsList":[[3],[5]],"fileInfos":[{"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":false,"affectsGlobalScope":true},{"version":"-13789510868-export const e = 10;","signature":false},{"version":"-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n","signature":false},{"version":"-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;","signature":false},{"version":"-3829150557-export declare const b = 10;\n","signature":false},{"version":"-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;","signature":false}],"root":[2,4,6],"options":{"declaration":true},"referencedMap":[[4,1],[6,2]],"changeFileSet":[1,3,5,2,4,6],"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.ts"],"fileIdsList":[[3],[5]],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-13789510868-export const e = 10;","signature":"-4822840506-export declare const e = 10;\n"},"-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n",{"version":"-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;","signature":"-5154070489-export declare const f = 10;\n"},"-3829150557-export declare const b = 10;\n",{"version":"-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;","signature":"-5485300472-export declare const g = 10;\n"}],"root":[2,4,6],"options":{"declaration":true},"referencedMap":[[4,1],[6,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6],"version":"FakeTSVersion"} //// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -1129,46 +1203,43 @@ exports.d = b_1.b; "../../../lib/lib.d.ts": { "original": { "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": false, "affectsGlobalScope": true }, "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; };", "affectsGlobalScope": true }, "./e.ts": { "original": { "version": "-13789510868-export const e = 10;", - "signature": false + "signature": "-4822840506-export declare const e = 10;\n" }, - "version": "-13789510868-export const e = 10;" + "version": "-13789510868-export const e = 10;", + "signature": "-4822840506-export declare const e = 10;\n" }, "../../project1/src/a.d.ts": { - "original": { - "version": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n", - "signature": false - }, - "version": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + "version": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" }, "./f.ts": { "original": { "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;", - "signature": false + "signature": "-5154070489-export declare const f = 10;\n" }, - "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;" + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "-5154070489-export declare const f = 10;\n" }, "../../project1/src/b.d.ts": { - "original": { - "version": "-3829150557-export declare const b = 10;\n", - "signature": false - }, - "version": "-3829150557-export declare const b = 10;\n" + "version": "-3829150557-export declare const b = 10;\n", + "signature": "-3829150557-export declare const b = 10;\n" }, "./g.ts": { "original": { "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", - "signature": false + "signature": "-5485300472-export declare const g = 10;\n" }, - "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;" + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "-5485300472-export declare const g = 10;\n" } }, "root": [ @@ -1196,16 +1267,34 @@ exports.d = b_1.b; "../../project1/src/b.d.ts" ] }, - "changeFileSet": [ - "../../../lib/lib.d.ts", - "../../project1/src/a.d.ts", - "../../project1/src/b.d.ts", - "./e.ts", - "./f.ts", - "./g.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../../lib/lib.d.ts", + "not cached" + ], + [ + "./e.ts", + "not cached" + ], + [ + "../../project1/src/a.d.ts", + "not cached" + ], + [ + "./f.ts", + "not cached" + ], + [ + "../../project1/src/b.d.ts", + "not cached" + ], + [ + "./g.ts", + "not cached" + ] ], "version": "FakeTSVersion", - "size": 1253 + "size": 1305 } @@ -1222,7 +1311,7 @@ Output:: [HH:MM:SS AM] Project 'src/project1/src/tsconfig.json' is up to date because newest input 'src/project1/src/a.ts' is older than output 'src/project1/src/tsconfig.tsbuildinfo' -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -1284,7 +1373,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -1473,7 +1562,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -1656,7 +1745,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -1725,7 +1814,9 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/src/project1/src/b.d.ts (used version) +/src/project2/src/g.ts (computed .d.ts) //// [/src/project1/src/b.d.ts] @@ -1827,8 +1918,9 @@ export declare const aaaaa = 10; "size": 1382 } +//// [/src/project2/src/g.d.ts] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.ts"],"fileIdsList":[[3],[5]],"fileInfos":[{"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":false,"affectsGlobalScope":true},{"version":"-13789510868-export const e = 10;","signature":false},{"version":"-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n","signature":false},{"version":"-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;","signature":false},{"version":"2661550180-export declare const b = 10;\nexport declare const aaaaa = 10;\n","signature":false},{"version":"-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;","signature":false}],"root":[2,4,6],"options":{"declaration":true,"emitDeclarationOnly":true},"referencedMap":[[4,1],[6,2]],"changeFileSet":[1,3,5,2,4,6],"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.ts"],"fileIdsList":[[3],[5]],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-13789510868-export const e = 10;","signature":"-4822840506-export declare const e = 10;\n"},"-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n",{"version":"-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;","signature":"-5154070489-export declare const f = 10;\n"},"2661550180-export declare const b = 10;\nexport declare const aaaaa = 10;\n",{"version":"-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;","signature":"-5485300472-export declare const g = 10;\n"}],"root":[2,4,6],"options":{"declaration":true,"emitDeclarationOnly":true},"referencedMap":[[4,1],[6,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6],"version":"FakeTSVersion"} //// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -1852,46 +1944,43 @@ export declare const aaaaa = 10; "../../../lib/lib.d.ts": { "original": { "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": false, "affectsGlobalScope": true }, "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; };", "affectsGlobalScope": true }, "./e.ts": { "original": { "version": "-13789510868-export const e = 10;", - "signature": false + "signature": "-4822840506-export declare const e = 10;\n" }, - "version": "-13789510868-export const e = 10;" + "version": "-13789510868-export const e = 10;", + "signature": "-4822840506-export declare const e = 10;\n" }, "../../project1/src/a.d.ts": { - "original": { - "version": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n", - "signature": false - }, - "version": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + "version": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" }, "./f.ts": { "original": { "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;", - "signature": false + "signature": "-5154070489-export declare const f = 10;\n" }, - "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;" + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "-5154070489-export declare const f = 10;\n" }, "../../project1/src/b.d.ts": { - "original": { - "version": "2661550180-export declare const b = 10;\nexport declare const aaaaa = 10;\n", - "signature": false - }, - "version": "2661550180-export declare const b = 10;\nexport declare const aaaaa = 10;\n" + "version": "2661550180-export declare const b = 10;\nexport declare const aaaaa = 10;\n", + "signature": "2661550180-export declare const b = 10;\nexport declare const aaaaa = 10;\n" }, "./g.ts": { "original": { "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", - "signature": false + "signature": "-5485300472-export declare const g = 10;\n" }, - "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;" + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "-5485300472-export declare const g = 10;\n" } }, "root": [ @@ -1920,16 +2009,34 @@ export declare const aaaaa = 10; "../../project1/src/b.d.ts" ] }, - "changeFileSet": [ - "../../../lib/lib.d.ts", - "../../project1/src/a.d.ts", - "../../project1/src/b.d.ts", - "./e.ts", - "./f.ts", - "./g.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../../lib/lib.d.ts", + "not cached" + ], + [ + "./e.ts", + "not cached" + ], + [ + "../../project1/src/a.d.ts", + "not cached" + ], + [ + "./f.ts", + "not cached" + ], + [ + "../../project1/src/b.d.ts", + "not cached" + ], + [ + "./g.ts", + "not cached" + ] ], "version": "FakeTSVersion", - "size": 1313 + "size": 1365 } @@ -1951,7 +2058,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -2018,7 +2125,9 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/src/project1/src/b.d.ts (used version) +/src/project2/src/g.ts (computed .d.ts) //// [/src/project1/src/a.js] file written with same contents @@ -2135,8 +2244,12 @@ exports.a2 = 10; "size": 1409 } +//// [/src/project2/src/e.js] file written with same contents +//// [/src/project2/src/f.js] file written with same contents +//// [/src/project2/src/g.d.ts] file written with same contents +//// [/src/project2/src/g.js] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.ts"],"fileIdsList":[[3],[5]],"fileInfos":[{"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":false,"affectsGlobalScope":true},{"version":"-13789510868-export const e = 10;","signature":false},{"version":"-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n","signature":false},{"version":"-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;","signature":false},{"version":"-2237944013-export declare const b = 10;\nexport declare const aaaaa = 10;\nexport declare const a2 = 10;\n","signature":false},{"version":"-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;","signature":false}],"root":[2,4,6],"options":{"declaration":true},"referencedMap":[[4,1],[6,2]],"changeFileSet":[1,3,5,2,4,6],"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.ts"],"fileIdsList":[[3],[5]],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-13789510868-export const e = 10;","signature":"-4822840506-export declare const e = 10;\n"},"-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n",{"version":"-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;","signature":"-5154070489-export declare const f = 10;\n"},"-2237944013-export declare const b = 10;\nexport declare const aaaaa = 10;\nexport declare const a2 = 10;\n",{"version":"-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;","signature":"-5485300472-export declare const g = 10;\n"}],"root":[2,4,6],"options":{"declaration":true},"referencedMap":[[4,1],[6,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5,6],"version":"FakeTSVersion"} //// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -2160,46 +2273,43 @@ exports.a2 = 10; "../../../lib/lib.d.ts": { "original": { "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": false, "affectsGlobalScope": true }, "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; };", "affectsGlobalScope": true }, "./e.ts": { "original": { "version": "-13789510868-export const e = 10;", - "signature": false + "signature": "-4822840506-export declare const e = 10;\n" }, - "version": "-13789510868-export const e = 10;" + "version": "-13789510868-export const e = 10;", + "signature": "-4822840506-export declare const e = 10;\n" }, "../../project1/src/a.d.ts": { - "original": { - "version": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n", - "signature": false - }, - "version": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + "version": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" }, "./f.ts": { "original": { "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;", - "signature": false + "signature": "-5154070489-export declare const f = 10;\n" }, - "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;" + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": "-5154070489-export declare const f = 10;\n" }, "../../project1/src/b.d.ts": { - "original": { - "version": "-2237944013-export declare const b = 10;\nexport declare const aaaaa = 10;\nexport declare const a2 = 10;\n", - "signature": false - }, - "version": "-2237944013-export declare const b = 10;\nexport declare const aaaaa = 10;\nexport declare const a2 = 10;\n" + "version": "-2237944013-export declare const b = 10;\nexport declare const aaaaa = 10;\nexport declare const a2 = 10;\n", + "signature": "-2237944013-export declare const b = 10;\nexport declare const aaaaa = 10;\nexport declare const a2 = 10;\n" }, "./g.ts": { "original": { "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", - "signature": false + "signature": "-5485300472-export declare const g = 10;\n" }, - "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;" + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "-5485300472-export declare const g = 10;\n" } }, "root": [ @@ -2227,15 +2337,33 @@ exports.a2 = 10; "../../project1/src/b.d.ts" ] }, - "changeFileSet": [ - "../../../lib/lib.d.ts", - "../../project1/src/a.d.ts", - "../../project1/src/b.d.ts", - "./e.ts", - "./f.ts", - "./g.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../../lib/lib.d.ts", + "not cached" + ], + [ + "./e.ts", + "not cached" + ], + [ + "../../project1/src/a.d.ts", + "not cached" + ], + [ + "./f.ts", + "not cached" + ], + [ + "../../project1/src/b.d.ts", + "not cached" + ], + [ + "./g.ts", + "not cached" + ] ], "version": "FakeTSVersion", - "size": 1318 + "size": 1370 } diff --git a/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-on-commandline-with-declaration.js b/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-on-commandline-with-declaration.js index cc0c33de4c0e7..87af0bf93f894 100644 --- a/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-on-commandline-with-declaration.js +++ b/tests/baselines/reference/tsbuild/commandLine/multiFile/emitDeclarationOnly-on-commandline-with-declaration.js @@ -140,7 +140,13 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project2/src/e.ts (computed .d.ts during emit) +/src/project1/src/a.d.ts (used version) +/src/project2/src/f.ts (computed .d.ts during emit) +/src/project1/src/b.d.ts (used version) +/src/project2/src/g.ts (computed .d.ts during emit) //// [/src/project1/src/a.d.ts] @@ -160,21 +166,45 @@ export declare const d = 10; //// [/src/project1/src/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./a.ts","./b.ts","./c.ts","./d.ts"],"version":"FakeTSVersion"} //// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 72 } +//// [/src/project2/src/e.d.ts] +export declare const e = 10; + + +//// [/src/project2/src/f.d.ts] +export declare const f = 10; + + +//// [/src/project2/src/g.d.ts] +export declare const g = 10; + + //// [/src/project2/src/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./e.ts","./f.ts","./g.ts"],"errors":true,"version":"FakeTSVersion"} //// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./e.ts", + "./f.ts", + "./g.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 77 } @@ -191,7 +221,7 @@ Output:: [HH:MM:SS AM] Project 'src/project1/src/tsconfig.json' is up to date because newest input 'src/project1/src/d.ts' is older than output 'src/project1/src/a.d.ts' -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/src/e.d.ts' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -230,9 +260,18 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project2/src/e.ts (computed .d.ts during emit) +/src/project1/src/a.d.ts (used version) +/src/project2/src/f.ts (computed .d.ts during emit) +/src/project1/src/b.d.ts (used version) +/src/project2/src/g.ts (computed .d.ts during emit) +//// [/src/project2/src/e.d.ts] file written with same contents +//// [/src/project2/src/f.d.ts] file written with same contents +//// [/src/project2/src/g.d.ts] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -254,7 +293,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/src/e.d.ts' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -327,7 +366,13 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project2/src/e.ts (computed .d.ts during emit) +/src/project1/src/a.d.ts (used version) +/src/project2/src/f.ts (computed .d.ts during emit) +/src/project1/src/b.d.ts (used version) +/src/project2/src/g.ts (computed .d.ts during emit) //// [/src/project1/src/a.d.ts] file written with same contents @@ -336,6 +381,9 @@ No shapes updated in the builder:: //// [/src/project1/src/d.d.ts] file written with same contents //// [/src/project1/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/project2/src/e.d.ts] file written with same contents +//// [/src/project2/src/f.d.ts] file written with same contents +//// [/src/project2/src/g.d.ts] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -357,7 +405,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/src/e.d.ts' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -430,7 +478,13 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project2/src/e.ts (computed .d.ts during emit) +/src/project1/src/a.d.ts (used version) +/src/project2/src/f.ts (computed .d.ts during emit) +/src/project1/src/b.d.ts (used version) +/src/project2/src/g.ts (computed .d.ts during emit) //// [/src/project1/src/a.d.ts] @@ -443,6 +497,9 @@ export declare const aaa = 10; //// [/src/project1/src/d.d.ts] file written with same contents //// [/src/project1/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/project2/src/e.d.ts] file written with same contents +//// [/src/project2/src/f.d.ts] file written with same contents +//// [/src/project2/src/g.d.ts] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -461,7 +518,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/src/e.js' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -532,7 +589,13 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project2/src/e.ts (computed .d.ts during emit) +/src/project1/src/a.d.ts (used version) +/src/project2/src/f.ts (computed .d.ts during emit) +/src/project1/src/b.d.ts (used version) +/src/project2/src/g.ts (computed .d.ts during emit) //// [/src/project1/src/a.d.ts] file written with same contents @@ -575,6 +638,32 @@ exports.d = b_1.b; //// [/src/project1/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/project2/src/e.d.ts] file written with same contents +//// [/src/project2/src/e.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.e = void 0; +exports.e = 10; + + +//// [/src/project2/src/f.d.ts] file written with same contents +//// [/src/project2/src/f.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.f = void 0; +var a_1 = require("../../project1/src/a"); +exports.f = a_1.a; + + +//// [/src/project2/src/g.d.ts] file written with same contents +//// [/src/project2/src/g.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.g = void 0; +var b_1 = require("../../project1/src/b"); +exports.g = b_1.b; + + //// [/src/project2/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -591,7 +680,7 @@ Output:: [HH:MM:SS AM] Project 'src/project1/src/tsconfig.json' is up to date because newest input 'src/project1/src/a.ts' is older than output 'src/project1/src/a.d.ts' -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/src/e.d.ts' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -630,9 +719,18 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project2/src/e.ts (computed .d.ts during emit) +/src/project1/src/a.d.ts (used version) +/src/project2/src/f.ts (computed .d.ts during emit) +/src/project1/src/b.d.ts (used version) +/src/project2/src/g.ts (computed .d.ts during emit) +//// [/src/project2/src/e.d.ts] file written with same contents +//// [/src/project2/src/f.d.ts] file written with same contents +//// [/src/project2/src/g.d.ts] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -654,7 +752,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/src/e.js' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -725,7 +823,13 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project2/src/e.ts (computed .d.ts during emit) +/src/project1/src/a.d.ts (used version) +/src/project2/src/f.ts (computed .d.ts during emit) +/src/project1/src/b.d.ts (used version) +/src/project2/src/g.ts (computed .d.ts during emit) //// [/src/project1/src/a.d.ts] file written with same contents @@ -746,6 +850,12 @@ var alocal = 10; //// [/src/project1/src/d.js] file written with same contents //// [/src/project1/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/project2/src/e.d.ts] file written with same contents +//// [/src/project2/src/e.js] file written with same contents +//// [/src/project2/src/f.d.ts] file written with same contents +//// [/src/project2/src/f.js] file written with same contents +//// [/src/project2/src/g.d.ts] file written with same contents +//// [/src/project2/src/g.js] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -767,7 +877,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/src/e.d.ts' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -840,7 +950,13 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project2/src/e.ts (computed .d.ts during emit) +/src/project1/src/a.d.ts (used version) +/src/project2/src/f.ts (computed .d.ts during emit) +/src/project1/src/b.d.ts (used version) +/src/project2/src/g.ts (computed .d.ts during emit) //// [/src/project1/src/a.d.ts] file written with same contents @@ -849,6 +965,9 @@ No shapes updated in the builder:: //// [/src/project1/src/d.d.ts] file written with same contents //// [/src/project1/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/project2/src/e.d.ts] file written with same contents +//// [/src/project2/src/f.d.ts] file written with same contents +//// [/src/project2/src/g.d.ts] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -870,7 +989,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/src/e.d.ts' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -943,7 +1062,13 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project2/src/e.ts (computed .d.ts during emit) +/src/project1/src/a.d.ts (used version) +/src/project2/src/f.ts (computed .d.ts during emit) +/src/project1/src/b.d.ts (used version) +/src/project2/src/g.ts (computed .d.ts during emit) //// [/src/project1/src/a.d.ts] file written with same contents @@ -956,6 +1081,9 @@ export declare const aaaaa = 10; //// [/src/project1/src/d.d.ts] file written with same contents //// [/src/project1/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/project2/src/e.d.ts] file written with same contents +//// [/src/project2/src/f.d.ts] file written with same contents +//// [/src/project2/src/g.d.ts] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -977,7 +1105,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/src/e.js' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -1048,7 +1176,13 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project2/src/e.ts (computed .d.ts during emit) +/src/project1/src/a.d.ts (used version) +/src/project2/src/f.ts (computed .d.ts during emit) +/src/project1/src/b.d.ts (used version) +/src/project2/src/g.ts (computed .d.ts during emit) //// [/src/project1/src/a.d.ts] file written with same contents @@ -1077,5 +1211,11 @@ exports.a2 = 10; //// [/src/project1/src/d.js] file written with same contents //// [/src/project1/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/project2/src/e.d.ts] file written with same contents +//// [/src/project2/src/e.js] file written with same contents +//// [/src/project2/src/f.d.ts] file written with same contents +//// [/src/project2/src/f.js] file written with same contents +//// [/src/project2/src/g.d.ts] file written with same contents +//// [/src/project2/src/g.js] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental-discrepancies.js b/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental-discrepancies.js index 6bc09e49e8eb5..68585019a6970 100644 --- a/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental-discrepancies.js +++ b/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental-discrepancies.js @@ -93,12 +93,27 @@ CleanBuild: "module": 2, "outFile": "./outFile.js" }, - "changeFileSet": [ - "../../lib/lib.d.ts", - "../project1/outfile.d.ts", - "./src/e.ts", - "./src/f.ts", - "./src/g.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../lib/lib.d.ts", + "not cached" + ], + [ + "../project1/outfile.d.ts", + "not cached" + ], + [ + "./src/e.ts", + "not cached" + ], + [ + "./src/f.ts", + "not cached" + ], + [ + "./src/g.ts", + "not cached" + ] ], "version": "FakeTSVersion" } @@ -130,12 +145,27 @@ IncrementalBuild: "module": 2, "outFile": "./outFile.js" }, - "changeFileSet": [ - "../../lib/lib.d.ts", - "../project1/outfile.d.ts", - "./src/e.ts", - "./src/f.ts", - "./src/g.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../lib/lib.d.ts", + "not cached" + ], + [ + "../project1/outfile.d.ts", + "not cached" + ], + [ + "./src/e.ts", + "not cached" + ], + [ + "./src/f.ts", + "not cached" + ], + [ + "./src/g.ts", + "not cached" + ] ], "version": "FakeTSVersion" } \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental.js b/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental.js index dcc1ecddee641..5752ed4eb3f46 100644 --- a/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental.js +++ b/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental.js @@ -209,8 +209,20 @@ declare module "d" { "size": 905 } +//// [/src/project2/outFile.d.ts] +declare module "e" { + export const e = 10; +} +declare module "f" { + export const f = 10; +} +declare module "g" { + export const g = 10; +} + + //// [/src/project2/outFile.tsbuildinfo] -{"fileNames":["../../lib/lib.d.ts","../project1/outfile.d.ts","./src/e.ts","./src/f.ts","./src/g.ts"],"fileInfos":["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; };","-25657667359-declare module \"a\" {\n export const a = 10;\n}\ndeclare module \"b\" {\n export const b = 10;\n}\ndeclare module \"c\" {\n export const c = 10;\n}\ndeclare module \"d\" {\n export const d = 10;\n}\n","-13789510868-export const e = 10;","-4849089835-import { a } from \"a\"; export const f = a;","-18341999015-import { b } from \"b\"; export const g = b;"],"root":[[3,5]],"options":{"declaration":true,"emitDeclarationOnly":true,"module":2,"outFile":"./outFile.js"},"changeFileSet":[1,2,3,4,5],"version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.d.ts","../project1/outfile.d.ts","./src/e.ts","./src/f.ts","./src/g.ts"],"fileInfos":["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; };","-25657667359-declare module \"a\" {\n export const a = 10;\n}\ndeclare module \"b\" {\n export const b = 10;\n}\ndeclare module \"c\" {\n export const c = 10;\n}\ndeclare module \"d\" {\n export const d = 10;\n}\n","-13789510868-export const e = 10;","-4849089835-import { a } from \"a\"; export const f = a;","-18341999015-import { b } from \"b\"; export const g = b;"],"root":[[3,5]],"options":{"declaration":true,"emitDeclarationOnly":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3,4,5],"version":"FakeTSVersion"} //// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] { @@ -247,15 +259,30 @@ declare module "d" { "module": 2, "outFile": "./outFile.js" }, - "changeFileSet": [ - "../../lib/lib.d.ts", - "../project1/outfile.d.ts", - "./src/e.ts", - "./src/f.ts", - "./src/g.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../lib/lib.d.ts", + "not cached" + ], + [ + "../project1/outfile.d.ts", + "not cached" + ], + [ + "./src/e.ts", + "not cached" + ], + [ + "./src/f.ts", + "not cached" + ], + [ + "./src/g.ts", + "not cached" + ] ], "version": "FakeTSVersion", - "size": 1103 + "size": 1116 } @@ -272,7 +299,7 @@ Output:: [HH:MM:SS AM] Project 'src/project1/src/tsconfig.json' is up to date because newest input 'src/project1/src/d.ts' is older than output 'src/project1/outFile.tsbuildinfo' -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -335,7 +362,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -471,7 +498,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -615,8 +642,29 @@ define("d", ["require", "exports", "b"], function (require, exports, b_1) { "size": 920 } +//// [/src/project2/outFile.js] +define("e", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.e = void 0; + exports.e = 10; +}); +define("f", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.f = void 0; + exports.f = a_1.a; +}); +define("g", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.g = void 0; + exports.g = b_1.b; +}); + + //// [/src/project2/outFile.tsbuildinfo] -{"fileNames":["../../lib/lib.d.ts","../project1/outfile.d.ts","./src/e.ts","./src/f.ts","./src/g.ts"],"fileInfos":["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; };","-25657667359-declare module \"a\" {\n export const a = 10;\n}\ndeclare module \"b\" {\n export const b = 10;\n}\ndeclare module \"c\" {\n export const c = 10;\n}\ndeclare module \"d\" {\n export const d = 10;\n}\n","-13789510868-export const e = 10;","-4849089835-import { a } from \"a\"; export const f = a;","-18341999015-import { b } from \"b\"; export const g = b;"],"root":[[3,5]],"options":{"declaration":true,"emitDeclarationOnly":false,"module":2,"outFile":"./outFile.js"},"changeFileSet":[1,2,3,4,5],"version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.d.ts","../project1/outfile.d.ts","./src/e.ts","./src/f.ts","./src/g.ts"],"fileInfos":["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; };","-25657667359-declare module \"a\" {\n export const a = 10;\n}\ndeclare module \"b\" {\n export const b = 10;\n}\ndeclare module \"c\" {\n export const c = 10;\n}\ndeclare module \"d\" {\n export const d = 10;\n}\n","-13789510868-export const e = 10;","-4849089835-import { a } from \"a\"; export const f = a;","-18341999015-import { b } from \"b\"; export const g = b;"],"root":[[3,5]],"options":{"declaration":true,"emitDeclarationOnly":false,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3,4,5],"version":"FakeTSVersion"} //// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] { @@ -653,15 +701,30 @@ define("d", ["require", "exports", "b"], function (require, exports, b_1) { "module": 2, "outFile": "./outFile.js" }, - "changeFileSet": [ - "../../lib/lib.d.ts", - "../project1/outfile.d.ts", - "./src/e.ts", - "./src/f.ts", - "./src/g.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../lib/lib.d.ts", + "not cached" + ], + [ + "../project1/outfile.d.ts", + "not cached" + ], + [ + "./src/e.ts", + "not cached" + ], + [ + "./src/f.ts", + "not cached" + ], + [ + "./src/g.ts", + "not cached" + ] ], "version": "FakeTSVersion", - "size": 1104 + "size": 1117 } @@ -678,7 +741,7 @@ Output:: [HH:MM:SS AM] Project 'src/project1/src/tsconfig.json' is up to date because newest input 'src/project1/src/a.ts' is older than output 'src/project1/outFile.tsbuildinfo' -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -736,7 +799,7 @@ Output:: [HH:MM:SS AM] Project 'src/project1/src/tsconfig.json' is up to date because newest input 'src/project1/src/a.ts' is older than output 'src/project1/outFile.tsbuildinfo' -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -799,7 +862,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... diff --git a/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-false-on-commandline-with-declaration.js b/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-false-on-commandline-with-declaration.js index 1ba36c2264662..cc7d9d678f04e 100644 --- a/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-false-on-commandline-with-declaration.js +++ b/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-false-on-commandline-with-declaration.js @@ -163,21 +163,45 @@ declare module "d" { //// [/src/project1/outFile.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./src/a.ts","./src/b.ts","./src/c.ts","./src/d.ts"],"version":"FakeTSVersion"} //// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 88 } +//// [/src/project2/outFile.d.ts] +declare module "e" { + export const e = 10; +} +declare module "f" { + export const f = 10; +} +declare module "g" { + export const g = 10; +} + + //// [/src/project2/outFile.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./src/e.ts","./src/f.ts","./src/g.ts"],"errors":true,"version":"FakeTSVersion"} //// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./src/e.ts", + "./src/f.ts", + "./src/g.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 89 } @@ -194,7 +218,7 @@ Output:: [HH:MM:SS AM] Project 'src/project1/src/tsconfig.json' is up to date because newest input 'src/project1/src/d.ts' is older than output 'src/project1/outFile.d.ts' -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.d.ts' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -237,6 +261,7 @@ No cached semantic diagnostics in the builder:: No shapes updated in the builder:: +//// [/src/project2/outFile.d.ts] file written with same contents //// [/src/project2/outFile.tsbuildinfo] file written with same contents //// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -258,7 +283,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.d.ts' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -335,6 +360,7 @@ No shapes updated in the builder:: //// [/src/project1/outFile.d.ts] file written with same contents //// [/src/project1/outFile.tsbuildinfo] file written with same contents //// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/project2/outFile.d.ts] file written with same contents //// [/src/project2/outFile.tsbuildinfo] file written with same contents //// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -353,7 +379,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.js' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -460,6 +486,28 @@ define("d", ["require", "exports", "b"], function (require, exports, b_1) { //// [/src/project1/outFile.tsbuildinfo] file written with same contents //// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/project2/outFile.d.ts] file written with same contents +//// [/src/project2/outFile.js] +define("e", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.e = void 0; + exports.e = 10; +}); +define("f", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.f = void 0; + exports.f = a_1.a; +}); +define("g", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.g = void 0; + exports.g = b_1.b; +}); + + //// [/src/project2/outFile.tsbuildinfo] file written with same contents //// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -476,7 +524,7 @@ Output:: [HH:MM:SS AM] Project 'src/project1/src/tsconfig.json' is up to date because newest input 'src/project1/src/a.ts' is older than output 'src/project1/outFile.d.ts' -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.d.ts' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -519,6 +567,7 @@ No cached semantic diagnostics in the builder:: No shapes updated in the builder:: +//// [/src/project2/outFile.d.ts] file written with same contents //// [/src/project2/outFile.tsbuildinfo] file written with same contents //// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -535,7 +584,7 @@ Output:: [HH:MM:SS AM] Project 'src/project1/src/tsconfig.json' is up to date because newest input 'src/project1/src/a.ts' is older than output 'src/project1/outFile.js' -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.js' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -578,6 +627,8 @@ No cached semantic diagnostics in the builder:: No shapes updated in the builder:: +//// [/src/project2/outFile.d.ts] file written with same contents +//// [/src/project2/outFile.js] file written with same contents //// [/src/project2/outFile.tsbuildinfo] file written with same contents //// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -599,7 +650,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.js' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -707,5 +758,7 @@ define("d", ["require", "exports", "b"], function (require, exports, b_1) { //// [/src/project1/outFile.tsbuildinfo] file written with same contents //// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/project2/outFile.d.ts] file written with same contents +//// [/src/project2/outFile.js] file written with same contents //// [/src/project2/outFile.tsbuildinfo] file written with same contents //// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-on-commandline-with-declaration-and-incremental-discrepancies.js b/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-on-commandline-with-declaration-and-incremental-discrepancies.js index 4a36e4694c9ef..96de70c500116 100644 --- a/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-on-commandline-with-declaration-and-incremental-discrepancies.js +++ b/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-on-commandline-with-declaration-and-incremental-discrepancies.js @@ -92,12 +92,27 @@ CleanBuild: "module": 2, "outFile": "./outFile.js" }, - "changeFileSet": [ - "../../lib/lib.d.ts", - "../project1/outfile.d.ts", - "./src/e.ts", - "./src/f.ts", - "./src/g.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../lib/lib.d.ts", + "not cached" + ], + [ + "../project1/outfile.d.ts", + "not cached" + ], + [ + "./src/e.ts", + "not cached" + ], + [ + "./src/f.ts", + "not cached" + ], + [ + "./src/g.ts", + "not cached" + ] ], "version": "FakeTSVersion" } @@ -128,12 +143,27 @@ IncrementalBuild: "module": 2, "outFile": "./outFile.js" }, - "changeFileSet": [ - "../../lib/lib.d.ts", - "../project1/outfile.d.ts", - "./src/e.ts", - "./src/f.ts", - "./src/g.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../lib/lib.d.ts", + "not cached" + ], + [ + "../project1/outfile.d.ts", + "not cached" + ], + [ + "./src/e.ts", + "not cached" + ], + [ + "./src/f.ts", + "not cached" + ], + [ + "./src/g.ts", + "not cached" + ] ], "version": "FakeTSVersion" } @@ -169,12 +199,27 @@ CleanBuild: "module": 2, "outFile": "./outFile.js" }, - "changeFileSet": [ - "../../lib/lib.d.ts", - "../project1/outfile.d.ts", - "./src/e.ts", - "./src/f.ts", - "./src/g.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../lib/lib.d.ts", + "not cached" + ], + [ + "../project1/outfile.d.ts", + "not cached" + ], + [ + "./src/e.ts", + "not cached" + ], + [ + "./src/f.ts", + "not cached" + ], + [ + "./src/g.ts", + "not cached" + ] ], "version": "FakeTSVersion" } @@ -205,12 +250,27 @@ IncrementalBuild: "module": 2, "outFile": "./outFile.js" }, - "changeFileSet": [ - "../../lib/lib.d.ts", - "../project1/outfile.d.ts", - "./src/e.ts", - "./src/f.ts", - "./src/g.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../lib/lib.d.ts", + "not cached" + ], + [ + "../project1/outfile.d.ts", + "not cached" + ], + [ + "./src/e.ts", + "not cached" + ], + [ + "./src/f.ts", + "not cached" + ], + [ + "./src/g.ts", + "not cached" + ] ], "version": "FakeTSVersion" } \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-on-commandline-with-declaration-and-incremental.js b/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-on-commandline-with-declaration-and-incremental.js index 43ebdecef4f6f..2a57d8b3ae4d3 100644 --- a/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-on-commandline-with-declaration-and-incremental.js +++ b/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-on-commandline-with-declaration-and-incremental.js @@ -207,8 +207,20 @@ declare module "d" { "size": 905 } +//// [/src/project2/outFile.d.ts] +declare module "e" { + export const e = 10; +} +declare module "f" { + export const f = 10; +} +declare module "g" { + export const g = 10; +} + + //// [/src/project2/outFile.tsbuildinfo] -{"fileNames":["../../lib/lib.d.ts","../project1/outfile.d.ts","./src/e.ts","./src/f.ts","./src/g.ts"],"fileInfos":["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; };","-25657667359-declare module \"a\" {\n export const a = 10;\n}\ndeclare module \"b\" {\n export const b = 10;\n}\ndeclare module \"c\" {\n export const c = 10;\n}\ndeclare module \"d\" {\n export const d = 10;\n}\n","-13789510868-export const e = 10;","-4849089835-import { a } from \"a\"; export const f = a;","-18341999015-import { b } from \"b\"; export const g = b;"],"root":[[3,5]],"options":{"declaration":true,"emitDeclarationOnly":true,"module":2,"outFile":"./outFile.js"},"changeFileSet":[1,2,3,4,5],"version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.d.ts","../project1/outfile.d.ts","./src/e.ts","./src/f.ts","./src/g.ts"],"fileInfos":["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; };","-25657667359-declare module \"a\" {\n export const a = 10;\n}\ndeclare module \"b\" {\n export const b = 10;\n}\ndeclare module \"c\" {\n export const c = 10;\n}\ndeclare module \"d\" {\n export const d = 10;\n}\n","-13789510868-export const e = 10;","-4849089835-import { a } from \"a\"; export const f = a;","-18341999015-import { b } from \"b\"; export const g = b;"],"root":[[3,5]],"options":{"declaration":true,"emitDeclarationOnly":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3,4,5],"version":"FakeTSVersion"} //// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] { @@ -245,15 +257,30 @@ declare module "d" { "module": 2, "outFile": "./outFile.js" }, - "changeFileSet": [ - "../../lib/lib.d.ts", - "../project1/outfile.d.ts", - "./src/e.ts", - "./src/f.ts", - "./src/g.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../lib/lib.d.ts", + "not cached" + ], + [ + "../project1/outfile.d.ts", + "not cached" + ], + [ + "./src/e.ts", + "not cached" + ], + [ + "./src/f.ts", + "not cached" + ], + [ + "./src/g.ts", + "not cached" + ] ], "version": "FakeTSVersion", - "size": 1103 + "size": 1116 } @@ -270,7 +297,7 @@ Output:: [HH:MM:SS AM] Project 'src/project1/src/tsconfig.json' is up to date because newest input 'src/project1/src/d.ts' is older than output 'src/project1/outFile.tsbuildinfo' -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -333,7 +360,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -472,7 +499,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -607,8 +634,9 @@ declare module "d" { "size": 940 } +//// [/src/project2/outFile.d.ts] file written with same contents //// [/src/project2/outFile.tsbuildinfo] -{"fileNames":["../../lib/lib.d.ts","../project1/outfile.d.ts","./src/e.ts","./src/f.ts","./src/g.ts"],"fileInfos":["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; };","106974224-declare module \"a\" {\n export const a = 10;\n export const aaa = 10;\n}\ndeclare module \"b\" {\n export const b = 10;\n}\ndeclare module \"c\" {\n export const c = 10;\n}\ndeclare module \"d\" {\n export const d = 10;\n}\n","-13789510868-export const e = 10;","-4849089835-import { a } from \"a\"; export const f = a;","-18341999015-import { b } from \"b\"; export const g = b;"],"root":[[3,5]],"options":{"declaration":true,"emitDeclarationOnly":true,"module":2,"outFile":"./outFile.js"},"changeFileSet":[1,2,3,4,5],"version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.d.ts","../project1/outfile.d.ts","./src/e.ts","./src/f.ts","./src/g.ts"],"fileInfos":["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; };","106974224-declare module \"a\" {\n export const a = 10;\n export const aaa = 10;\n}\ndeclare module \"b\" {\n export const b = 10;\n}\ndeclare module \"c\" {\n export const c = 10;\n}\ndeclare module \"d\" {\n export const d = 10;\n}\n","-13789510868-export const e = 10;","-4849089835-import { a } from \"a\"; export const f = a;","-18341999015-import { b } from \"b\"; export const g = b;"],"root":[[3,5]],"options":{"declaration":true,"emitDeclarationOnly":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3,4,5],"version":"FakeTSVersion"} //// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] { @@ -645,15 +673,30 @@ declare module "d" { "module": 2, "outFile": "./outFile.js" }, - "changeFileSet": [ - "../../lib/lib.d.ts", - "../project1/outfile.d.ts", - "./src/e.ts", - "./src/f.ts", - "./src/g.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../lib/lib.d.ts", + "not cached" + ], + [ + "../project1/outfile.d.ts", + "not cached" + ], + [ + "./src/e.ts", + "not cached" + ], + [ + "./src/f.ts", + "not cached" + ], + [ + "./src/g.ts", + "not cached" + ] ], "version": "FakeTSVersion", - "size": 1128 + "size": 1141 } @@ -672,7 +715,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -814,8 +857,29 @@ define("d", ["require", "exports", "b"], function (require, exports, b_1) { "size": 913 } +//// [/src/project2/outFile.js] +define("e", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.e = void 0; + exports.e = 10; +}); +define("f", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.f = void 0; + exports.f = a_1.a; +}); +define("g", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.g = void 0; + exports.g = b_1.b; +}); + + //// [/src/project2/outFile.tsbuildinfo] -{"fileNames":["../../lib/lib.d.ts","../project1/outfile.d.ts","./src/e.ts","./src/f.ts","./src/g.ts"],"fileInfos":["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; };","106974224-declare module \"a\" {\n export const a = 10;\n export const aaa = 10;\n}\ndeclare module \"b\" {\n export const b = 10;\n}\ndeclare module \"c\" {\n export const c = 10;\n}\ndeclare module \"d\" {\n export const d = 10;\n}\n","-13789510868-export const e = 10;","-4849089835-import { a } from \"a\"; export const f = a;","-18341999015-import { b } from \"b\"; export const g = b;"],"root":[[3,5]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"changeFileSet":[1,2,3,4,5],"version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.d.ts","../project1/outfile.d.ts","./src/e.ts","./src/f.ts","./src/g.ts"],"fileInfos":["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; };","106974224-declare module \"a\" {\n export const a = 10;\n export const aaa = 10;\n}\ndeclare module \"b\" {\n export const b = 10;\n}\ndeclare module \"c\" {\n export const c = 10;\n}\ndeclare module \"d\" {\n export const d = 10;\n}\n","-13789510868-export const e = 10;","-4849089835-import { a } from \"a\"; export const f = a;","-18341999015-import { b } from \"b\"; export const g = b;"],"root":[[3,5]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3,4,5],"version":"FakeTSVersion"} //// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] { @@ -851,15 +915,30 @@ define("d", ["require", "exports", "b"], function (require, exports, b_1) { "module": 2, "outFile": "./outFile.js" }, - "changeFileSet": [ - "../../lib/lib.d.ts", - "../project1/outfile.d.ts", - "./src/e.ts", - "./src/f.ts", - "./src/g.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../lib/lib.d.ts", + "not cached" + ], + [ + "../project1/outfile.d.ts", + "not cached" + ], + [ + "./src/e.ts", + "not cached" + ], + [ + "./src/f.ts", + "not cached" + ], + [ + "./src/g.ts", + "not cached" + ] ], "version": "FakeTSVersion", - "size": 1101 + "size": 1114 } @@ -876,7 +955,7 @@ Output:: [HH:MM:SS AM] Project 'src/project1/src/tsconfig.json' is up to date because newest input 'src/project1/src/a.ts' is older than output 'src/project1/outFile.tsbuildinfo' -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -939,7 +1018,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -1107,7 +1186,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -1246,7 +1325,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -1382,8 +1461,9 @@ declare module "d" { "size": 998 } +//// [/src/project2/outFile.d.ts] file written with same contents //// [/src/project2/outFile.tsbuildinfo] -{"fileNames":["../../lib/lib.d.ts","../project1/outfile.d.ts","./src/e.ts","./src/f.ts","./src/g.ts"],"fileInfos":["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; };","-3908737535-declare module \"a\" {\n export const a = 10;\n export const aaa = 10;\n}\ndeclare module \"b\" {\n export const b = 10;\n export const aaaaa = 10;\n}\ndeclare module \"c\" {\n export const c = 10;\n}\ndeclare module \"d\" {\n export const d = 10;\n}\n","-13789510868-export const e = 10;","-4849089835-import { a } from \"a\"; export const f = a;","-18341999015-import { b } from \"b\"; export const g = b;"],"root":[[3,5]],"options":{"declaration":true,"emitDeclarationOnly":true,"module":2,"outFile":"./outFile.js"},"changeFileSet":[1,2,3,4,5],"version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.d.ts","../project1/outfile.d.ts","./src/e.ts","./src/f.ts","./src/g.ts"],"fileInfos":["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; };","-3908737535-declare module \"a\" {\n export const a = 10;\n export const aaa = 10;\n}\ndeclare module \"b\" {\n export const b = 10;\n export const aaaaa = 10;\n}\ndeclare module \"c\" {\n export const c = 10;\n}\ndeclare module \"d\" {\n export const d = 10;\n}\n","-13789510868-export const e = 10;","-4849089835-import { a } from \"a\"; export const f = a;","-18341999015-import { b } from \"b\"; export const g = b;"],"root":[[3,5]],"options":{"declaration":true,"emitDeclarationOnly":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3,4,5],"version":"FakeTSVersion"} //// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] { @@ -1420,15 +1500,30 @@ declare module "d" { "module": 2, "outFile": "./outFile.js" }, - "changeFileSet": [ - "../../lib/lib.d.ts", - "../project1/outfile.d.ts", - "./src/e.ts", - "./src/f.ts", - "./src/g.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../lib/lib.d.ts", + "not cached" + ], + [ + "../project1/outfile.d.ts", + "not cached" + ], + [ + "./src/e.ts", + "not cached" + ], + [ + "./src/f.ts", + "not cached" + ], + [ + "./src/g.ts", + "not cached" + ] ], "version": "FakeTSVersion", - "size": 1160 + "size": 1173 } @@ -1450,7 +1545,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -1619,8 +1714,10 @@ define("d", ["require", "exports", "b"], function (require, exports, b_1) { "size": 993 } +//// [/src/project2/outFile.d.ts] file written with same contents +//// [/src/project2/outFile.js] file written with same contents //// [/src/project2/outFile.tsbuildinfo] -{"fileNames":["../../lib/lib.d.ts","../project1/outfile.d.ts","./src/e.ts","./src/f.ts","./src/g.ts"],"fileInfos":["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; };","1646858368-declare module \"a\" {\n export const a = 10;\n export const aaa = 10;\n}\ndeclare module \"b\" {\n export const b = 10;\n export const aaaaa = 10;\n export const a2 = 10;\n}\ndeclare module \"c\" {\n export const c = 10;\n}\ndeclare module \"d\" {\n export const d = 10;\n}\n","-13789510868-export const e = 10;","-4849089835-import { a } from \"a\"; export const f = a;","-18341999015-import { b } from \"b\"; export const g = b;"],"root":[[3,5]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"changeFileSet":[1,2,3,4,5],"version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.d.ts","../project1/outfile.d.ts","./src/e.ts","./src/f.ts","./src/g.ts"],"fileInfos":["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; };","1646858368-declare module \"a\" {\n export const a = 10;\n export const aaa = 10;\n}\ndeclare module \"b\" {\n export const b = 10;\n export const aaaaa = 10;\n export const a2 = 10;\n}\ndeclare module \"c\" {\n export const c = 10;\n}\ndeclare module \"d\" {\n export const d = 10;\n}\n","-13789510868-export const e = 10;","-4849089835-import { a } from \"a\"; export const f = a;","-18341999015-import { b } from \"b\"; export const g = b;"],"root":[[3,5]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3,4,5],"version":"FakeTSVersion"} //// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] { @@ -1656,14 +1753,29 @@ define("d", ["require", "exports", "b"], function (require, exports, b_1) { "module": 2, "outFile": "./outFile.js" }, - "changeFileSet": [ - "../../lib/lib.d.ts", - "../project1/outfile.d.ts", - "./src/e.ts", - "./src/f.ts", - "./src/g.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../lib/lib.d.ts", + "not cached" + ], + [ + "../project1/outfile.d.ts", + "not cached" + ], + [ + "./src/e.ts", + "not cached" + ], + [ + "./src/f.ts", + "not cached" + ], + [ + "./src/g.ts", + "not cached" + ] ], "version": "FakeTSVersion", - "size": 1159 + "size": 1172 } diff --git a/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-on-commandline-with-declaration.js b/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-on-commandline-with-declaration.js index 6b7495512cc16..0cbbbf464f343 100644 --- a/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-on-commandline-with-declaration.js +++ b/tests/baselines/reference/tsbuild/commandLine/outFile/emitDeclarationOnly-on-commandline-with-declaration.js @@ -161,21 +161,45 @@ declare module "d" { //// [/src/project1/outFile.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./src/a.ts","./src/b.ts","./src/c.ts","./src/d.ts"],"version":"FakeTSVersion"} //// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 88 } +//// [/src/project2/outFile.d.ts] +declare module "e" { + export const e = 10; +} +declare module "f" { + export const f = 10; +} +declare module "g" { + export const g = 10; +} + + //// [/src/project2/outFile.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./src/e.ts","./src/f.ts","./src/g.ts"],"errors":true,"version":"FakeTSVersion"} //// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./src/e.ts", + "./src/f.ts", + "./src/g.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 89 } @@ -192,7 +216,7 @@ Output:: [HH:MM:SS AM] Project 'src/project1/src/tsconfig.json' is up to date because newest input 'src/project1/src/d.ts' is older than output 'src/project1/outFile.d.ts' -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.d.ts' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -235,6 +259,7 @@ No cached semantic diagnostics in the builder:: No shapes updated in the builder:: +//// [/src/project2/outFile.d.ts] file written with same contents //// [/src/project2/outFile.tsbuildinfo] file written with same contents //// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -256,7 +281,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.d.ts' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -333,6 +358,7 @@ No shapes updated in the builder:: //// [/src/project1/outFile.d.ts] file written with same contents //// [/src/project1/outFile.tsbuildinfo] file written with same contents //// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/project2/outFile.d.ts] file written with same contents //// [/src/project2/outFile.tsbuildinfo] file written with same contents //// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -354,7 +380,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.d.ts' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -446,6 +472,7 @@ declare module "d" { //// [/src/project1/outFile.tsbuildinfo] file written with same contents //// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/project2/outFile.d.ts] file written with same contents //// [/src/project2/outFile.tsbuildinfo] file written with same contents //// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -464,7 +491,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.js' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -570,6 +597,28 @@ define("d", ["require", "exports", "b"], function (require, exports, b_1) { //// [/src/project1/outFile.tsbuildinfo] file written with same contents //// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/project2/outFile.d.ts] file written with same contents +//// [/src/project2/outFile.js] +define("e", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.e = void 0; + exports.e = 10; +}); +define("f", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.f = void 0; + exports.f = a_1.a; +}); +define("g", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.g = void 0; + exports.g = b_1.b; +}); + + //// [/src/project2/outFile.tsbuildinfo] file written with same contents //// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -586,7 +635,7 @@ Output:: [HH:MM:SS AM] Project 'src/project1/src/tsconfig.json' is up to date because newest input 'src/project1/src/a.ts' is older than output 'src/project1/outFile.d.ts' -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.d.ts' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -629,6 +678,7 @@ No cached semantic diagnostics in the builder:: No shapes updated in the builder:: +//// [/src/project2/outFile.d.ts] file written with same contents //// [/src/project2/outFile.tsbuildinfo] file written with same contents //// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -650,7 +700,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.js' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -757,6 +807,8 @@ define("d", ["require", "exports", "b"], function (require, exports, b_1) { //// [/src/project1/outFile.tsbuildinfo] file written with same contents //// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/project2/outFile.d.ts] file written with same contents +//// [/src/project2/outFile.js] file written with same contents //// [/src/project2/outFile.tsbuildinfo] file written with same contents //// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -778,7 +830,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.d.ts' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -855,6 +907,7 @@ No shapes updated in the builder:: //// [/src/project1/outFile.d.ts] file written with same contents //// [/src/project1/outFile.tsbuildinfo] file written with same contents //// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/project2/outFile.d.ts] file written with same contents //// [/src/project2/outFile.tsbuildinfo] file written with same contents //// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -876,7 +929,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.d.ts' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -969,6 +1022,7 @@ declare module "d" { //// [/src/project1/outFile.tsbuildinfo] file written with same contents //// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/project2/outFile.d.ts] file written with same contents //// [/src/project2/outFile.tsbuildinfo] file written with same contents //// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -990,7 +1044,7 @@ Output:: [HH:MM:SS AM] Building project '/src/project1/src/tsconfig.json'... -[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.js' does not exist +[HH:MM:SS AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project2/src/tsconfig.json'... @@ -1117,5 +1171,7 @@ define("d", ["require", "exports", "b"], function (require, exports, b_1) { //// [/src/project1/outFile.tsbuildinfo] file written with same contents //// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/project2/outFile.d.ts] file written with same contents +//// [/src/project2/outFile.js] file written with same contents //// [/src/project2/outFile.tsbuildinfo] file written with same contents //// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/configFileErrors/multiFile/reports-syntax-errors-in-config-file-discrepancies.js b/tests/baselines/reference/tsbuild/configFileErrors/multiFile/reports-syntax-errors-in-config-file-discrepancies.js index b7ecb8b1344c9..06930b39e3c27 100644 --- a/tests/baselines/reference/tsbuild/configFileErrors/multiFile/reports-syntax-errors-in-config-file-discrepancies.js +++ b/tests/baselines/reference/tsbuild/configFileErrors/multiFile/reports-syntax-errors-in-config-file-discrepancies.js @@ -30,11 +30,8 @@ CleanBuild: "composite": true, "declaration": true }, - "changeFileSet": [ - "../lib/lib.d.ts", - "./a.ts", - "./b.ts" - ], + "latestChangedDtsFile": "FakeFileName", + "errors": true, "version": "FakeTSVersion" } IncrementalBuild: @@ -64,10 +61,7 @@ IncrementalBuild: "options": { "composite": true }, - "changeFileSet": [ - "../lib/lib.d.ts", - "./a.ts", - "./b.ts" - ], + "latestChangedDtsFile": "FakeFileName", + "errors": true, "version": "FakeTSVersion" } \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/configFileErrors/multiFile/reports-syntax-errors-in-config-file.js b/tests/baselines/reference/tsbuild/configFileErrors/multiFile/reports-syntax-errors-in-config-file.js index f07a31d6996a2..d826a93fd4265 100644 --- a/tests/baselines/reference/tsbuild/configFileErrors/multiFile/reports-syntax-errors-in-config-file.js +++ b/tests/baselines/reference/tsbuild/configFileErrors/multiFile/reports-syntax-errors-in-config-file.js @@ -47,8 +47,30 @@ Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +//// [/src/a.d.ts] +export declare function foo(): void; + + +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.foo = foo; +function foo() { } + + +//// [/src/b.d.ts] +export declare function bar(): void; + + +//// [/src/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.bar = bar; +function bar() { } + + //// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"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":false,"affectsGlobalScope":true},{"version":"4646078106-export function foo() { }","signature":false},{"version":"1045484683-export function bar() { }","signature":false}],"root":[2,3],"options":{"composite":true},"changeFileSet":[1,2,3],"version":"FakeTSVersion"} +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"4646078106-export function foo() { }","signature":"-5677608893-export declare function foo(): void;\n"},{"version":"1045484683-export function bar() { }","signature":"-2904461644-export declare function bar(): void;\n"}],"root":[2,3],"options":{"composite":true},"latestChangedDtsFile":"./b.d.ts","errors":true,"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -61,25 +83,27 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped "../lib/lib.d.ts": { "original": { "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": false, "affectsGlobalScope": true }, "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; };", "affectsGlobalScope": true }, "./a.ts": { "original": { "version": "4646078106-export function foo() { }", - "signature": false + "signature": "-5677608893-export declare function foo(): void;\n" }, - "version": "4646078106-export function foo() { }" + "version": "4646078106-export function foo() { }", + "signature": "-5677608893-export declare function foo(): void;\n" }, "./b.ts": { "original": { "version": "1045484683-export function bar() { }", - "signature": false + "signature": "-2904461644-export declare function bar(): void;\n" }, - "version": "1045484683-export function bar() { }" + "version": "1045484683-export function bar() { }", + "signature": "-2904461644-export declare function bar(): void;\n" } }, "root": [ @@ -95,13 +119,10 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped "options": { "composite": true }, - "changeFileSet": [ - "../lib/lib.d.ts", - "./a.ts", - "./b.ts" - ], + "latestChangedDtsFile": "./b.d.ts", + "errors": true, "version": "FakeTSVersion", - "size": 792 + "size": 892 } @@ -157,8 +178,22 @@ Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +//// [/src/a.d.ts] +export declare function foo(): void; +export declare function fooBar(): void; + + +//// [/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.foo = foo; +exports.fooBar = fooBar; +function foo() { } +function fooBar() { } + + //// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"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":false,"affectsGlobalScope":true},{"version":"9819159940-export function foo() { }export function fooBar() { }","signature":false},{"version":"1045484683-export function bar() { }","signature":false}],"root":[2,3],"options":{"composite":true,"declaration":true},"changeFileSet":[1,2,3],"version":"FakeTSVersion"} +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"9819159940-export function foo() { }export function fooBar() { }","signature":"-9218003498-export declare function foo(): void;\nexport declare function fooBar(): void;\n"},{"version":"1045484683-export function bar() { }","signature":"-2904461644-export declare function bar(): void;\n"}],"root":[2,3],"options":{"composite":true,"declaration":true},"latestChangedDtsFile":"./a.d.ts","errors":true,"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -171,25 +206,27 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped "../lib/lib.d.ts": { "original": { "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": false, "affectsGlobalScope": true }, "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; };", "affectsGlobalScope": true }, "./a.ts": { "original": { "version": "9819159940-export function foo() { }export function fooBar() { }", - "signature": false + "signature": "-9218003498-export declare function foo(): void;\nexport declare function fooBar(): void;\n" }, - "version": "9819159940-export function foo() { }export function fooBar() { }" + "version": "9819159940-export function foo() { }export function fooBar() { }", + "signature": "-9218003498-export declare function foo(): void;\nexport declare function fooBar(): void;\n" }, "./b.ts": { "original": { "version": "1045484683-export function bar() { }", - "signature": false + "signature": "-2904461644-export declare function bar(): void;\n" }, - "version": "1045484683-export function bar() { }" + "version": "1045484683-export function bar() { }", + "signature": "-2904461644-export declare function bar(): void;\n" } }, "root": [ @@ -206,13 +243,10 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped "composite": true, "declaration": true }, - "changeFileSet": [ - "../lib/lib.d.ts", - "./a.ts", - "./b.ts" - ], + "latestChangedDtsFile": "./a.d.ts", + "errors": true, "version": "FakeTSVersion", - "size": 839 + "size": 980 } @@ -257,33 +291,8 @@ Output:: exitCode:: ExitStatus.Success -//// [/src/a.d.ts] -export declare function foo(): void; -export declare function fooBar(): void; - - -//// [/src/a.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.foo = foo; -exports.fooBar = fooBar; -function foo() { } -function fooBar() { } - - -//// [/src/b.d.ts] -export declare function bar(): void; - - -//// [/src/b.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.bar = bar; -function bar() { } - - //// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"9819159940-export function foo() { }export function fooBar() { }","signature":"-9218003498-export declare function foo(): void;\nexport declare function fooBar(): void;\n"},{"version":"1045484683-export function bar() { }","signature":"-2904461644-export declare function bar(): void;\n"}],"root":[2,3],"options":{"composite":true,"declaration":true},"latestChangedDtsFile":"./b.d.ts","version":"FakeTSVersion"} +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"9819159940-export function foo() { }export function fooBar() { }","signature":"-9218003498-export declare function foo(): void;\nexport declare function fooBar(): void;\n"},{"version":"1045484683-export function bar() { }","signature":"-2904461644-export declare function bar(): void;\n"}],"root":[2,3],"options":{"composite":true,"declaration":true},"latestChangedDtsFile":"./a.d.ts","version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -333,7 +342,7 @@ function bar() { } "composite": true, "declaration": true }, - "latestChangedDtsFile": "./b.d.ts", + "latestChangedDtsFile": "./a.d.ts", "version": "FakeTSVersion", "size": 966 } diff --git a/tests/baselines/reference/tsbuild/configFileErrors/outFile/reports-syntax-errors-in-config-file-discrepancies.js b/tests/baselines/reference/tsbuild/configFileErrors/outFile/reports-syntax-errors-in-config-file-discrepancies.js index ffd28d8a1780d..3e631a7b9c10a 100644 --- a/tests/baselines/reference/tsbuild/configFileErrors/outFile/reports-syntax-errors-in-config-file-discrepancies.js +++ b/tests/baselines/reference/tsbuild/configFileErrors/outFile/reports-syntax-errors-in-config-file-discrepancies.js @@ -25,11 +25,9 @@ CleanBuild: "module": 2, "outFile": "./outFile.js" }, - "changeFileSet": [ - "./lib/lib.d.ts", - "./src/a.ts", - "./src/b.ts" - ], + "outSignature": "-5340070911-declare module \"a\" {\n export function foo(): void;\n}\ndeclare module \"b\" {\n export function bar(): void;\n}\n", + "latestChangedDtsFile": "FakeFileName", + "errors": true, "version": "FakeTSVersion" } IncrementalBuild: @@ -54,10 +52,8 @@ IncrementalBuild: "module": 2, "outFile": "./outFile.js" }, - "changeFileSet": [ - "./lib/lib.d.ts", - "./src/a.ts", - "./src/b.ts" - ], + "outSignature": "-5340070911-declare module \"a\" {\n export function foo(): void;\n}\ndeclare module \"b\" {\n export function bar(): void;\n}\n", + "latestChangedDtsFile": "FakeFileName", + "errors": true, "version": "FakeTSVersion" } \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/configFileErrors/outFile/reports-syntax-errors-in-config-file.js b/tests/baselines/reference/tsbuild/configFileErrors/outFile/reports-syntax-errors-in-config-file.js index 37b70c9d0cdb4..f52bebf42d4ef 100644 --- a/tests/baselines/reference/tsbuild/configFileErrors/outFile/reports-syntax-errors-in-config-file.js +++ b/tests/baselines/reference/tsbuild/configFileErrors/outFile/reports-syntax-errors-in-config-file.js @@ -50,8 +50,32 @@ Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +//// [/outFile.d.ts] +declare module "a" { + export function foo(): void; +} +declare module "b" { + export function bar(): void; +} + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.foo = foo; + function foo() { } +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.bar = bar; + function bar() { } +}); + + //// [/outFile.tsbuildinfo] -{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["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; };","4646078106-export function foo() { }","1045484683-export function bar() { }"],"root":[2,3],"options":{"composite":true,"module":2,"outFile":"./outFile.js"},"changeFileSet":[1,2,3],"version":"FakeTSVersion"} +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["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; };","4646078106-export function foo() { }","1045484683-export function bar() { }"],"root":[2,3],"options":{"composite":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-5340070911-declare module \"a\" {\n export function foo(): void;\n}\ndeclare module \"b\" {\n export function bar(): void;\n}\n","latestChangedDtsFile":"./outFile.d.ts","errors":true,"version":"FakeTSVersion"} //// [/outFile.tsbuildinfo.readable.baseline.txt] { @@ -80,13 +104,11 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped "module": 2, "outFile": "./outFile.js" }, - "changeFileSet": [ - "./lib/lib.d.ts", - "./src/a.ts", - "./src/b.ts" - ], + "outSignature": "-5340070911-declare module \"a\" {\n export function foo(): void;\n}\ndeclare module \"b\" {\n export function bar(): void;\n}\n", + "latestChangedDtsFile": "./outFile.d.ts", + "errors": true, "version": "FakeTSVersion", - "size": 719 + "size": 901 } @@ -145,8 +167,35 @@ Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +//// [/outFile.d.ts] +declare module "a" { + export function foo(): void; + export function fooBar(): void; +} +declare module "b" { + export function bar(): void; +} + + +//// [/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.foo = foo; + exports.fooBar = fooBar; + function foo() { } + function fooBar() { } +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.bar = bar; + function bar() { } +}); + + //// [/outFile.tsbuildinfo] -{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["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; };","9819159940-export function foo() { }export function fooBar() { }","1045484683-export function bar() { }"],"root":[2,3],"options":{"composite":true,"declaration":true,"module":2,"outFile":"./outFile.js"},"changeFileSet":[1,2,3],"version":"FakeTSVersion"} +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["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; };","9819159940-export function foo() { }export function fooBar() { }","1045484683-export function bar() { }"],"root":[2,3],"options":{"composite":true,"declaration":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-12543119676-declare module \"a\" {\n export function foo(): void;\n export function fooBar(): void;\n}\ndeclare module \"b\" {\n export function bar(): void;\n}\n","latestChangedDtsFile":"./outFile.d.ts","errors":true,"version":"FakeTSVersion"} //// [/outFile.tsbuildinfo.readable.baseline.txt] { @@ -176,13 +225,11 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped "module": 2, "outFile": "./outFile.js" }, - "changeFileSet": [ - "./lib/lib.d.ts", - "./src/a.ts", - "./src/b.ts" - ], + "outSignature": "-12543119676-declare module \"a\" {\n export function foo(): void;\n export function fooBar(): void;\n}\ndeclare module \"b\" {\n export function bar(): void;\n}\n", + "latestChangedDtsFile": "./outFile.d.ts", + "errors": true, "version": "FakeTSVersion", - "size": 766 + "size": 986 } @@ -229,33 +276,6 @@ Output:: exitCode:: ExitStatus.Success -//// [/outFile.d.ts] -declare module "a" { - export function foo(): void; - export function fooBar(): void; -} -declare module "b" { - export function bar(): void; -} - - -//// [/outFile.js] -define("a", ["require", "exports"], function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.foo = foo; - exports.fooBar = fooBar; - function foo() { } - function fooBar() { } -}); -define("b", ["require", "exports"], function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.bar = bar; - function bar() { } -}); - - //// [/outFile.tsbuildinfo] {"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["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; };","9819159940-export function foo() { }export function fooBar() { }","1045484683-export function bar() { }"],"root":[2,3],"options":{"composite":true,"declaration":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-12543119676-declare module \"a\" {\n export function foo(): void;\n export function fooBar(): void;\n}\ndeclare module \"b\" {\n export function bar(): void;\n}\n","latestChangedDtsFile":"./outFile.d.ts","version":"FakeTSVersion"} diff --git a/tests/baselines/reference/tsbuild/containerOnlyReferenced/when-solution-is-referenced-indirectly.js b/tests/baselines/reference/tsbuild/containerOnlyReferenced/when-solution-is-referenced-indirectly.js index bbf88dc08c6eb..b3cb0d225074a 100644 --- a/tests/baselines/reference/tsbuild/containerOnlyReferenced/when-solution-is-referenced-indirectly.js +++ b/tests/baselines/reference/tsbuild/containerOnlyReferenced/when-solution-is-referenced-indirectly.js @@ -294,12 +294,12 @@ src/project3/src/c.ts [HH:MM:SS AM] Building project '/src/project4/tsconfig.json'... -[HH:MM:SS AM] Updating unchanged output timestamps of project '/src/project4/tsconfig.json'... - lib/lib.d.ts Default library for target 'es5' src/project4/src/d.ts Matched by default include pattern '**/*' +[HH:MM:SS AM] Updating unchanged output timestamps of project '/src/project4/tsconfig.json'... + exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsbuild/declarationEmit/multiFile/reports-dts-generation-errors-with-incremental.js b/tests/baselines/reference/tsbuild/declarationEmit/multiFile/reports-dts-generation-errors-with-incremental.js index 474e072ad12e1..54f2027a60ca7 100644 --- a/tests/baselines/reference/tsbuild/declarationEmit/multiFile/reports-dts-generation-errors-with-incremental.js +++ b/tests/baselines/reference/tsbuild/declarationEmit/multiFile/reports-dts-generation-errors-with-incremental.js @@ -83,6 +83,7 @@ Output:: 2 export const api = ky.extend({});    ~~~ +TSFILE: /src/project/index.js TSFILE: /src/project/tsconfig.tsbuildinfo lib/lib.esnext.full.d.ts Default library for target 'esnext' @@ -98,8 +99,13 @@ Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +//// [/src/project/index.js] +import ky from 'ky'; +export const api = ky.extend({}); + + //// [/src/project/tsconfig.tsbuildinfo] -{"fileNames":["../../lib/lib.esnext.full.d.ts","./node_modules/ky/distribution/index.d.ts","./index.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true,"impliedFormat":1},{"version":"10101889135-type KyInstance = {\n extend(options: Record): KyInstance;\n}\ndeclare const ky: KyInstance;\nexport default ky;\n","impliedFormat":99},{"version":"-383421929-import ky from 'ky';\nexport const api = ky.extend({});\n","impliedFormat":99}],"root":[3],"options":{"declaration":true,"module":199,"skipDefaultLibCheck":true,"skipLibCheck":true},"referencedMap":[[3,1]],"affectedFilesPendingEmit":[3],"version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.esnext.full.d.ts","./node_modules/ky/distribution/index.d.ts","./index.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true,"impliedFormat":1},{"version":"10101889135-type KyInstance = {\n extend(options: Record): KyInstance;\n}\ndeclare const ky: KyInstance;\nexport default ky;\n","impliedFormat":99},{"version":"-383421929-import ky from 'ky';\nexport const api = ky.extend({});\n","impliedFormat":99}],"root":[3],"options":{"declaration":true,"module":199,"skipDefaultLibCheck":true,"skipLibCheck":true},"referencedMap":[[3,1]],"emitDiagnosticsPerFile":[[3,[{"start":34,"length":3,"messageText":"Exported variable 'api' has or is using name 'KyInstance' from external module \"/src/project/node_modules/ky/distribution/index\" but cannot be named.","category":1,"code":4023}]]],"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -161,14 +167,22 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped "./node_modules/ky/distribution/index.d.ts" ] }, - "affectedFilesPendingEmit": [ + "emitDiagnosticsPerFile": [ [ "./index.ts", - "Js | Dts" + [ + { + "start": 34, + "length": 3, + "messageText": "Exported variable 'api' has or is using name 'KyInstance' from external module \"/src/project/node_modules/ky/distribution/index\" but cannot be named.", + "category": 1, + "code": 4023 + } + ] ] ], "version": "FakeTSVersion", - "size": 1100 + "size": 1319 } @@ -182,7 +196,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/project/tsconfig.json -[HH:MM:SS AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/project/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/project/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project/tsconfig.json'... diff --git a/tests/baselines/reference/tsbuild/declarationEmit/multiFile/reports-dts-generation-errors.js b/tests/baselines/reference/tsbuild/declarationEmit/multiFile/reports-dts-generation-errors.js index f150956ecfd95..28abb38d62554 100644 --- a/tests/baselines/reference/tsbuild/declarationEmit/multiFile/reports-dts-generation-errors.js +++ b/tests/baselines/reference/tsbuild/declarationEmit/multiFile/reports-dts-generation-errors.js @@ -82,6 +82,7 @@ Output:: 2 export const api = ky.extend({});    ~~~ +TSFILE: /src/project/index.js TSFILE: /src/project/tsconfig.tsbuildinfo lib/lib.esnext.full.d.ts Default library for target 'esnext' @@ -91,19 +92,30 @@ src/project/node_modules/ky/distribution/index.d.ts src/project/index.ts Matched by default include pattern '**/*' File is ECMAScript module because 'src/project/package.json' has field "type" with value "module" +[HH:MM:SS AM] Updating unchanged output timestamps of project '/src/project/tsconfig.json'... + Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +//// [/src/project/index.js] +import ky from 'ky'; +export const api = ky.extend({}); + + //// [/src/project/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./index.ts"],"errors":true,"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./index.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 63 } @@ -117,7 +129,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/project/tsconfig.json -[HH:MM:SS AM] Project 'src/project/tsconfig.json' is out of date because output file 'src/project/index.js' does not exist +[HH:MM:SS AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/project/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project/tsconfig.json'... @@ -126,6 +138,7 @@ Output:: 2 export const api = ky.extend({});    ~~~ +TSFILE: /src/project/index.js TSFILE: /src/project/tsconfig.tsbuildinfo lib/lib.esnext.full.d.ts Default library for target 'esnext' @@ -135,11 +148,14 @@ src/project/node_modules/ky/distribution/index.d.ts src/project/index.ts Matched by default include pattern '**/*' File is ECMAScript module because 'src/project/package.json' has field "type" with value "module" +[HH:MM:SS AM] Updating unchanged output timestamps of project '/src/project/tsconfig.json'... + Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +//// [/src/project/index.js] file written with same contents //// [/src/project/tsconfig.tsbuildinfo] file written with same contents //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/declarationEmit/outFile/reports-dts-generation-errors-with-incremental.js b/tests/baselines/reference/tsbuild/declarationEmit/outFile/reports-dts-generation-errors-with-incremental.js index 38cb7b9974fb0..ea06ee4e98100 100644 --- a/tests/baselines/reference/tsbuild/declarationEmit/outFile/reports-dts-generation-errors-with-incremental.js +++ b/tests/baselines/reference/tsbuild/declarationEmit/outFile/reports-dts-generation-errors-with-incremental.js @@ -74,6 +74,7 @@ Output:: 2 export const api = ky.extend({});    ~~~ +TSFILE: /src/project/outFile.js TSFILE: /src/project/outFile.tsbuildinfo lib/lib.d.ts Default library for target 'es5' @@ -87,8 +88,17 @@ Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +//// [/src/project/outFile.js] +define("index", ["require", "exports", "ky"], function (require, exports, ky_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.api = void 0; + exports.api = ky_1.default.extend({}); +}); + + //// [/src/project/outFile.tsbuildinfo] -{"fileNames":["../../lib/lib.d.ts","./ky.d.ts","./src/index.ts"],"fileInfos":["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; };","10101889135-type KyInstance = {\n extend(options: Record): KyInstance;\n}\ndeclare const ky: KyInstance;\nexport default ky;\n","-383421929-import ky from 'ky';\nexport const api = ky.extend({});\n"],"root":[3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js","skipDefaultLibCheck":true,"skipLibCheck":true},"pendingEmit":false,"version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.d.ts","./ky.d.ts","./src/index.ts"],"fileInfos":["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; };","10101889135-type KyInstance = {\n extend(options: Record): KyInstance;\n}\ndeclare const ky: KyInstance;\nexport default ky;\n","-383421929-import ky from 'ky';\nexport const api = ky.extend({});\n"],"root":[3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js","skipDefaultLibCheck":true,"skipLibCheck":true},"emitDiagnosticsPerFile":[[3,[{"start":34,"length":3,"messageText":"Exported variable 'api' has or is using name 'KyInstance' from external module \"/src/project/ky\" but cannot be named.","category":1,"code":4023}]]],"version":"FakeTSVersion"} //// [/src/project/outFile.tsbuildinfo.readable.baseline.txt] { @@ -115,12 +125,22 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped "skipDefaultLibCheck": true, "skipLibCheck": true }, - "pendingEmit": [ - "Js | Dts", - false + "emitDiagnosticsPerFile": [ + [ + "./src/index.ts", + [ + { + "start": 34, + "length": 3, + "messageText": "Exported variable 'api' has or is using name 'KyInstance' from external module \"/src/project/ky\" but cannot be named.", + "category": 1, + "code": 4023 + } + ] + ] ], "version": "FakeTSVersion", - "size": 910 + "size": 1108 } @@ -134,7 +154,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/project/tsconfig.json -[HH:MM:SS AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/project/outFile.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/project/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project/tsconfig.json'... diff --git a/tests/baselines/reference/tsbuild/declarationEmit/outFile/reports-dts-generation-errors.js b/tests/baselines/reference/tsbuild/declarationEmit/outFile/reports-dts-generation-errors.js index ffb390c097148..490ffdc5bc1a6 100644 --- a/tests/baselines/reference/tsbuild/declarationEmit/outFile/reports-dts-generation-errors.js +++ b/tests/baselines/reference/tsbuild/declarationEmit/outFile/reports-dts-generation-errors.js @@ -73,6 +73,7 @@ Output:: 2 export const api = ky.extend({});    ~~~ +TSFILE: /src/project/outFile.js TSFILE: /src/project/outFile.tsbuildinfo lib/lib.d.ts Default library for target 'es5' @@ -80,19 +81,34 @@ src/project/ky.d.ts Imported via 'ky' from file 'src/project/src/index.ts' src/project/src/index.ts Matched by include pattern 'src' in 'src/project/tsconfig.json' +[HH:MM:SS AM] Updating unchanged output timestamps of project '/src/project/tsconfig.json'... + Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +//// [/src/project/outFile.js] +define("index", ["require", "exports", "ky"], function (require, exports, ky_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.api = void 0; + exports.api = ky_1.default.extend({}); +}); + + //// [/src/project/outFile.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./src/index.ts"],"errors":true,"version":"FakeTSVersion"} //// [/src/project/outFile.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./src/index.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 67 } @@ -106,7 +122,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/project/tsconfig.json -[HH:MM:SS AM] Project 'src/project/tsconfig.json' is out of date because output file 'src/project/outFile.js' does not exist +[HH:MM:SS AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/project/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project/tsconfig.json'... @@ -115,6 +131,7 @@ Output:: 2 export const api = ky.extend({});    ~~~ +TSFILE: /src/project/outFile.js TSFILE: /src/project/outFile.tsbuildinfo lib/lib.d.ts Default library for target 'es5' @@ -122,11 +139,14 @@ src/project/ky.d.ts Imported via 'ky' from file 'src/project/src/index.ts' src/project/src/index.ts Matched by include pattern 'src' in 'src/project/tsconfig.json' +[HH:MM:SS AM] Updating unchanged output timestamps of project '/src/project/tsconfig.json'... + Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +//// [/src/project/outFile.js] file written with same contents //// [/src/project/outFile.tsbuildinfo] file written with same contents //// [/src/project/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/demo/in-bad-ref-branch-reports-the-error-about-files-not-in-rootDir-at-the-import-location.js b/tests/baselines/reference/tsbuild/demo/in-bad-ref-branch-reports-the-error-about-files-not-in-rootDir-at-the-import-location.js index e7712e8ec0c2d..fd669f18d8422 100644 --- a/tests/baselines/reference/tsbuild/demo/in-bad-ref-branch-reports-the-error-about-files-not-in-rootDir-at-the-import-location.js +++ b/tests/baselines/reference/tsbuild/demo/in-bad-ref-branch-reports-the-error-about-files-not-in-rootDir-at-the-import-location.js @@ -219,8 +219,60 @@ Found 7 errors. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +//// [/user/username/projects/demo/animals/animal.d.ts] +export type Size = "small" | "medium" | "large"; +export default interface Animal { + size: Size; +} + + +//// [/user/username/projects/demo/animals/animal.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/user/username/projects/demo/animals/dog.d.ts] +import Animal from '.'; +export interface Dog extends Animal { + woof(): void; + name: string; +} +export declare function createDog(): Dog; + + +//// [/user/username/projects/demo/animals/dog.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createDog = createDog; +var utilities_1 = require("../core/utilities"); +function createDog() { + return ({ + size: "medium", + woof: function () { + console.log("".concat(this.name, " says \"Woof\"!")); + }, + name: (0, utilities_1.makeRandomName)() + }); +} + + +//// [/user/username/projects/demo/animals/index.d.ts] +import Animal from './animal'; +export default Animal; +import { createDog, Dog } from './dog'; +export { createDog, Dog }; + + +//// [/user/username/projects/demo/animals/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createDog = void 0; +var dog_1 = require("./dog"); +Object.defineProperty(exports, "createDog", { enumerable: true, get: function () { return dog_1.createDog; } }); + + //// [/user/username/projects/demo/lib/core/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../../a/lib/lib.d.ts","../../animals/animal.ts","../../animals/dog.ts","../../animals/index.ts","../../core/utilities.ts"],"fileIdsList":[[4,5],[2,3],[4]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-9289341318-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n","-18870194049-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}\n","-7220553464-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n","-22163106409-import * as A from '../animals';\nexport function makeRandomName() {\n return \"Bob!?! \";\n}\n\nexport function lastElementOf(arr: T[]): T | undefined {\n if (arr.length === 0) return undefined;\n return arr[arr.length - 1];\n}\n"],"root":[5],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../core","strict":true,"target":1},"referencedMap":[[3,1],[4,2],[5,3]],"semanticDiagnosticsPerFile":[[5,[{"start":0,"length":32,"messageText":"'A' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true}]]],"affectedFilesPendingEmit":[2,3,4,5],"emitSignatures":[2,3,4,5],"version":"FakeTSVersion"} +{"fileNames":["../../../../../../a/lib/lib.d.ts","../../animals/animal.ts","../../animals/dog.ts","../../animals/index.ts","../../core/utilities.ts"],"fileIdsList":[[4,5],[2,3],[4]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-9289341318-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n",{"version":"-18870194049-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}\n","signature":"6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n"},{"version":"-7220553464-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n","signature":"1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n"},{"version":"-22163106409-import * as A from '../animals';\nexport function makeRandomName() {\n return \"Bob!?! \";\n}\n\nexport function lastElementOf(arr: T[]): T | undefined {\n if (arr.length === 0) return undefined;\n return arr[arr.length - 1];\n}\n","signature":"-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n"}],"root":[5],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../core","strict":true,"target":1},"referencedMap":[[3,1],[4,2],[5,3]],"semanticDiagnosticsPerFile":[[5,[{"start":0,"length":32,"messageText":"'A' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true}]]],"latestChangedDtsFile":"./utilities.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/demo/lib/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -259,16 +311,28 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped "signature": "-9289341318-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n" }, "../../animals/dog.ts": { + "original": { + "version": "-18870194049-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}\n", + "signature": "6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n" + }, "version": "-18870194049-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}\n", - "signature": "-18870194049-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}\n" + "signature": "6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n" }, "../../animals/index.ts": { + "original": { + "version": "-7220553464-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n", + "signature": "1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n" + }, "version": "-7220553464-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n", - "signature": "-7220553464-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n" + "signature": "1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n" }, "../../core/utilities.ts": { + "original": { + "version": "-22163106409-import * as A from '../animals';\nexport function makeRandomName() {\n return \"Bob!?! \";\n}\n\nexport function lastElementOf(arr: T[]): T | undefined {\n if (arr.length === 0) return undefined;\n return arr[arr.length - 1];\n}\n", + "signature": "-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n" + }, "version": "-22163106409-import * as A from '../animals';\nexport function makeRandomName() {\n return \"Bob!?! \";\n}\n\nexport function lastElementOf(arr: T[]): T | undefined {\n if (arr.length === 0) return undefined;\n return arr[arr.length - 1];\n}\n", - "signature": "-22163106409-import * as A from '../animals';\nexport function makeRandomName() {\n return \"Bob!?! \";\n}\n\nexport function lastElementOf(arr: T[]): T | undefined {\n if (arr.length === 0) return undefined;\n return arr[arr.length - 1];\n}\n" + "signature": "-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n" } }, "root": [ @@ -318,31 +382,28 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped ] ] ], - "affectedFilesPendingEmit": [ - [ - "../../animals/animal.ts", - "Js | Dts" - ], - [ - "../../animals/dog.ts", - "Js | Dts" - ], - [ - "../../animals/index.ts", - "Js | Dts" - ], - [ - "../../core/utilities.ts", - "Js | Dts" - ] - ], - "emitSignatures": [ - "../../animals/animal.ts", - "../../animals/dog.ts", - "../../animals/index.ts", - "../../core/utilities.ts" - ], + "latestChangedDtsFile": "./utilities.d.ts", "version": "FakeTSVersion", - "size": 2147 + "size": 2633 } +//// [/user/username/projects/demo/lib/core/utilities.d.ts] +export declare function makeRandomName(): string; +export declare function lastElementOf(arr: T[]): T | undefined; + + +//// [/user/username/projects/demo/lib/core/utilities.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.makeRandomName = makeRandomName; +exports.lastElementOf = lastElementOf; +function makeRandomName() { + return "Bob!?! "; +} +function lastElementOf(arr) { + if (arr.length === 0) + return undefined; + return arr[arr.length - 1]; +} + + diff --git a/tests/baselines/reference/tsbuild/extends/configDir-template.js b/tests/baselines/reference/tsbuild/extends/configDir-template.js index 1e2302f023b17..f35f9d13c1b13 100644 --- a/tests/baselines/reference/tsbuild/extends/configDir-template.js +++ b/tests/baselines/reference/tsbuild/extends/configDir-template.js @@ -181,12 +181,16 @@ exports.z = 10; //// [/home/src/projects/myproject/outDir/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../main.ts","../src/secondary.ts"],"version":"FakeTSVersion"} //// [/home/src/projects/myproject/outDir/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../main.ts", + "../src/secondary.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 71 } //// [/home/src/projects/myproject/outDir/types/sometype.js] diff --git a/tests/baselines/reference/tsbuild/fileDelete/multiFile/deleted-file-without-composite.js b/tests/baselines/reference/tsbuild/fileDelete/multiFile/deleted-file-without-composite.js index e151f56e481d9..68d794886c95c 100644 --- a/tests/baselines/reference/tsbuild/fileDelete/multiFile/deleted-file-without-composite.js +++ b/tests/baselines/reference/tsbuild/fileDelete/multiFile/deleted-file-without-composite.js @@ -77,12 +77,16 @@ function child2() { //// [/src/child/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./child.ts","./child2.ts"],"version":"FakeTSVersion"} //// [/src/child/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./child.ts", + "./child2.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 63 } @@ -98,8 +102,48 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/child/tsconfig.json -[HH:MM:SS AM] Project 'src/child/tsconfig.json' is up to date because newest input 'src/child/child.ts' is older than output 'src/child/child.js' +[HH:MM:SS AM] Project 'src/child/tsconfig.json' is out of date because buildinfo file 'src/child/tsconfig.tsbuildinfo' indicates that file 'src/child/child2.ts' was root file of compilation but not any more. -exitCode:: ExitStatus.Success +[HH:MM:SS AM] Building project '/src/child/tsconfig.json'... + +======== Resolving module '../child/child2' from '/src/child/child.ts'. ======== +Module resolution kind is not specified, using 'Node10'. +Loading module as file / folder, candidate module location '/src/child/child2', target file types: TypeScript, Declaration. +File '/src/child/child2.ts' does not exist. +File '/src/child/child2.tsx' does not exist. +File '/src/child/child2.d.ts' does not exist. +Directory '/src/child/child2' does not exist, skipping all lookups in it. +Loading module as file / folder, candidate module location '/src/child/child2', target file types: JavaScript. +File '/src/child/child2.js' does not exist. +File '/src/child/child2.jsx' does not exist. +Directory '/src/child/child2' does not exist, skipping all lookups in it. +======== Module name '../child/child2' was not resolved. ======== +src/child/child.ts:1:24 - error TS2307: Cannot find module '../child/child2' or its corresponding type declarations. + +1 import { child2 } from "../child/child2"; +   ~~~~~~~~~~~~~~~~~ + +lib/lib.d.ts + Default library for target 'es5' +src/child/child.ts + Matched by default include pattern '**/*' + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +//// [/src/child/child.js] file written with same contents +//// [/src/child/tsconfig.tsbuildinfo] +{"root":["./child.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/src/child/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./child.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 63 +} + diff --git a/tests/baselines/reference/tsbuild/fileDelete/multiFile/detects-deleted-file-discrepancies.js b/tests/baselines/reference/tsbuild/fileDelete/multiFile/detects-deleted-file-discrepancies.js deleted file mode 100644 index 094ce6255ecdf..0000000000000 --- a/tests/baselines/reference/tsbuild/fileDelete/multiFile/detects-deleted-file-discrepancies.js +++ /dev/null @@ -1,80 +0,0 @@ -0:: delete child2 file -Clean build will not have latestChangedDtsFile as there was no emit and emitSignatures as undefined for files -Incremental will store the past latestChangedDtsFile and emitSignatures -TsBuild info text without affectedFilesPendingEmit:: /src/child/tsconfig.tsbuildinfo.readable.baseline.txt:: -CleanBuild: -{ - "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; };", - "affectsGlobalScope": true - }, - "./child.ts": { - "version": "-11458139532-import { child2 } from \"../child/child2\";\nexport function child() {\n child2();\n}\n" - } - }, - "root": [ - [ - 2, - "./child.ts" - ] - ], - "options": { - "composite": true - }, - "semanticDiagnosticsPerFile": [ - [ - "./child.ts", - [ - { - "start": 23, - "length": 17, - "messageText": "Cannot find module '../child/child2' or its corresponding type declarations.", - "category": 1, - "code": 2307 - } - ] - ] - ], - "emitSignatures": [ - "./child.ts" - ], - "version": "FakeTSVersion" -} -IncrementalBuild: -{ - "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; };", - "affectsGlobalScope": true - }, - "./child.ts": { - "version": "-11458139532-import { child2 } from \"../child/child2\";\nexport function child() {\n child2();\n}\n" - } - }, - "root": [ - [ - 2, - "./child.ts" - ] - ], - "options": { - "composite": true - }, - "semanticDiagnosticsPerFile": [ - [ - "./child.ts", - [ - { - "start": 23, - "length": 17, - "messageText": "Cannot find module '../child/child2' or its corresponding type declarations.", - "category": 1, - "code": 2307 - } - ] - ] - ], - "latestChangedDtsFile": "FakeFileName", - "version": "FakeTSVersion" -} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/fileDelete/multiFile/detects-deleted-file.js b/tests/baselines/reference/tsbuild/fileDelete/multiFile/detects-deleted-file.js index 3fc018a284d19..fc075d8cb6db0 100644 --- a/tests/baselines/reference/tsbuild/fileDelete/multiFile/detects-deleted-file.js +++ b/tests/baselines/reference/tsbuild/fileDelete/multiFile/detects-deleted-file.js @@ -308,8 +308,9 @@ Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +//// [/src/child/child.js] file written with same contents //// [/src/child/tsconfig.tsbuildinfo] -{"fileNames":["../../lib/lib.d.ts","./child.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-11458139532-import { child2 } from \"../child/child2\";\nexport function child() {\n child2();\n}\n","signature":"-1814288093-export declare function child(): void;\n"}],"root":[2],"options":{"composite":true},"semanticDiagnosticsPerFile":[[2,[{"start":23,"length":17,"messageText":"Cannot find module '../child/child2' or its corresponding type declarations.","category":1,"code":2307}]]],"affectedFilesPendingEmit":[2],"latestChangedDtsFile":"./child.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.d.ts","./child.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-11458139532-import { child2 } from \"../child/child2\";\nexport function child() {\n child2();\n}\n","signature":"-1814288093-export declare function child(): void;\n"}],"root":[2],"options":{"composite":true},"semanticDiagnosticsPerFile":[[2,[{"start":23,"length":17,"messageText":"Cannot find module '../child/child2' or its corresponding type declarations.","category":1,"code":2307}]]],"latestChangedDtsFile":"./child.d.ts","version":"FakeTSVersion"} //// [/src/child/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -359,14 +360,8 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped ] ] ], - "affectedFilesPendingEmit": [ - [ - "./child.ts", - "Js | Dts" - ] - ], "latestChangedDtsFile": "./child.d.ts", "version": "FakeTSVersion", - "size": 1042 + "size": 1011 } diff --git a/tests/baselines/reference/tsbuild/fileDelete/outFile/deleted-file-without-composite.js b/tests/baselines/reference/tsbuild/fileDelete/outFile/deleted-file-without-composite.js index a7e49145c257f..cf7331e828846 100644 --- a/tests/baselines/reference/tsbuild/fileDelete/outFile/deleted-file-without-composite.js +++ b/tests/baselines/reference/tsbuild/fileDelete/outFile/deleted-file-without-composite.js @@ -79,12 +79,16 @@ define("child", ["require", "exports", "child2"], function (require, exports, ch //// [/src/childResult.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./child/child.ts","./child/child2.ts"],"version":"FakeTSVersion"} //// [/src/childResult.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./child/child.ts", + "./child/child2.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 75 } @@ -99,8 +103,54 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/child/tsconfig.json -[HH:MM:SS AM] Project 'src/child/tsconfig.json' is up to date because newest input 'src/child/child.ts' is older than output 'src/childResult.js' +[HH:MM:SS AM] Project 'src/child/tsconfig.json' is out of date because buildinfo file 'src/childResult.tsbuildinfo' indicates that file 'src/child/child2.ts' was root file of compilation but not any more. -exitCode:: ExitStatus.Success +[HH:MM:SS AM] Building project '/src/child/tsconfig.json'... + +======== Resolving module '../child/child2' from '/src/child/child.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/child/child2.ts' does not exist. +File '/src/child/child2.tsx' does not exist. +File '/src/child/child2.d.ts' does not exist. +File '/src/child/child2.js' does not exist. +File '/src/child/child2.jsx' does not exist. +======== Module name '../child/child2' was not resolved. ======== +src/child/child.ts:1:24 - error TS2792: Cannot find module '../child/child2'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option? + +1 import { child2 } from "../child/child2"; +   ~~~~~~~~~~~~~~~~~ + +lib/lib.d.ts + Default library for target 'es5' +src/child/child.ts + Matched by default include pattern '**/*' + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +//// [/src/childResult.js] +define("child", ["require", "exports", "../child/child2"], function (require, exports, child2_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.child = child; + function child() { + (0, child2_1.child2)(); + } +}); + + +//// [/src/childResult.tsbuildinfo] +{"root":["./child/child.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/src/childResult.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./child/child.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 69 +} + diff --git a/tests/baselines/reference/tsbuild/fileDelete/outFile/detects-deleted-file-discrepancies.js b/tests/baselines/reference/tsbuild/fileDelete/outFile/detects-deleted-file-discrepancies.js deleted file mode 100644 index 29595ce804f80..0000000000000 --- a/tests/baselines/reference/tsbuild/fileDelete/outFile/detects-deleted-file-discrepancies.js +++ /dev/null @@ -1,72 +0,0 @@ -0:: delete child2 file -Clean build will not have latestChangedDtsFile as there was no emit and outSignature as undefined for files -Incremental will store the past latestChangedDtsFile and outSignature -TsBuild info text without affectedFilesPendingEmit:: /src/childresult.tsbuildinfo.readable.baseline.txt:: -CleanBuild: -{ - "fileInfos": { - "../lib/lib.d.ts": "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; };", - "./child/child.ts": "-11458139532-import { child2 } from \"../child/child2\";\nexport function child() {\n child2();\n}\n" - }, - "root": [ - [ - 2, - "./child/child.ts" - ] - ], - "options": { - "composite": true, - "module": 2, - "outFile": "./childResult.js" - }, - "semanticDiagnosticsPerFile": [ - [ - "./child/child.ts", - [ - { - "start": 23, - "length": 17, - "messageText": "Cannot find module '../child/child2'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?", - "category": 1, - "code": 2792 - } - ] - ] - ], - "version": "FakeTSVersion" -} -IncrementalBuild: -{ - "fileInfos": { - "../lib/lib.d.ts": "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; };", - "./child/child.ts": "-11458139532-import { child2 } from \"../child/child2\";\nexport function child() {\n child2();\n}\n" - }, - "root": [ - [ - 2, - "./child/child.ts" - ] - ], - "options": { - "composite": true, - "module": 2, - "outFile": "./childResult.js" - }, - "semanticDiagnosticsPerFile": [ - [ - "./child/child.ts", - [ - { - "start": 23, - "length": 17, - "messageText": "Cannot find module '../child/child2'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?", - "category": 1, - "code": 2792 - } - ] - ] - ], - "outSignature": "2074776633-declare module \"child2\" {\n export function child2(): void;\n}\ndeclare module \"child\" {\n export function child(): void;\n}\n", - "latestChangedDtsFile": "FakeFileName", - "version": "FakeTSVersion" -} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/fileDelete/outFile/detects-deleted-file.js b/tests/baselines/reference/tsbuild/fileDelete/outFile/detects-deleted-file.js index 9f7ee7b04a51f..8c3b0bf5f0212 100644 --- a/tests/baselines/reference/tsbuild/fileDelete/outFile/detects-deleted-file.js +++ b/tests/baselines/reference/tsbuild/fileDelete/outFile/detects-deleted-file.js @@ -271,8 +271,25 @@ Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +//// [/src/childResult.d.ts] +declare module "child" { + export function child(): void; +} + + +//// [/src/childResult.js] +define("child", ["require", "exports", "../child/child2"], function (require, exports, child2_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.child = child; + function child() { + (0, child2_1.child2)(); + } +}); + + //// [/src/childResult.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./child/child.ts"],"fileInfos":["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; };","-11458139532-import { child2 } from \"../child/child2\";\nexport function child() {\n child2();\n}\n"],"root":[2],"options":{"composite":true,"module":2,"outFile":"./childResult.js"},"semanticDiagnosticsPerFile":[[2,[{"start":23,"length":17,"messageText":"Cannot find module '../child/child2'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?","category":1,"code":2792}]]],"outSignature":"2074776633-declare module \"child2\" {\n export function child2(): void;\n}\ndeclare module \"child\" {\n export function child(): void;\n}\n","latestChangedDtsFile":"./childResult.d.ts","pendingEmit":false,"version":"FakeTSVersion"} +{"fileNames":["../lib/lib.d.ts","./child/child.ts"],"fileInfos":["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; };","-11458139532-import { child2 } from \"../child/child2\";\nexport function child() {\n child2();\n}\n"],"root":[2],"options":{"composite":true,"module":2,"outFile":"./childResult.js"},"semanticDiagnosticsPerFile":[[2,[{"start":23,"length":17,"messageText":"Cannot find module '../child/child2'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?","category":1,"code":2792}]]],"outSignature":"8966811613-declare module \"child\" {\n export function child(): void;\n}\n","latestChangedDtsFile":"./childResult.d.ts","version":"FakeTSVersion"} //// [/src/childResult.tsbuildinfo.readable.baseline.txt] { @@ -309,13 +326,9 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped ] ] ], - "outSignature": "2074776633-declare module \"child2\" {\n export function child2(): void;\n}\ndeclare module \"child\" {\n export function child(): void;\n}\n", + "outSignature": "8966811613-declare module \"child\" {\n export function child(): void;\n}\n", "latestChangedDtsFile": "./childResult.d.ts", - "pendingEmit": [ - "Js | Dts", - false - ], "version": "FakeTSVersion", - "size": 1195 + "size": 1106 } diff --git a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/reports-errors-in-files-affected-by-change-in-signature-with-isolatedModules.js b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/reports-errors-in-files-affected-by-change-in-signature-with-isolatedModules.js index 155e561247812..66b048a7bbf94 100644 --- a/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/reports-errors-in-files-affected-by-change-in-signature-with-isolatedModules.js +++ b/tests/baselines/reference/tsbuild/inferredTypeFromTransitiveModule/reports-errors-in-files-affected-by-change-in-signature-with-isolatedModules.js @@ -304,8 +304,26 @@ Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +//// [/src/obj/bar.d.ts] +declare const _default: () => void; +export default _default; + + +//// [/src/obj/bar.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = foo()(function foobar() { +}); + + +//// [/src/obj/index.d.ts] +import { LazyAction } from './bundling'; +export declare const lazyBar: LazyAction<() => void, typeof import("./lazyIndex")>; + + +//// [/src/obj/lazyIndex.d.ts] file written with same contents //// [/src/obj/tsconfig.tsbuildinfo] -{"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileIdsList":[[3,5],[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"10075719182-interface RawAction {\n (...args: any[]): Promise | void;\n}\ninterface ActionFactory {\n (target: T): T;\n}\ndeclare function foo(): ActionFactory;\nexport default foo()(function foobar(): void {\n});\n","signature":"-1866892563-declare const _default: () => void;\nexport default _default;\n"},{"version":"-5105594088-export class LazyModule {\n constructor(private importCallback: () => Promise) {}\n}\n\nexport class LazyAction<\n TAction extends (...args: any[]) => any,\n TModule\n> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\n }\n}\n","signature":"-23343356903-export declare class LazyModule {\n private importCallback;\n constructor(importCallback: () => Promise);\n}\nexport declare class LazyAction any, TModule> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\n}\n"},{"version":"-20910599262-interface PromiseConstructor {\n new (): Promise;\n}\ndeclare var Promise: PromiseConstructor;\ninterface Promise {\n}\n","affectsGlobalScope":true},"3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");","6186344161-import { LazyAction, LazyModule } from './bundling';\nconst lazyModule = new LazyModule(() =>\n import('./lazyIndex')\n);\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);\n"],"root":[[2,6]],"options":{"declaration":true,"outDir":"./","target":1},"referencedMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[[5,[{"start":85,"length":7,"messageText":"Expected 0 arguments, but got 1.","category":1,"code":2554}]]],"affectedFilesPendingEmit":[2,[6],[5]],"version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileIdsList":[[3,5],[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"10075719182-interface RawAction {\n (...args: any[]): Promise | void;\n}\ninterface ActionFactory {\n (target: T): T;\n}\ndeclare function foo(): ActionFactory;\nexport default foo()(function foobar(): void {\n});\n","signature":"-1866892563-declare const _default: () => void;\nexport default _default;\n"},{"version":"-5105594088-export class LazyModule {\n constructor(private importCallback: () => Promise) {}\n}\n\nexport class LazyAction<\n TAction extends (...args: any[]) => any,\n TModule\n> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\n }\n}\n","signature":"-23343356903-export declare class LazyModule {\n private importCallback;\n constructor(importCallback: () => Promise);\n}\nexport declare class LazyAction any, TModule> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\n}\n"},{"version":"-20910599262-interface PromiseConstructor {\n new (): Promise;\n}\ndeclare var Promise: PromiseConstructor;\ninterface Promise {\n}\n","affectsGlobalScope":true},{"version":"3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");","signature":"-6956449754-export { default as bar } from './bar';\n"},{"version":"6186344161-import { LazyAction, LazyModule } from './bundling';\nconst lazyModule = new LazyModule(() =>\n import('./lazyIndex')\n);\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);\n","signature":"-4053129224-import { LazyAction } from './bundling';\nexport declare const lazyBar: LazyAction<() => void, typeof import(\"./lazyIndex\")>;\n"}],"root":[[2,6]],"options":{"declaration":true,"outDir":"./","target":1},"referencedMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[[5,[{"start":85,"length":7,"messageText":"Expected 0 arguments, but got 1.","category":1,"code":2554}]]],"version":"FakeTSVersion"} //// [/src/obj/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -362,12 +380,20 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped "affectsGlobalScope": true }, "../lazyindex.ts": { + "original": { + "version": "3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");", + "signature": "-6956449754-export { default as bar } from './bar';\n" + }, "version": "3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");", - "signature": "3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");" + "signature": "-6956449754-export { default as bar } from './bar';\n" }, "../index.ts": { + "original": { + "version": "6186344161-import { LazyAction, LazyModule } from './bundling';\nconst lazyModule = new LazyModule(() =>\n import('./lazyIndex')\n);\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);\n", + "signature": "-4053129224-import { LazyAction } from './bundling';\nexport declare const lazyBar: LazyAction<() => void, typeof import(\"./lazyIndex\")>;\n" + }, "version": "6186344161-import { LazyAction, LazyModule } from './bundling';\nconst lazyModule = new LazyModule(() =>\n import('./lazyIndex')\n);\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);\n", - "signature": "6186344161-import { LazyAction, LazyModule } from './bundling';\nconst lazyModule = new LazyModule(() =>\n import('./lazyIndex')\n);\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);\n" + "signature": "-4053129224-import { LazyAction } from './bundling';\nexport declare const lazyBar: LazyAction<() => void, typeof import(\"./lazyIndex\")>;\n" } }, "root": [ @@ -413,26 +439,8 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped ] ] ], - "affectedFilesPendingEmit": [ - [ - "../bar.ts", - "Js | Dts" - ], - [ - [ - "../index.ts" - ], - "Dts" - ], - [ - [ - "../lazyindex.ts" - ], - "Dts" - ] - ], "version": "FakeTSVersion", - "size": 2484 + "size": 2693 } @@ -458,16 +466,30 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/obj/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/obj/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... exitCode:: ExitStatus.Success -//// [/src/obj/bar.d.ts] file written with same contents -//// [/src/obj/bar.js] file written with same contents -//// [/src/obj/index.d.ts] file written with same contents +//// [/src/obj/bar.d.ts] +declare const _default: (param: string) => void; +export default _default; + + +//// [/src/obj/bar.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = foo()(function foobar(param) { +}); + + +//// [/src/obj/index.d.ts] +import { LazyAction } from './bundling'; +export declare const lazyBar: LazyAction<(param: string) => void, typeof import("./lazyIndex")>; + + //// [/src/obj/lazyIndex.d.ts] file written with same contents //// [/src/obj/tsconfig.tsbuildinfo] {"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileIdsList":[[3,5],[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"9420269200-interface RawAction {\n (...args: any[]): Promise | void;\n}\ninterface ActionFactory {\n (target: T): T;\n}\ndeclare function foo(): ActionFactory;\nexport default foo()(function foobar(param: string): void {\n});\n","signature":"1630430607-declare const _default: (param: string) => void;\nexport default _default;\n"},{"version":"-5105594088-export class LazyModule {\n constructor(private importCallback: () => Promise) {}\n}\n\nexport class LazyAction<\n TAction extends (...args: any[]) => any,\n TModule\n> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\n }\n}\n","signature":"-23343356903-export declare class LazyModule {\n private importCallback;\n constructor(importCallback: () => Promise);\n}\nexport declare class LazyAction any, TModule> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\n}\n"},{"version":"-20910599262-interface PromiseConstructor {\n new (): Promise;\n}\ndeclare var Promise: PromiseConstructor;\ninterface Promise {\n}\n","affectsGlobalScope":true},{"version":"3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");","signature":"-6956449754-export { default as bar } from './bar';\n"},{"version":"6186344161-import { LazyAction, LazyModule } from './bundling';\nconst lazyModule = new LazyModule(() =>\n import('./lazyIndex')\n);\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);\n","signature":"-13696684486-import { LazyAction } from './bundling';\nexport declare const lazyBar: LazyAction<(param: string) => void, typeof import(\"./lazyIndex\")>;\n"}],"root":[[2,6]],"options":{"declaration":true,"outDir":"./","target":1},"referencedMap":[[6,1],[5,2]],"version":"FakeTSVersion"} @@ -614,8 +636,26 @@ Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +//// [/src/obj/bar.d.ts] +declare const _default: () => void; +export default _default; + + +//// [/src/obj/bar.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = foo()(function foobar() { +}); + + +//// [/src/obj/index.d.ts] +import { LazyAction } from './bundling'; +export declare const lazyBar: LazyAction<() => void, typeof import("./lazyIndex")>; + + +//// [/src/obj/lazyIndex.d.ts] file written with same contents //// [/src/obj/tsconfig.tsbuildinfo] -{"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileIdsList":[[3,5],[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"10075719182-interface RawAction {\n (...args: any[]): Promise | void;\n}\ninterface ActionFactory {\n (target: T): T;\n}\ndeclare function foo(): ActionFactory;\nexport default foo()(function foobar(): void {\n});\n","signature":"-1866892563-declare const _default: () => void;\nexport default _default;\n"},{"version":"-5105594088-export class LazyModule {\n constructor(private importCallback: () => Promise) {}\n}\n\nexport class LazyAction<\n TAction extends (...args: any[]) => any,\n TModule\n> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\n }\n}\n","signature":"-23343356903-export declare class LazyModule {\n private importCallback;\n constructor(importCallback: () => Promise);\n}\nexport declare class LazyAction any, TModule> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\n}\n"},{"version":"-20910599262-interface PromiseConstructor {\n new (): Promise;\n}\ndeclare var Promise: PromiseConstructor;\ninterface Promise {\n}\n","affectsGlobalScope":true},"3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");","6186344161-import { LazyAction, LazyModule } from './bundling';\nconst lazyModule = new LazyModule(() =>\n import('./lazyIndex')\n);\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);\n"],"root":[[2,6]],"options":{"declaration":true,"outDir":"./","target":1},"referencedMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[[5,[{"start":85,"length":7,"messageText":"Expected 0 arguments, but got 1.","category":1,"code":2554}]]],"affectedFilesPendingEmit":[2,[6],[5]],"version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.d.ts","../bar.ts","../bundling.ts","../global.d.ts","../lazyindex.ts","../index.ts"],"fileIdsList":[[3,5],[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"10075719182-interface RawAction {\n (...args: any[]): Promise | void;\n}\ninterface ActionFactory {\n (target: T): T;\n}\ndeclare function foo(): ActionFactory;\nexport default foo()(function foobar(): void {\n});\n","signature":"-1866892563-declare const _default: () => void;\nexport default _default;\n"},{"version":"-5105594088-export class LazyModule {\n constructor(private importCallback: () => Promise) {}\n}\n\nexport class LazyAction<\n TAction extends (...args: any[]) => any,\n TModule\n> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction) {\n }\n}\n","signature":"-23343356903-export declare class LazyModule {\n private importCallback;\n constructor(importCallback: () => Promise);\n}\nexport declare class LazyAction any, TModule> {\n constructor(_lazyModule: LazyModule, _getter: (module: TModule) => TAction);\n}\n"},{"version":"-20910599262-interface PromiseConstructor {\n new (): Promise;\n}\ndeclare var Promise: PromiseConstructor;\ninterface Promise {\n}\n","affectsGlobalScope":true},{"version":"3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");","signature":"-6956449754-export { default as bar } from './bar';\n"},{"version":"6186344161-import { LazyAction, LazyModule } from './bundling';\nconst lazyModule = new LazyModule(() =>\n import('./lazyIndex')\n);\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);\n","signature":"-4053129224-import { LazyAction } from './bundling';\nexport declare const lazyBar: LazyAction<() => void, typeof import(\"./lazyIndex\")>;\n"}],"root":[[2,6]],"options":{"declaration":true,"outDir":"./","target":1},"referencedMap":[[6,1],[5,2]],"semanticDiagnosticsPerFile":[[5,[{"start":85,"length":7,"messageText":"Expected 0 arguments, but got 1.","category":1,"code":2554}]]],"version":"FakeTSVersion"} //// [/src/obj/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -672,12 +712,20 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped "affectsGlobalScope": true }, "../lazyindex.ts": { + "original": { + "version": "3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");", + "signature": "-6956449754-export { default as bar } from './bar';\n" + }, "version": "3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");", - "signature": "3017320451-export { default as bar } from './bar';\n\nimport { default as bar } from './bar';\nbar(\"hello\");" + "signature": "-6956449754-export { default as bar } from './bar';\n" }, "../index.ts": { + "original": { + "version": "6186344161-import { LazyAction, LazyModule } from './bundling';\nconst lazyModule = new LazyModule(() =>\n import('./lazyIndex')\n);\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);\n", + "signature": "-4053129224-import { LazyAction } from './bundling';\nexport declare const lazyBar: LazyAction<() => void, typeof import(\"./lazyIndex\")>;\n" + }, "version": "6186344161-import { LazyAction, LazyModule } from './bundling';\nconst lazyModule = new LazyModule(() =>\n import('./lazyIndex')\n);\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);\n", - "signature": "6186344161-import { LazyAction, LazyModule } from './bundling';\nconst lazyModule = new LazyModule(() =>\n import('./lazyIndex')\n);\nexport const lazyBar = new LazyAction(lazyModule, m => m.bar);\n" + "signature": "-4053129224-import { LazyAction } from './bundling';\nexport declare const lazyBar: LazyAction<() => void, typeof import(\"./lazyIndex\")>;\n" } }, "root": [ @@ -723,26 +771,8 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped ] ] ], - "affectedFilesPendingEmit": [ - [ - "../bar.ts", - "Js | Dts" - ], - [ - [ - "../index.ts" - ], - "Dts" - ], - [ - [ - "../lazyindex.ts" - ], - "Dts" - ] - ], "version": "FakeTSVersion", - "size": 2484 + "size": 2693 } @@ -762,30 +792,13 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/obj/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/obj/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... exitCode:: ExitStatus.Success -//// [/src/obj/bar.d.ts] -declare const _default: () => void; -export default _default; - - -//// [/src/obj/bar.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = foo()(function foobar() { -}); - - -//// [/src/obj/index.d.ts] -import { LazyAction } from './bundling'; -export declare const lazyBar: LazyAction<() => void, typeof import("./lazyIndex")>; - - //// [/src/obj/lazyIndex.d.ts] file written with same contents //// [/src/obj/lazyIndex.js] "use strict"; diff --git a/tests/baselines/reference/tsbuild/javascriptProjectEmit/loads-js-based-projects-and-emits-them-correctly.js b/tests/baselines/reference/tsbuild/javascriptProjectEmit/loads-js-based-projects-and-emits-them-correctly.js index a5185409e5944..c35f0d25a3a4b 100644 --- a/tests/baselines/reference/tsbuild/javascriptProjectEmit/loads-js-based-projects-and-emits-them-correctly.js +++ b/tests/baselines/reference/tsbuild/javascriptProjectEmit/loads-js-based-projects-and-emits-them-correctly.js @@ -189,8 +189,22 @@ module.exports = {}; "size": 1206 } +//// [/lib/sub-project/index.d.ts] +export type MyNominal = Nominal; +import { Nominal } from '../common/nominal'; + + +//// [/lib/sub-project/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var nominal_1 = require("../common/nominal"); +/** + * @typedef {Nominal} MyNominal + */ + + //// [/lib/sub-project/tsconfig.tsbuildinfo] -{"fileNames":["../lib.d.ts","../common/nominal.d.ts","../../src/sub-project/index.js"],"fileIdsList":[[2]],"fileInfos":[{"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","affectsGlobalScope":true},"-13020584488-export type Nominal = T & {\n [Symbol.species]: Name;\n};\n","-23375763082-import { Nominal } from '../common/nominal';\n\n/**\n * @typedef {Nominal} MyNominal\n */\n"],"root":[3],"options":{"allowJs":true,"checkJs":true,"composite":true,"declaration":true,"outDir":"..","rootDir":"../../src","skipLibCheck":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[3,[{"start":9,"length":7,"messageText":"'Nominal' is a type and cannot be imported in JavaScript files. Use 'import(\"../common/nominal\").Nominal' in a JSDoc type annotation.","category":1,"code":18042}]]],"affectedFilesPendingEmit":[3],"emitSignatures":[3],"version":"FakeTSVersion"} +{"fileNames":["../lib.d.ts","../common/nominal.d.ts","../../src/sub-project/index.js"],"fileIdsList":[[2]],"fileInfos":[{"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","affectsGlobalScope":true},"-13020584488-export type Nominal = T & {\n [Symbol.species]: Name;\n};\n",{"version":"-23375763082-import { Nominal } from '../common/nominal';\n\n/**\n * @typedef {Nominal} MyNominal\n */\n","signature":"-13328259909-export type MyNominal = Nominal;\nimport { Nominal } from '../common/nominal';\n"}],"root":[3],"options":{"allowJs":true,"checkJs":true,"composite":true,"declaration":true,"outDir":"..","rootDir":"../../src","skipLibCheck":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[3,[{"start":9,"length":7,"messageText":"'Nominal' is a type and cannot be imported in JavaScript files. Use 'import(\"../common/nominal\").Nominal' in a JSDoc type annotation.","category":1,"code":18042}]]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} //// [/lib/sub-project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -219,8 +233,12 @@ module.exports = {}; "signature": "-13020584488-export type Nominal = T & {\n [Symbol.species]: Name;\n};\n" }, "../../src/sub-project/index.js": { + "original": { + "version": "-23375763082-import { Nominal } from '../common/nominal';\n\n/**\n * @typedef {Nominal} MyNominal\n */\n", + "signature": "-13328259909-export type MyNominal = Nominal;\nimport { Nominal } from '../common/nominal';\n" + }, "version": "-23375763082-import { Nominal } from '../common/nominal';\n\n/**\n * @typedef {Nominal} MyNominal\n */\n", - "signature": "-23375763082-import { Nominal } from '../common/nominal';\n\n/**\n * @typedef {Nominal} MyNominal\n */\n" + "signature": "-13328259909-export type MyNominal = Nominal;\nimport { Nominal } from '../common/nominal';\n" } }, "root": [ @@ -257,16 +275,8 @@ module.exports = {}; ] ] ], - "affectedFilesPendingEmit": [ - [ - "../../src/sub-project/index.js", - "Js | Dts" - ] - ], - "emitSignatures": [ - "../../src/sub-project/index.js" - ], + "latestChangedDtsFile": "./index.d.ts", "version": "FakeTSVersion", - "size": 1511 + "size": 1640 } diff --git a/tests/baselines/reference/tsbuild/moduleResolution/impliedNodeFormat-differs-between-projects-for-shared-file.js b/tests/baselines/reference/tsbuild/moduleResolution/impliedNodeFormat-differs-between-projects-for-shared-file.js index 65c226fd1fd98..cb94ea67dc64b 100644 --- a/tests/baselines/reference/tsbuild/moduleResolution/impliedNodeFormat-differs-between-projects-for-shared-file.js +++ b/tests/baselines/reference/tsbuild/moduleResolution/impliedNodeFormat-differs-between-projects-for-shared-file.js @@ -144,12 +144,15 @@ exitCode:: ExitStatus.Success //// [/src/projects/a/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./src/index.ts"],"version":"FakeTSVersion"} //// [/src/projects/a/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./src/index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 53 } //// [/src/projects/b/src/index.js] @@ -158,12 +161,15 @@ pg.foo(); //// [/src/projects/b/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./src/index.ts"],"version":"FakeTSVersion"} //// [/src/projects/b/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./src/index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 53 } diff --git a/tests/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-preserveSymlinks.js b/tests/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-preserveSymlinks.js index 63e5e76a90452..240e8ab2cd2a0 100644 --- a/tests/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-preserveSymlinks.js +++ b/tests/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-preserveSymlinks.js @@ -198,12 +198,15 @@ exports.theNum = 42; //// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../index.ts"],"version":"FakeTSVersion"} //// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 50 } diff --git a/tests/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly.js b/tests/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly.js index 850852a510805..af4861f9e192b 100644 --- a/tests/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly.js +++ b/tests/baselines/reference/tsbuild/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly.js @@ -197,12 +197,15 @@ exports.theNum = 42; //// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../index.ts"],"version":"FakeTSVersion"} //// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 50 } diff --git a/tests/baselines/reference/tsbuild/moduleResolution/shared-resolution-should-not-report-error.js b/tests/baselines/reference/tsbuild/moduleResolution/shared-resolution-should-not-report-error.js index 70751efebaf34..120174383629e 100644 --- a/tests/baselines/reference/tsbuild/moduleResolution/shared-resolution-should-not-report-error.js +++ b/tests/baselines/reference/tsbuild/moduleResolution/shared-resolution-should-not-report-error.js @@ -243,11 +243,14 @@ export {}; } //// [/src/projects/project/packages/b/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./index.js"],"version":"FakeTSVersion"} //// [/src/projects/project/packages/b/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./index.js" + ], "version": "FakeTSVersion", - "size": 27 + "size": 49 } diff --git a/tests/baselines/reference/tsbuild/moduleResolution/when-resolution-is-not-shared.js b/tests/baselines/reference/tsbuild/moduleResolution/when-resolution-is-not-shared.js index 4f307945285cd..f6922ee9ee937 100644 --- a/tests/baselines/reference/tsbuild/moduleResolution/when-resolution-is-not-shared.js +++ b/tests/baselines/reference/tsbuild/moduleResolution/when-resolution-is-not-shared.js @@ -267,11 +267,14 @@ exitCode:: ExitStatus.Success //// [/src/projects/project/packages/b/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./index.js"],"version":"FakeTSVersion"} //// [/src/projects/project/packages/b/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./index.js" + ], "version": "FakeTSVersion", - "size": 27 + "size": 49 } diff --git a/tests/baselines/reference/tsbuild/noCheck-errors/semantic-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noCheck-errors/semantic-errors-with-incremental.js index 810ea8ef898a6..36ab139a99eba 100644 --- a/tests/baselines/reference/tsbuild/noCheck-errors/semantic-errors-with-incremental.js +++ b/tests/baselines/reference/tsbuild/noCheck-errors/semantic-errors-with-incremental.js @@ -39,13 +39,23 @@ Output:: [HH:MM:SS AM] Building project '/src/tsconfig.json'... +src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 const err: number = "error"; +   ~~~ + +src/a.ts:2:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +2 const a: number = "hello" +   ~ + src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. 3 "noCheck": true,    ~~~~ -Found 1 error. +Found 3 errors. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped Program root files: [ @@ -63,13 +73,22 @@ Program files:: /lib/lib.d.ts /src/a.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +//// [/src/a.d.ts] +declare const err: number; +declare const a: number; + + //// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"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":false,"affectsGlobalScope":true},{"version":"9312413704-const err: number = \"error\";\nconst a: number = \"hello\"","signature":false,"affectsGlobalScope":true}],"root":[2],"options":{"declaration":true,"emitDeclarationOnly":true},"changeFileSet":[1,2],"version":"FakeTSVersion"} +{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"9312413704-const err: number = \"error\";\nconst a: number = \"hello\"","signature":"-22763377875-declare const err: number;\ndeclare const a: number;\n","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true,"emitDeclarationOnly":true},"semanticDiagnosticsPerFile":[[2,[{"start":6,"length":3,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."},{"start":35,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -81,19 +100,20 @@ No shapes updated in the builder:: "../lib/lib.d.ts": { "original": { "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": false, "affectsGlobalScope": true }, "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; };", "affectsGlobalScope": true }, "./a.ts": { "original": { "version": "9312413704-const err: number = \"error\";\nconst a: number = \"hello\"", - "signature": false, + "signature": "-22763377875-declare const err: number;\ndeclare const a: number;\n", "affectsGlobalScope": true }, "version": "9312413704-const err: number = \"error\";\nconst a: number = \"hello\"", + "signature": "-22763377875-declare const err: number;\ndeclare const a: number;\n", "affectsGlobalScope": true } }, @@ -107,12 +127,29 @@ No shapes updated in the builder:: "declaration": true, "emitDeclarationOnly": true }, - "changeFileSet": [ - "../lib/lib.d.ts", - "./a.ts" + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "start": 6, + "length": 3, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + }, + { + "start": 35, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] ], "version": "FakeTSVersion", - "size": 799 + "size": 1089 } @@ -126,17 +163,27 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... +src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 const err: number = "error"; +   ~~~ + +src/a.ts:2:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +2 const a: number = "hello" +   ~ + src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. 3 "noCheck": true,    ~~~~ -Found 1 error. +Found 3 errors. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped Program root files: [ @@ -154,7 +201,7 @@ Program files:: /lib/lib.d.ts /src/a.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -174,17 +221,22 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... +src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 const err: number = "error"; +   ~~~ + src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. 3 "noCheck": true,    ~~~~ -Found 1 error. +Found 2 errors. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped Program root files: [ @@ -202,13 +254,21 @@ Program files:: /lib/lib.d.ts /src/a.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) +//// [/src/a.d.ts] +declare const err: number; +declare const a = "hello"; + + //// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"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":false,"affectsGlobalScope":true},{"version":"6909448549-const err: number = \"error\";\nconst a = \"hello\"","signature":false,"affectsGlobalScope":true}],"root":[2],"options":{"declaration":true,"emitDeclarationOnly":true},"changeFileSet":[1,2],"version":"FakeTSVersion"} +{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"6909448549-const err: number = \"error\";\nconst a = \"hello\"","signature":"-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true,"emitDeclarationOnly":true},"semanticDiagnosticsPerFile":[[2,[{"start":6,"length":3,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -220,19 +280,20 @@ No shapes updated in the builder:: "../lib/lib.d.ts": { "original": { "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": false, "affectsGlobalScope": true }, "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; };", "affectsGlobalScope": true }, "./a.ts": { "original": { "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", - "signature": false, + "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", "affectsGlobalScope": true }, "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", + "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", "affectsGlobalScope": true } }, @@ -246,12 +307,22 @@ No shapes updated in the builder:: "declaration": true, "emitDeclarationOnly": true }, - "changeFileSet": [ - "../lib/lib.d.ts", - "./a.ts" + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "start": 6, + "length": 3, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] ], "version": "FakeTSVersion", - "size": 791 + "size": 970 } @@ -265,17 +336,22 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... +src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 const err: number = "error"; +   ~~~ + src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. 3 "noCheck": true,    ~~~~ -Found 1 error. +Found 2 errors. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped Program root files: [ @@ -293,7 +369,7 @@ Program files:: /lib/lib.d.ts /src/a.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -317,7 +393,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -346,78 +422,10 @@ Program files:: /src/a.ts Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts) +No shapes updated in the builder:: -//// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"6909448549-const err: number = \"error\";\nconst a = \"hello\"","signature":"-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true,"emitDeclarationOnly":true},"semanticDiagnosticsPerFile":[[2,[{"start":6,"length":3,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"affectedFilesPendingEmit":[2],"version":"FakeTSVersion"} - -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "fileNames": [ - "../lib/lib.d.ts", - "./a.ts" - ], - "fileInfos": { - "../lib/lib.d.ts": { - "original": { - "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; };", - "affectsGlobalScope": true - }, - "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; };", - "affectsGlobalScope": true - }, - "./a.ts": { - "original": { - "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", - "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", - "affectsGlobalScope": true - }, - "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", - "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", - "affectsGlobalScope": true - } - }, - "root": [ - [ - 2, - "./a.ts" - ] - ], - "options": { - "declaration": true, - "emitDeclarationOnly": true - }, - "semanticDiagnosticsPerFile": [ - [ - "./a.ts", - [ - { - "start": 6, - "length": 3, - "code": 2322, - "category": 1, - "messageText": "Type 'string' is not assignable to type 'number'." - } - ] - ] - ], - "affectedFilesPendingEmit": [ - [ - "./a.ts", - "Dts" - ] - ], - "version": "FakeTSVersion", - "size": 1001 -} - Change:: no-change-run @@ -429,7 +437,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... diff --git a/tests/baselines/reference/tsbuild/noCheck-errors/semantic-errors.js b/tests/baselines/reference/tsbuild/noCheck-errors/semantic-errors.js index 8a05af1c7930c..f8dc65820ea76 100644 --- a/tests/baselines/reference/tsbuild/noCheck-errors/semantic-errors.js +++ b/tests/baselines/reference/tsbuild/noCheck-errors/semantic-errors.js @@ -39,13 +39,23 @@ Output:: [HH:MM:SS AM] Building project '/src/tsconfig.json'... +src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 const err: number = "error"; +   ~~~ + +src/a.ts:2:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +2 const a: number = "hello" +   ~ + src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. 3 "noCheck": true,    ~~~~ -Found 1 error. +Found 3 errors. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped Program root files: [ @@ -62,18 +72,31 @@ Program files:: /lib/lib.d.ts /src/a.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +//// [/src/a.d.ts] +declare const err: number; +declare const a: number; + + //// [/src/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./a.ts"],"errors":true,"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./a.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 59 } @@ -87,17 +110,27 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/a.d.ts' does not exist +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... +src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 const err: number = "error"; +   ~~~ + +src/a.ts:2:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +2 const a: number = "hello" +   ~ + src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. 3 "noCheck": true,    ~~~~ -Found 1 error. +Found 3 errors. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped Program root files: [ @@ -114,11 +147,16 @@ Program files:: /lib/lib.d.ts /src/a.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +//// [/src/a.d.ts] file written with same contents //// [/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -136,17 +174,22 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... +src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 const err: number = "error"; +   ~~~ + src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. 3 "noCheck": true,    ~~~~ -Found 1 error. +Found 2 errors. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped Program root files: [ @@ -163,11 +206,20 @@ Program files:: /lib/lib.d.ts /src/a.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +//// [/src/a.d.ts] +declare const err: number; +declare const a = "hello"; + + //// [/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -181,17 +233,22 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/a.d.ts' does not exist +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... +src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 const err: number = "error"; +   ~~~ + src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. 3 "noCheck": true,    ~~~~ -Found 1 error. +Found 2 errors. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped Program root files: [ @@ -208,11 +265,16 @@ Program files:: /lib/lib.d.ts /src/a.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +//// [/src/a.d.ts] file written with same contents //// [/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -234,7 +296,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/a.d.ts' does not exist +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -267,9 +329,10 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /lib/lib.d.ts (used version) -/src/a.ts (used version) +/src/a.ts (computed .d.ts during emit) +//// [/src/a.d.ts] file written with same contents //// [/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -283,7 +346,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/a.d.ts' does not exist +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -316,8 +379,9 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /lib/lib.d.ts (used version) -/src/a.ts (used version) +/src/a.ts (computed .d.ts during emit) +//// [/src/a.d.ts] file written with same contents //// [/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/noCheck-errors/syntax-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noCheck-errors/syntax-errors-with-incremental.js index c562cb299aeeb..e03962a88aac7 100644 --- a/tests/baselines/reference/tsbuild/noCheck-errors/syntax-errors-with-incremental.js +++ b/tests/baselines/reference/tsbuild/noCheck-errors/syntax-errors-with-incremental.js @@ -39,16 +39,16 @@ Output:: [HH:MM:SS AM] Building project '/src/tsconfig.json'... -src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. - -3 "noCheck": true, -   ~~~~ - src/a.ts:2:17 - error TS1002: Unterminated string literal. 2 const a = "hello     +src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. + +3 "noCheck": true, +   ~~~~ + Found 2 errors. @@ -70,11 +70,18 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +//// [/src/a.d.ts] +declare const err: number; +declare const a = "hello"; + + //// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"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":false,"affectsGlobalScope":true},{"version":"8018408675-const err: number = \"error\";\nconst a = \"hello","signature":false,"affectsGlobalScope":true}],"root":[2],"options":{"declaration":true,"emitDeclarationOnly":true},"changeFileSet":[1,2],"version":"FakeTSVersion"} +{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"8018408675-const err: number = \"error\";\nconst a = \"hello","signature":"-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true,"emitDeclarationOnly":true},"semanticDiagnosticsPerFile":[1,2],"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -86,19 +93,20 @@ No shapes updated in the builder:: "../lib/lib.d.ts": { "original": { "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": false, "affectsGlobalScope": true }, "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; };", "affectsGlobalScope": true }, "./a.ts": { "original": { "version": "8018408675-const err: number = \"error\";\nconst a = \"hello", - "signature": false, + "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", "affectsGlobalScope": true }, "version": "8018408675-const err: number = \"error\";\nconst a = \"hello", + "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", "affectsGlobalScope": true } }, @@ -112,12 +120,18 @@ No shapes updated in the builder:: "declaration": true, "emitDeclarationOnly": true }, - "changeFileSet": [ - "../lib/lib.d.ts", - "./a.ts" + "semanticDiagnosticsPerFile": [ + [ + "../lib/lib.d.ts", + "not cached" + ], + [ + "./a.ts", + "not cached" + ] ], "version": "FakeTSVersion", - "size": 789 + "size": 852 } @@ -131,20 +145,20 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... -src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. - -3 "noCheck": true, -   ~~~~ - src/a.ts:2:17 - error TS1002: Unterminated string literal. 2 const a = "hello     +src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. + +3 "noCheck": true, +   ~~~~ + Found 2 errors. @@ -184,17 +198,22 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... +src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 const err: number = "error"; +   ~~~ + src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. 3 "noCheck": true,    ~~~~ -Found 1 error. +Found 2 errors. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped Program root files: [ @@ -212,13 +231,17 @@ Program files:: /lib/lib.d.ts /src/a.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) +//// [/src/a.d.ts] file written with same contents //// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"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":false,"affectsGlobalScope":true},{"version":"6909448549-const err: number = \"error\";\nconst a = \"hello\"","signature":false,"affectsGlobalScope":true}],"root":[2],"options":{"declaration":true,"emitDeclarationOnly":true},"changeFileSet":[1,2],"version":"FakeTSVersion"} +{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"6909448549-const err: number = \"error\";\nconst a = \"hello\"","signature":"-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true,"emitDeclarationOnly":true},"semanticDiagnosticsPerFile":[[2,[{"start":6,"length":3,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -230,19 +253,20 @@ No shapes updated in the builder:: "../lib/lib.d.ts": { "original": { "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": false, "affectsGlobalScope": true }, "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; };", "affectsGlobalScope": true }, "./a.ts": { "original": { "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", - "signature": false, + "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", "affectsGlobalScope": true }, "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", + "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", "affectsGlobalScope": true } }, @@ -256,12 +280,22 @@ No shapes updated in the builder:: "declaration": true, "emitDeclarationOnly": true }, - "changeFileSet": [ - "../lib/lib.d.ts", - "./a.ts" + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "start": 6, + "length": 3, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] ], "version": "FakeTSVersion", - "size": 791 + "size": 970 } @@ -275,17 +309,22 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... +src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 const err: number = "error"; +   ~~~ + src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. 3 "noCheck": true,    ~~~~ -Found 1 error. +Found 2 errors. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped Program root files: [ @@ -303,7 +342,7 @@ Program files:: /lib/lib.d.ts /src/a.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -327,7 +366,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -356,78 +395,10 @@ Program files:: /src/a.ts Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts -Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) -/src/a.ts (computed .d.ts) +No shapes updated in the builder:: -//// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"6909448549-const err: number = \"error\";\nconst a = \"hello\"","signature":"-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true,"emitDeclarationOnly":true},"semanticDiagnosticsPerFile":[[2,[{"start":6,"length":3,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"affectedFilesPendingEmit":[2],"version":"FakeTSVersion"} - -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "fileNames": [ - "../lib/lib.d.ts", - "./a.ts" - ], - "fileInfos": { - "../lib/lib.d.ts": { - "original": { - "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; };", - "affectsGlobalScope": true - }, - "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; };", - "affectsGlobalScope": true - }, - "./a.ts": { - "original": { - "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", - "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", - "affectsGlobalScope": true - }, - "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", - "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", - "affectsGlobalScope": true - } - }, - "root": [ - [ - 2, - "./a.ts" - ] - ], - "options": { - "declaration": true, - "emitDeclarationOnly": true - }, - "semanticDiagnosticsPerFile": [ - [ - "./a.ts", - [ - { - "start": 6, - "length": 3, - "code": 2322, - "category": 1, - "messageText": "Type 'string' is not assignable to type 'number'." - } - ] - ] - ], - "affectedFilesPendingEmit": [ - [ - "./a.ts", - "Dts" - ] - ], - "version": "FakeTSVersion", - "size": 1001 -} - Change:: no-change-run @@ -439,7 +410,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... diff --git a/tests/baselines/reference/tsbuild/noCheck-errors/syntax-errors.js b/tests/baselines/reference/tsbuild/noCheck-errors/syntax-errors.js index 694dd2d2ea348..d2d88eb69b0ed 100644 --- a/tests/baselines/reference/tsbuild/noCheck-errors/syntax-errors.js +++ b/tests/baselines/reference/tsbuild/noCheck-errors/syntax-errors.js @@ -39,16 +39,16 @@ Output:: [HH:MM:SS AM] Building project '/src/tsconfig.json'... -src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. - -3 "noCheck": true, -   ~~~~ - src/a.ts:2:17 - error TS1002: Unterminated string literal. 2 const a = "hello     +src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. + +3 "noCheck": true, +   ~~~~ + Found 2 errors. @@ -69,16 +69,27 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +//// [/src/a.d.ts] +declare const err: number; +declare const a = "hello"; + + //// [/src/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./a.ts"],"errors":true,"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./a.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 59 } @@ -92,20 +103,20 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/a.d.ts' does not exist +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... -src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. - -3 "noCheck": true, -   ~~~~ - src/a.ts:2:17 - error TS1002: Unterminated string literal. 2 const a = "hello     +src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. + +3 "noCheck": true, +   ~~~~ + Found 2 errors. @@ -126,9 +137,12 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +//// [/src/a.d.ts] file written with same contents //// [/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -146,17 +160,22 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... +src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 const err: number = "error"; +   ~~~ + src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. 3 "noCheck": true,    ~~~~ -Found 1 error. +Found 2 errors. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped Program root files: [ @@ -173,11 +192,16 @@ Program files:: /lib/lib.d.ts /src/a.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +//// [/src/a.d.ts] file written with same contents //// [/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -191,17 +215,22 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/a.d.ts' does not exist +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... +src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 const err: number = "error"; +   ~~~ + src/tsconfig.json:3:16 - error TS5023: Unknown compiler option 'noCheck'. 3 "noCheck": true,    ~~~~ -Found 1 error. +Found 2 errors. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped Program root files: [ @@ -218,11 +247,16 @@ Program files:: /lib/lib.d.ts /src/a.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +//// [/src/a.d.ts] file written with same contents //// [/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -244,7 +278,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/a.d.ts' does not exist +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -277,9 +311,10 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /lib/lib.d.ts (used version) -/src/a.ts (used version) +/src/a.ts (computed .d.ts during emit) +//// [/src/a.d.ts] file written with same contents //// [/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -293,7 +328,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/a.d.ts' does not exist +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -326,8 +361,9 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /lib/lib.d.ts (used version) -/src/a.ts (used version) +/src/a.ts (computed .d.ts during emit) +//// [/src/a.d.ts] file written with same contents //// [/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/noCheck/semantic-errors-with-incremental-discrepancies.js b/tests/baselines/reference/tsbuild/noCheck/semantic-errors-with-incremental-discrepancies.js deleted file mode 100644 index 7d42ea080cab5..0000000000000 --- a/tests/baselines/reference/tsbuild/noCheck/semantic-errors-with-incremental-discrepancies.js +++ /dev/null @@ -1,132 +0,0 @@ -3:: Disable noCheck -*** Needs explanation -TsBuild info text without affectedFilesPendingEmit:: /src/tsconfig.tsbuildinfo.readable.baseline.txt:: -CleanBuild: -{ - "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; };", - "affectsGlobalScope": true - }, - "./a.ts": { - "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", - "affectsGlobalScope": true - } - }, - "root": [ - [ - 2, - "./a.ts" - ] - ], - "options": { - "declaration": true, - "emitDeclarationOnly": true - }, - "semanticDiagnosticsPerFile": [ - [ - "./a.ts", - [ - { - "start": 6, - "length": 3, - "code": 2322, - "category": 1, - "messageText": "Type 'string' is not assignable to type 'number'." - } - ] - ] - ], - "version": "FakeTSVersion" -} -IncrementalBuild: -{ - "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; };", - "affectsGlobalScope": true - }, - "./a.ts": { - "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", - "affectsGlobalScope": true - } - }, - "root": [ - [ - 2, - "./a.ts" - ] - ], - "options": { - "declaration": true, - "emitDeclarationOnly": true, - "noCheck": true - }, - "version": "FakeTSVersion" -} -4:: no-change-run -*** Needs explanation -TsBuild info text without affectedFilesPendingEmit:: /src/tsconfig.tsbuildinfo.readable.baseline.txt:: -CleanBuild: -{ - "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; };", - "affectsGlobalScope": true - }, - "./a.ts": { - "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", - "affectsGlobalScope": true - } - }, - "root": [ - [ - 2, - "./a.ts" - ] - ], - "options": { - "declaration": true, - "emitDeclarationOnly": true - }, - "semanticDiagnosticsPerFile": [ - [ - "./a.ts", - [ - { - "start": 6, - "length": 3, - "code": 2322, - "category": 1, - "messageText": "Type 'string' is not assignable to type 'number'." - } - ] - ] - ], - "version": "FakeTSVersion" -} -IncrementalBuild: -{ - "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; };", - "affectsGlobalScope": true - }, - "./a.ts": { - "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", - "affectsGlobalScope": true - } - }, - "root": [ - [ - 2, - "./a.ts" - ] - ], - "options": { - "declaration": true, - "emitDeclarationOnly": true, - "noCheck": true - }, - "version": "FakeTSVersion" -} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/noCheck/semantic-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noCheck/semantic-errors-with-incremental.js index fdb91d81de1ea..1c0fc9d140535 100644 --- a/tests/baselines/reference/tsbuild/noCheck/semantic-errors-with-incremental.js +++ b/tests/baselines/reference/tsbuild/noCheck/semantic-errors-with-incremental.js @@ -294,6 +294,64 @@ Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"6909448549-const err: number = \"error\";\nconst a = \"hello\"","signature":"-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true,"emitDeclarationOnly":true},"semanticDiagnosticsPerFile":[[2,[{"start":6,"length":3,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "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; };", + "affectsGlobalScope": true + }, + "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; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", + "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", + "affectsGlobalScope": true + }, + "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", + "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + 2, + "./a.ts" + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "start": 6, + "length": 3, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 970 +} + Change:: no-change-run @@ -305,7 +363,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/tsconfig.json' +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -334,8 +392,6 @@ Program files:: /src/a.ts Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts No shapes updated in the builder:: diff --git a/tests/baselines/reference/tsbuild/noCheck/semantic-errors.js b/tests/baselines/reference/tsbuild/noCheck/semantic-errors.js index 995bf5695f41f..e1ae89b9e9f35 100644 --- a/tests/baselines/reference/tsbuild/noCheck/semantic-errors.js +++ b/tests/baselines/reference/tsbuild/noCheck/semantic-errors.js @@ -70,12 +70,15 @@ declare const a: number; //// [/src/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./a.ts"],"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./a.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 45 } @@ -213,11 +216,23 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /lib/lib.d.ts (used version) -/src/a.ts (used version) +/src/a.ts (computed .d.ts during emit) -//// [/src/tsconfig.tsbuildinfo] file written with same contents -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/a.d.ts] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 59 +} + Change:: no-change-run @@ -229,7 +244,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/a.d.ts' is older than input 'src/tsconfig.json' +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -262,8 +277,9 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /lib/lib.d.ts (used version) -/src/a.ts (used version) +/src/a.ts (computed .d.ts during emit) +//// [/src/a.d.ts] file written with same contents //// [/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/noCheck/syntax-errors-with-incremental-discrepancies.js b/tests/baselines/reference/tsbuild/noCheck/syntax-errors-with-incremental-discrepancies.js deleted file mode 100644 index 7d42ea080cab5..0000000000000 --- a/tests/baselines/reference/tsbuild/noCheck/syntax-errors-with-incremental-discrepancies.js +++ /dev/null @@ -1,132 +0,0 @@ -3:: Disable noCheck -*** Needs explanation -TsBuild info text without affectedFilesPendingEmit:: /src/tsconfig.tsbuildinfo.readable.baseline.txt:: -CleanBuild: -{ - "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; };", - "affectsGlobalScope": true - }, - "./a.ts": { - "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", - "affectsGlobalScope": true - } - }, - "root": [ - [ - 2, - "./a.ts" - ] - ], - "options": { - "declaration": true, - "emitDeclarationOnly": true - }, - "semanticDiagnosticsPerFile": [ - [ - "./a.ts", - [ - { - "start": 6, - "length": 3, - "code": 2322, - "category": 1, - "messageText": "Type 'string' is not assignable to type 'number'." - } - ] - ] - ], - "version": "FakeTSVersion" -} -IncrementalBuild: -{ - "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; };", - "affectsGlobalScope": true - }, - "./a.ts": { - "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", - "affectsGlobalScope": true - } - }, - "root": [ - [ - 2, - "./a.ts" - ] - ], - "options": { - "declaration": true, - "emitDeclarationOnly": true, - "noCheck": true - }, - "version": "FakeTSVersion" -} -4:: no-change-run -*** Needs explanation -TsBuild info text without affectedFilesPendingEmit:: /src/tsconfig.tsbuildinfo.readable.baseline.txt:: -CleanBuild: -{ - "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; };", - "affectsGlobalScope": true - }, - "./a.ts": { - "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", - "affectsGlobalScope": true - } - }, - "root": [ - [ - 2, - "./a.ts" - ] - ], - "options": { - "declaration": true, - "emitDeclarationOnly": true - }, - "semanticDiagnosticsPerFile": [ - [ - "./a.ts", - [ - { - "start": 6, - "length": 3, - "code": 2322, - "category": 1, - "messageText": "Type 'string' is not assignable to type 'number'." - } - ] - ] - ], - "version": "FakeTSVersion" -} -IncrementalBuild: -{ - "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; };", - "affectsGlobalScope": true - }, - "./a.ts": { - "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", - "affectsGlobalScope": true - } - }, - "root": [ - [ - 2, - "./a.ts" - ] - ], - "options": { - "declaration": true, - "emitDeclarationOnly": true, - "noCheck": true - }, - "version": "FakeTSVersion" -} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/noCheck/syntax-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noCheck/syntax-errors-with-incremental.js index 7c77b1dfd6fb0..8c53c97a6152e 100644 --- a/tests/baselines/reference/tsbuild/noCheck/syntax-errors-with-incremental.js +++ b/tests/baselines/reference/tsbuild/noCheck/syntax-errors-with-incremental.js @@ -66,11 +66,18 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +//// [/src/a.d.ts] +declare const err: number; +declare const a = "hello"; + + //// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"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":false,"affectsGlobalScope":true},{"version":"8018408675-const err: number = \"error\";\nconst a = \"hello","signature":false,"affectsGlobalScope":true}],"root":[2],"options":{"declaration":true,"emitDeclarationOnly":true,"noCheck":true},"changeFileSet":[1,2],"version":"FakeTSVersion"} +{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"8018408675-const err: number = \"error\";\nconst a = \"hello","signature":"-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true,"emitDeclarationOnly":true,"noCheck":true},"semanticDiagnosticsPerFile":[1,2],"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -82,19 +89,20 @@ No shapes updated in the builder:: "../lib/lib.d.ts": { "original": { "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": false, "affectsGlobalScope": true }, "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; };", "affectsGlobalScope": true }, "./a.ts": { "original": { "version": "8018408675-const err: number = \"error\";\nconst a = \"hello", - "signature": false, + "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", "affectsGlobalScope": true }, "version": "8018408675-const err: number = \"error\";\nconst a = \"hello", + "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", "affectsGlobalScope": true } }, @@ -109,12 +117,18 @@ No shapes updated in the builder:: "emitDeclarationOnly": true, "noCheck": true }, - "changeFileSet": [ - "../lib/lib.d.ts", - "./a.ts" + "semanticDiagnosticsPerFile": [ + [ + "../lib/lib.d.ts", + "not cached" + ], + [ + "./a.ts", + "not cached" + ] ], "version": "FakeTSVersion", - "size": 804 + "size": 867 } @@ -128,7 +142,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -177,7 +191,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -203,15 +217,10 @@ Semantic diagnostics in builder refreshed for:: /src/a.ts Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) /src/a.ts (computed .d.ts) -//// [/src/a.d.ts] -declare const err: number; -declare const a = "hello"; - - +//// [/src/a.d.ts] file written with same contents //// [/src/tsconfig.tsbuildinfo] {"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"6909448549-const err: number = \"error\";\nconst a = \"hello\"","signature":"-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true,"emitDeclarationOnly":true,"noCheck":true},"version":"FakeTSVersion"} @@ -327,6 +336,64 @@ Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: +//// [/src/tsconfig.tsbuildinfo] +{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"6909448549-const err: number = \"error\";\nconst a = \"hello\"","signature":"-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true,"emitDeclarationOnly":true},"semanticDiagnosticsPerFile":[[2,[{"start":6,"length":3,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts" + ], + "fileInfos": { + "../lib/lib.d.ts": { + "original": { + "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; };", + "affectsGlobalScope": true + }, + "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; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", + "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", + "affectsGlobalScope": true + }, + "version": "6909448549-const err: number = \"error\";\nconst a = \"hello\"", + "signature": "-22441876417-declare const err: number;\ndeclare const a = \"hello\";\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + 2, + "./a.ts" + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./a.ts", + [ + { + "start": 6, + "length": 3, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "version": "FakeTSVersion", + "size": 970 +} + Change:: no-change-run @@ -338,7 +405,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/tsconfig.json' +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -367,8 +434,6 @@ Program files:: /src/a.ts Semantic diagnostics in builder refreshed for:: -/lib/lib.d.ts -/src/a.ts No shapes updated in the builder:: diff --git a/tests/baselines/reference/tsbuild/noCheck/syntax-errors.js b/tests/baselines/reference/tsbuild/noCheck/syntax-errors.js index e062329ca4e68..9c9d99d929691 100644 --- a/tests/baselines/reference/tsbuild/noCheck/syntax-errors.js +++ b/tests/baselines/reference/tsbuild/noCheck/syntax-errors.js @@ -65,16 +65,27 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +//// [/src/a.d.ts] +declare const err: number; +declare const a = "hello"; + + //// [/src/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./a.ts"],"errors":true,"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./a.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 59 } @@ -88,7 +99,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/a.d.ts' does not exist +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -118,9 +129,12 @@ Program files:: No cached semantic diagnostics in the builder:: -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (computed .d.ts during emit) +//// [/src/a.d.ts] file written with same contents //// [/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents @@ -138,7 +152,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -167,13 +181,19 @@ Shape signatures in builder refreshed for:: /src/a.ts (computed .d.ts during emit) -//// [/src/a.d.ts] -declare const err: number; -declare const a = "hello"; +//// [/src/a.d.ts] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts"],"version":"FakeTSVersion"} +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts" + ], + "version": "FakeTSVersion", + "size": 45 +} -//// [/src/tsconfig.tsbuildinfo] file written with same contents -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents Change:: no-change-run @@ -242,11 +262,23 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /lib/lib.d.ts (used version) -/src/a.ts (used version) +/src/a.ts (computed .d.ts during emit) -//// [/src/tsconfig.tsbuildinfo] file written with same contents -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/a.d.ts] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 59 +} + Change:: no-change-run @@ -258,7 +290,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/a.d.ts' is older than input 'src/tsconfig.json' +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -291,8 +323,9 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /lib/lib.d.ts (used version) -/src/a.ts (used version) +/src/a.ts (computed .d.ts during emit) +//// [/src/a.d.ts] file written with same contents //// [/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents diff --git a/tests/baselines/reference/tsbuild/noEmit/multiFile/semantic-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noEmit/multiFile/semantic-errors-with-incremental.js index 35c47cd2db4c9..7c704069bca98 100644 --- a/tests/baselines/reference/tsbuild/noEmit/multiFile/semantic-errors-with-incremental.js +++ b/tests/baselines/reference/tsbuild/noEmit/multiFile/semantic-errors-with-incremental.js @@ -138,7 +138,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -184,7 +184,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... diff --git a/tests/baselines/reference/tsbuild/noEmit/multiFile/semantic-errors.js b/tests/baselines/reference/tsbuild/noEmit/multiFile/semantic-errors.js index 3b985a2167f75..3e122d641dec3 100644 --- a/tests/baselines/reference/tsbuild/noEmit/multiFile/semantic-errors.js +++ b/tests/baselines/reference/tsbuild/noEmit/multiFile/semantic-errors.js @@ -68,12 +68,16 @@ Shape signatures in builder refreshed for:: //// [/src/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./a.ts"],"errors":true,"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./a.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 59 } @@ -87,7 +91,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/a.js' does not exist +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -138,7 +142,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -165,8 +169,18 @@ Shape signatures in builder refreshed for:: /src/a.ts (used version) -//// [/src/tsconfig.tsbuildinfo] file written with same contents -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts"],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts" + ], + "version": "FakeTSVersion", + "size": 45 +} + Change:: no-change-run diff --git a/tests/baselines/reference/tsbuild/noEmit/multiFile/syntax-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noEmit/multiFile/syntax-errors-with-incremental.js index 3a0c91f816aa1..d550181a434e6 100644 --- a/tests/baselines/reference/tsbuild/noEmit/multiFile/syntax-errors-with-incremental.js +++ b/tests/baselines/reference/tsbuild/noEmit/multiFile/syntax-errors-with-incremental.js @@ -59,13 +59,17 @@ Program files:: /lib/lib.d.ts /src/a.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (used version) //// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"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":false,"affectsGlobalScope":true},{"version":"2464268576-const a = \"hello","signature":false,"affectsGlobalScope":true}],"root":[2],"changeFileSet":[1,2],"version":"FakeTSVersion"} +{"fileNames":["../lib/lib.d.ts","./a.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"2464268576-const a = \"hello","affectsGlobalScope":true}],"root":[2],"affectedFilesPendingEmit":[2],"errors":true,"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -77,19 +81,19 @@ No shapes updated in the builder:: "../lib/lib.d.ts": { "original": { "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": false, "affectsGlobalScope": true }, "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; };", "affectsGlobalScope": true }, "./a.ts": { "original": { "version": "2464268576-const a = \"hello", - "signature": false, "affectsGlobalScope": true }, "version": "2464268576-const a = \"hello", + "signature": "2464268576-const a = \"hello", "affectsGlobalScope": true } }, @@ -99,12 +103,15 @@ No shapes updated in the builder:: "./a.ts" ] ], - "changeFileSet": [ - "../lib/lib.d.ts", - "./a.ts" + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js" + ] ], + "errors": true, "version": "FakeTSVersion", - "size": 699 + "size": 686 } @@ -118,7 +125,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -145,7 +152,7 @@ Program files:: /lib/lib.d.ts /src/a.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -164,7 +171,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -188,7 +195,6 @@ Semantic diagnostics in builder refreshed for:: /src/a.ts Shape signatures in builder refreshed for:: -/lib/lib.d.ts (used version) /src/a.ts (computed .d.ts) diff --git a/tests/baselines/reference/tsbuild/noEmit/multiFile/syntax-errors.js b/tests/baselines/reference/tsbuild/noEmit/multiFile/syntax-errors.js index e9c1bb7e9c140..800a070d74498 100644 --- a/tests/baselines/reference/tsbuild/noEmit/multiFile/syntax-errors.js +++ b/tests/baselines/reference/tsbuild/noEmit/multiFile/syntax-errors.js @@ -58,18 +58,26 @@ Program files:: /lib/lib.d.ts /src/a.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (used version) //// [/src/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./a.ts"],"errors":true,"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./a.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 59 } @@ -83,7 +91,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/a.js' does not exist +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -109,9 +117,13 @@ Program files:: /lib/lib.d.ts /src/a.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/a.ts (used version) //// [/src/tsconfig.tsbuildinfo] file written with same contents @@ -130,7 +142,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'src/tsconfig.tsbuildinfo' is older than input 'src/a.ts' +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -157,8 +169,18 @@ Shape signatures in builder refreshed for:: /src/a.ts (used version) -//// [/src/tsconfig.tsbuildinfo] file written with same contents -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/tsconfig.tsbuildinfo] +{"root":["./a.ts"],"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./a.ts" + ], + "version": "FakeTSVersion", + "size": 45 +} + Change:: no-change-run diff --git a/tests/baselines/reference/tsbuild/noEmit/outFile/semantic-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noEmit/outFile/semantic-errors-with-incremental.js index a67c6fbb2fffd..d46412c48c1ba 100644 --- a/tests/baselines/reference/tsbuild/noEmit/outFile/semantic-errors-with-incremental.js +++ b/tests/baselines/reference/tsbuild/noEmit/outFile/semantic-errors-with-incremental.js @@ -123,7 +123,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -170,7 +170,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... diff --git a/tests/baselines/reference/tsbuild/noEmit/outFile/semantic-errors.js b/tests/baselines/reference/tsbuild/noEmit/outFile/semantic-errors.js index 83e9095086c4d..43deb618adba6 100644 --- a/tests/baselines/reference/tsbuild/noEmit/outFile/semantic-errors.js +++ b/tests/baselines/reference/tsbuild/noEmit/outFile/semantic-errors.js @@ -68,12 +68,16 @@ No shapes updated in the builder:: //// [/outFile.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./src/a.ts"],"errors":true,"version":"FakeTSVersion"} //// [/outFile.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./src/a.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 63 } @@ -87,7 +91,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'outFile.js' does not exist +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -137,7 +141,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -163,8 +167,18 @@ Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: -//// [/outFile.tsbuildinfo] file written with same contents -//// [/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts"],"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts" + ], + "version": "FakeTSVersion", + "size": 49 +} + Change:: no-change-run diff --git a/tests/baselines/reference/tsbuild/noEmit/outFile/syntax-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noEmit/outFile/syntax-errors-with-incremental.js index 2fa25593708ba..477384425abf8 100644 --- a/tests/baselines/reference/tsbuild/noEmit/outFile/syntax-errors-with-incremental.js +++ b/tests/baselines/reference/tsbuild/noEmit/outFile/syntax-errors-with-incremental.js @@ -61,13 +61,15 @@ Program files:: /lib/lib.d.ts /src/a.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts No shapes updated in the builder:: //// [/outFile.tsbuildinfo] -{"fileNames":["./lib/lib.d.ts","./src/a.ts"],"fileInfos":["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; };","2464268576-const a = \"hello"],"root":[2],"options":{"outFile":"./outFile.js"},"changeFileSet":[1,2],"version":"FakeTSVersion"} +{"fileNames":["./lib/lib.d.ts","./src/a.ts"],"fileInfos":["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; };","2464268576-const a = \"hello"],"root":[2],"options":{"outFile":"./outFile.js"},"pendingEmit":false,"errors":true,"version":"FakeTSVersion"} //// [/outFile.tsbuildinfo.readable.baseline.txt] { @@ -88,12 +90,13 @@ No shapes updated in the builder:: "options": { "outFile": "./outFile.js" }, - "changeFileSet": [ - "./lib/lib.d.ts", - "./src/a.ts" + "pendingEmit": [ + "Js", + false ], + "errors": true, "version": "FakeTSVersion", - "size": 627 + "size": 639 } @@ -107,7 +110,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -135,7 +138,7 @@ Program files:: /lib/lib.d.ts /src/a.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -154,7 +157,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... diff --git a/tests/baselines/reference/tsbuild/noEmit/outFile/syntax-errors.js b/tests/baselines/reference/tsbuild/noEmit/outFile/syntax-errors.js index 996a799b3ca20..23f034b7d7544 100644 --- a/tests/baselines/reference/tsbuild/noEmit/outFile/syntax-errors.js +++ b/tests/baselines/reference/tsbuild/noEmit/outFile/syntax-errors.js @@ -60,18 +60,24 @@ Program files:: /lib/lib.d.ts /src/a.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts No shapes updated in the builder:: //// [/outFile.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./src/a.ts"],"errors":true,"version":"FakeTSVersion"} //// [/outFile.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./src/a.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 63 } @@ -85,7 +91,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'outFile.js' does not exist +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -112,7 +118,9 @@ Program files:: /lib/lib.d.ts /src/a.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts No shapes updated in the builder:: @@ -133,7 +141,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output 'outFile.tsbuildinfo' is older than input 'src/a.ts' +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -159,8 +167,18 @@ Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: -//// [/outFile.tsbuildinfo] file written with same contents -//// [/outFile.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/outFile.tsbuildinfo] +{"root":["./src/a.ts"],"version":"FakeTSVersion"} + +//// [/outFile.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./src/a.ts" + ], + "version": "FakeTSVersion", + "size": 49 +} + Change:: no-change-run diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/semantic-errors-with-declaration-with-incremental.js b/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/semantic-errors-with-declaration-with-incremental.js index a5a0b8265397e..455461d652675 100644 --- a/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/semantic-errors-with-declaration-with-incremental.js +++ b/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/semantic-errors-with-declaration-with-incremental.js @@ -198,7 +198,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -251,7 +251,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/semantic-errors-with-declaration.js b/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/semantic-errors-with-declaration.js index 9b3dabf893c22..354e556480dac 100644 --- a/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/semantic-errors-with-declaration.js +++ b/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/semantic-errors-with-declaration.js @@ -92,12 +92,18 @@ Shape signatures in builder refreshed for:: //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 109 } @@ -111,7 +117,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output file 'dev-build/shared/types/db.js' does not exist +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -173,7 +179,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -241,8 +247,20 @@ Object.defineProperty(exports, "__esModule", { value: true }); console.log("hi"); -//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] file written with same contents -//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "version": "FakeTSVersion", + "size": 95 +} + Change:: no-change-run diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/semantic-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/semantic-errors-with-incremental.js index 1cc3ba4595bd6..a4a9783dca1b7 100644 --- a/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/semantic-errors-with-incremental.js +++ b/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/semantic-errors-with-incremental.js @@ -195,7 +195,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -247,7 +247,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/semantic-errors.js b/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/semantic-errors.js index 1ec92de7c255c..e01edfc453a71 100644 --- a/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/semantic-errors.js +++ b/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/semantic-errors.js @@ -90,12 +90,18 @@ Shape signatures in builder refreshed for:: //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 109 } @@ -109,7 +115,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output file 'dev-build/shared/types/db.js' does not exist +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -170,7 +176,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -223,8 +229,20 @@ Object.defineProperty(exports, "__esModule", { value: true }); console.log("hi"); -//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] file written with same contents -//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "version": "FakeTSVersion", + "size": 95 +} + Change:: no-change-run diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/syntax-errors-with-declaration-with-incremental.js b/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/syntax-errors-with-declaration-with-incremental.js index fbbf2f34c9b96..3a1730ad40604 100644 --- a/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/syntax-errors-with-declaration-with-incremental.js +++ b/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/syntax-errors-with-declaration-with-incremental.js @@ -83,13 +83,21 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/noEmitOnError/shared/types/db.ts +/user/username/projects/noEmitOnError/src/main.ts +/user/username/projects/noEmitOnError/src/other.ts -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/noemitonerror/shared/types/db.ts (used version) +/user/username/projects/noemitonerror/src/main.ts (used version) +/user/username/projects/noemitonerror/src/other.ts (used version) //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"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":false,"affectsGlobalScope":true},{"version":"-5014788164-export interface A {\n name: string;\n}\n","signature":false},{"version":"-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","signature":false},{"version":"9084524823-console.log(\"hi\");\nexport { }\n","signature":false}],"root":[[2,4]],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"changeFileSet":[1,2,3,4],"version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"affectedFilesPendingEmit":[2,3,4],"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -108,32 +116,23 @@ No shapes updated in the builder:: "../../../../../a/lib/lib.d.ts": { "original": { "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": false, "affectsGlobalScope": true }, "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; };", "affectsGlobalScope": true }, "../shared/types/db.ts": { - "original": { - "version": "-5014788164-export interface A {\n name: string;\n}\n", - "signature": false - }, - "version": "-5014788164-export interface A {\n name: string;\n}\n" + "version": "-5014788164-export interface A {\n name: string;\n}\n", + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { - "original": { - "version": "-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n", - "signature": false - }, - "version": "-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n" + "version": "-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n", + "signature": "-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n" }, "../src/other.ts": { - "original": { - "version": "9084524823-console.log(\"hi\");\nexport { }\n", - "signature": false - }, - "version": "9084524823-console.log(\"hi\");\nexport { }\n" + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" } }, "root": [ @@ -159,14 +158,23 @@ No shapes updated in the builder:: "../shared/types/db.ts" ] }, - "changeFileSet": [ - "../../../../../a/lib/lib.d.ts", - "../shared/types/db.ts", - "../src/main.ts", - "../src/other.ts" + "affectedFilesPendingEmit": [ + [ + "../shared/types/db.ts", + "Js | Dts" + ], + [ + "../src/main.ts", + "Js | Dts" + ], + [ + "../src/other.ts", + "Js | Dts" + ] ], + "errors": true, "version": "FakeTSVersion", - "size": 1087 + "size": 1002 } @@ -180,7 +188,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -213,7 +221,7 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -235,7 +243,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -261,16 +269,10 @@ Program files:: /user/username/projects/noEmitOnError/src/other.ts Semantic diagnostics in builder refreshed for:: -/a/lib/lib.d.ts -/user/username/projects/noEmitOnError/shared/types/db.ts /user/username/projects/noEmitOnError/src/main.ts -/user/username/projects/noEmitOnError/src/other.ts Shape signatures in builder refreshed for:: -/a/lib/lib.d.ts (used version) -/user/username/projects/noemitonerror/shared/types/db.ts (computed .d.ts) /user/username/projects/noemitonerror/src/main.ts (computed .d.ts) -/user/username/projects/noemitonerror/src/other.ts (computed .d.ts) //// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.d.ts] diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/syntax-errors-with-declaration.js b/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/syntax-errors-with-declaration.js index c1d99fe8d4119..b8148b5ba9d46 100644 --- a/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/syntax-errors-with-declaration.js +++ b/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/syntax-errors-with-declaration.js @@ -81,18 +81,32 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/noEmitOnError/shared/types/db.ts +/user/username/projects/noEmitOnError/src/main.ts +/user/username/projects/noEmitOnError/src/other.ts -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/noemitonerror/shared/types/db.ts (used version) +/user/username/projects/noemitonerror/src/main.ts (used version) +/user/username/projects/noemitonerror/src/other.ts (used version) //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 109 } @@ -106,7 +120,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output file 'dev-build/shared/types/db.js' does not exist +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -138,9 +152,17 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/noEmitOnError/shared/types/db.ts +/user/username/projects/noEmitOnError/src/main.ts +/user/username/projects/noEmitOnError/src/other.ts -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/noemitonerror/shared/types/db.ts (used version) +/user/username/projects/noemitonerror/src/main.ts (used version) +/user/username/projects/noemitonerror/src/other.ts (used version) //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] file written with same contents @@ -162,7 +184,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -232,8 +254,20 @@ Object.defineProperty(exports, "__esModule", { value: true }); console.log("hi"); -//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] file written with same contents -//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "version": "FakeTSVersion", + "size": 95 +} + Change:: no-change-run diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/syntax-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/syntax-errors-with-incremental.js index bc411d62040e5..ca2c5aaa852f0 100644 --- a/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/syntax-errors-with-incremental.js +++ b/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/syntax-errors-with-incremental.js @@ -81,13 +81,21 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/noEmitOnError/shared/types/db.ts +/user/username/projects/noEmitOnError/src/main.ts +/user/username/projects/noEmitOnError/src/other.ts -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/noemitonerror/shared/types/db.ts (used version) +/user/username/projects/noemitonerror/src/main.ts (used version) +/user/username/projects/noemitonerror/src/other.ts (used version) //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"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":false,"affectsGlobalScope":true},{"version":"-5014788164-export interface A {\n name: string;\n}\n","signature":false},{"version":"-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","signature":false},{"version":"9084524823-console.log(\"hi\");\nexport { }\n","signature":false}],"root":[[2,4]],"options":{"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"changeFileSet":[1,2,3,4],"version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"affectedFilesPendingEmit":[2,3,4],"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -106,32 +114,23 @@ No shapes updated in the builder:: "../../../../../a/lib/lib.d.ts": { "original": { "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": false, "affectsGlobalScope": true }, "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; };", "affectsGlobalScope": true }, "../shared/types/db.ts": { - "original": { - "version": "-5014788164-export interface A {\n name: string;\n}\n", - "signature": false - }, - "version": "-5014788164-export interface A {\n name: string;\n}\n" + "version": "-5014788164-export interface A {\n name: string;\n}\n", + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { - "original": { - "version": "-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n", - "signature": false - }, - "version": "-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n" + "version": "-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n", + "signature": "-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n" }, "../src/other.ts": { - "original": { - "version": "9084524823-console.log(\"hi\");\nexport { }\n", - "signature": false - }, - "version": "9084524823-console.log(\"hi\");\nexport { }\n" + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" } }, "root": [ @@ -156,14 +155,23 @@ No shapes updated in the builder:: "../shared/types/db.ts" ] }, - "changeFileSet": [ - "../../../../../a/lib/lib.d.ts", - "../shared/types/db.ts", - "../src/main.ts", - "../src/other.ts" + "affectedFilesPendingEmit": [ + [ + "../shared/types/db.ts", + "Js" + ], + [ + "../src/main.ts", + "Js" + ], + [ + "../src/other.ts", + "Js" + ] ], + "errors": true, "version": "FakeTSVersion", - "size": 1068 + "size": 983 } @@ -177,7 +185,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -209,7 +217,7 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -231,7 +239,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -256,16 +264,10 @@ Program files:: /user/username/projects/noEmitOnError/src/other.ts Semantic diagnostics in builder refreshed for:: -/a/lib/lib.d.ts -/user/username/projects/noEmitOnError/shared/types/db.ts /user/username/projects/noEmitOnError/src/main.ts -/user/username/projects/noEmitOnError/src/other.ts Shape signatures in builder refreshed for:: -/a/lib/lib.d.ts (used version) -/user/username/projects/noemitonerror/shared/types/db.ts (computed .d.ts) /user/username/projects/noemitonerror/src/main.ts (computed .d.ts) -/user/username/projects/noemitonerror/src/other.ts (computed .d.ts) //// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] @@ -288,7 +290,7 @@ console.log("hi"); //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n",{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n"},{"version":"9084524823-console.log(\"hi\");\nexport { }\n","signature":"-3531856636-export {};\n"}],"root":[[2,4]],"options":{"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n",{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n"},"9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -326,12 +328,8 @@ console.log("hi"); "signature": "-3531856636-export {};\n" }, "../src/other.ts": { - "original": { - "version": "9084524823-console.log(\"hi\");\nexport { }\n", - "signature": "-3531856636-export {};\n" - }, "version": "9084524823-console.log(\"hi\");\nexport { }\n", - "signature": "-3531856636-export {};\n" + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" } }, "root": [ @@ -357,7 +355,7 @@ console.log("hi"); ] }, "version": "FakeTSVersion", - "size": 1035 + "size": 984 } diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/syntax-errors.js b/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/syntax-errors.js index cb5900966d5fd..461958f564b68 100644 --- a/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/syntax-errors.js +++ b/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/syntax-errors.js @@ -79,18 +79,32 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/noEmitOnError/shared/types/db.ts +/user/username/projects/noEmitOnError/src/main.ts +/user/username/projects/noEmitOnError/src/other.ts -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/noemitonerror/shared/types/db.ts (used version) +/user/username/projects/noemitonerror/src/main.ts (used version) +/user/username/projects/noemitonerror/src/other.ts (used version) //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 109 } @@ -104,7 +118,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output file 'dev-build/shared/types/db.js' does not exist +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -135,9 +149,17 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/noEmitOnError/shared/types/db.ts +/user/username/projects/noEmitOnError/src/main.ts +/user/username/projects/noEmitOnError/src/other.ts -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/noemitonerror/shared/types/db.ts (used version) +/user/username/projects/noemitonerror/src/main.ts (used version) +/user/username/projects/noemitonerror/src/other.ts (used version) //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] file written with same contents @@ -159,7 +181,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -214,8 +236,20 @@ Object.defineProperty(exports, "__esModule", { value: true }); console.log("hi"); -//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] file written with same contents -//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "version": "FakeTSVersion", + "size": 95 +} + Change:: no-change-run diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/outFile/semantic-errors-with-declaration-with-incremental.js b/tests/baselines/reference/tsbuild/noEmitOnError/outFile/semantic-errors-with-declaration-with-incremental.js index b7f8b8ad5c61e..c624df81ce305 100644 --- a/tests/baselines/reference/tsbuild/noEmitOnError/outFile/semantic-errors-with-declaration-with-incremental.js +++ b/tests/baselines/reference/tsbuild/noEmitOnError/outFile/semantic-errors-with-declaration-with-incremental.js @@ -160,7 +160,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -214,7 +214,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/outFile/semantic-errors-with-declaration.js b/tests/baselines/reference/tsbuild/noEmitOnError/outFile/semantic-errors-with-declaration.js index 7838a62c0097c..f2e1b3d67da43 100644 --- a/tests/baselines/reference/tsbuild/noEmitOnError/outFile/semantic-errors-with-declaration.js +++ b/tests/baselines/reference/tsbuild/noEmitOnError/outFile/semantic-errors-with-declaration.js @@ -90,12 +90,18 @@ No shapes updated in the builder:: //// [/user/username/projects/dev-build.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./noemitonerror/shared/types/db.ts", + "./noemitonerror/src/main.ts", + "./noemitonerror/src/other.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 148 } @@ -109,7 +115,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output file '../dev-build.js' does not exist +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -168,7 +174,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output '../dev-build.tsbuildinfo' is older than input 'src/main.ts' +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -231,8 +237,20 @@ define("src/other", ["require", "exports"], function (require, exports) { }); -//// [/user/username/projects/dev-build.tsbuildinfo] file written with same contents -//// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/dev-build.tsbuildinfo] +{"root":["./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"version":"FakeTSVersion"} + +//// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./noemitonerror/shared/types/db.ts", + "./noemitonerror/src/main.ts", + "./noemitonerror/src/other.ts" + ], + "version": "FakeTSVersion", + "size": 134 +} + Change:: no-change-run diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/outFile/semantic-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noEmitOnError/outFile/semantic-errors-with-incremental.js index a11a54cfc9e15..db20e8f828109 100644 --- a/tests/baselines/reference/tsbuild/noEmitOnError/outFile/semantic-errors-with-incremental.js +++ b/tests/baselines/reference/tsbuild/noEmitOnError/outFile/semantic-errors-with-incremental.js @@ -157,7 +157,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -210,7 +210,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/outFile/semantic-errors.js b/tests/baselines/reference/tsbuild/noEmitOnError/outFile/semantic-errors.js index 771809e0dddbd..4cf54059ae1da 100644 --- a/tests/baselines/reference/tsbuild/noEmitOnError/outFile/semantic-errors.js +++ b/tests/baselines/reference/tsbuild/noEmitOnError/outFile/semantic-errors.js @@ -88,12 +88,18 @@ No shapes updated in the builder:: //// [/user/username/projects/dev-build.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./noemitonerror/shared/types/db.ts", + "./noemitonerror/src/main.ts", + "./noemitonerror/src/other.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 148 } @@ -107,7 +113,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output file '../dev-build.js' does not exist +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -165,7 +171,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output '../dev-build.tsbuildinfo' is older than input 'src/main.ts' +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -215,8 +221,20 @@ define("src/other", ["require", "exports"], function (require, exports) { }); -//// [/user/username/projects/dev-build.tsbuildinfo] file written with same contents -//// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/dev-build.tsbuildinfo] +{"root":["./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"version":"FakeTSVersion"} + +//// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./noemitonerror/shared/types/db.ts", + "./noemitonerror/src/main.ts", + "./noemitonerror/src/other.ts" + ], + "version": "FakeTSVersion", + "size": 134 +} + Change:: no-change-run diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/outFile/syntax-errors-with-declaration-with-incremental.js b/tests/baselines/reference/tsbuild/noEmitOnError/outFile/syntax-errors-with-declaration-with-incremental.js index 49bd80b75284c..8f6385778744d 100644 --- a/tests/baselines/reference/tsbuild/noEmitOnError/outFile/syntax-errors-with-declaration-with-incremental.js +++ b/tests/baselines/reference/tsbuild/noEmitOnError/outFile/syntax-errors-with-declaration-with-incremental.js @@ -85,13 +85,17 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/noEmitOnError/shared/types/db.ts +/user/username/projects/noEmitOnError/src/main.ts +/user/username/projects/noEmitOnError/src/other.ts No shapes updated in the builder:: //// [/user/username/projects/dev-build.tsbuildinfo] -{"fileNames":["../../../a/lib/lib.d.ts","./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"fileInfos":["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; };","-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"declaration":true,"module":2,"noEmitOnError":true,"outFile":"./dev-build.js"},"changeFileSet":[1,2,3,4],"version":"FakeTSVersion"} +{"fileNames":["../../../a/lib/lib.d.ts","./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"fileInfos":["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; };","-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"declaration":true,"module":2,"noEmitOnError":true,"outFile":"./dev-build.js"},"pendingEmit":false,"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] { @@ -126,14 +130,13 @@ No shapes updated in the builder:: "noEmitOnError": true, "outFile": "./dev-build.js" }, - "changeFileSet": [ - "../../../a/lib/lib.d.ts", - "./noemitonerror/shared/types/db.ts", - "./noemitonerror/src/main.ts", - "./noemitonerror/src/other.ts" + "pendingEmit": [ + "Js | Dts", + false ], + "errors": true, "version": "FakeTSVersion", - "size": 954 + "size": 962 } @@ -147,7 +150,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -181,7 +184,7 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -203,7 +206,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/outFile/syntax-errors-with-declaration.js b/tests/baselines/reference/tsbuild/noEmitOnError/outFile/syntax-errors-with-declaration.js index bd4c1699aae6c..8f4568f6a33b3 100644 --- a/tests/baselines/reference/tsbuild/noEmitOnError/outFile/syntax-errors-with-declaration.js +++ b/tests/baselines/reference/tsbuild/noEmitOnError/outFile/syntax-errors-with-declaration.js @@ -83,18 +83,28 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/noEmitOnError/shared/types/db.ts +/user/username/projects/noEmitOnError/src/main.ts +/user/username/projects/noEmitOnError/src/other.ts No shapes updated in the builder:: //// [/user/username/projects/dev-build.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./noemitonerror/shared/types/db.ts", + "./noemitonerror/src/main.ts", + "./noemitonerror/src/other.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 148 } @@ -108,7 +118,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output file '../dev-build.js' does not exist +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -141,7 +151,11 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/noEmitOnError/shared/types/db.ts +/user/username/projects/noEmitOnError/src/main.ts +/user/username/projects/noEmitOnError/src/other.ts No shapes updated in the builder:: @@ -165,7 +179,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output '../dev-build.tsbuildinfo' is older than input 'src/main.ts' +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -230,8 +244,20 @@ define("src/other", ["require", "exports"], function (require, exports) { }); -//// [/user/username/projects/dev-build.tsbuildinfo] file written with same contents -//// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/dev-build.tsbuildinfo] +{"root":["./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"version":"FakeTSVersion"} + +//// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./noemitonerror/shared/types/db.ts", + "./noemitonerror/src/main.ts", + "./noemitonerror/src/other.ts" + ], + "version": "FakeTSVersion", + "size": 134 +} + Change:: no-change-run diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/outFile/syntax-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noEmitOnError/outFile/syntax-errors-with-incremental.js index 5c3fc9ec0f84e..0f0c3899853b0 100644 --- a/tests/baselines/reference/tsbuild/noEmitOnError/outFile/syntax-errors-with-incremental.js +++ b/tests/baselines/reference/tsbuild/noEmitOnError/outFile/syntax-errors-with-incremental.js @@ -83,13 +83,17 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/noEmitOnError/shared/types/db.ts +/user/username/projects/noEmitOnError/src/main.ts +/user/username/projects/noEmitOnError/src/other.ts No shapes updated in the builder:: //// [/user/username/projects/dev-build.tsbuildinfo] -{"fileNames":["../../../a/lib/lib.d.ts","./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"fileInfos":["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; };","-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"module":2,"noEmitOnError":true,"outFile":"./dev-build.js"},"changeFileSet":[1,2,3,4],"version":"FakeTSVersion"} +{"fileNames":["../../../a/lib/lib.d.ts","./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"fileInfos":["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; };","-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"module":2,"noEmitOnError":true,"outFile":"./dev-build.js"},"pendingEmit":false,"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] { @@ -123,14 +127,13 @@ No shapes updated in the builder:: "noEmitOnError": true, "outFile": "./dev-build.js" }, - "changeFileSet": [ - "../../../a/lib/lib.d.ts", - "./noemitonerror/shared/types/db.ts", - "./noemitonerror/src/main.ts", - "./noemitonerror/src/other.ts" + "pendingEmit": [ + "Js", + false ], + "errors": true, "version": "FakeTSVersion", - "size": 935 + "size": 943 } @@ -144,7 +147,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -177,7 +180,7 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -199,7 +202,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/outFile/syntax-errors.js b/tests/baselines/reference/tsbuild/noEmitOnError/outFile/syntax-errors.js index 003922dc45706..9173f367aaaa3 100644 --- a/tests/baselines/reference/tsbuild/noEmitOnError/outFile/syntax-errors.js +++ b/tests/baselines/reference/tsbuild/noEmitOnError/outFile/syntax-errors.js @@ -81,18 +81,28 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/noEmitOnError/shared/types/db.ts +/user/username/projects/noEmitOnError/src/main.ts +/user/username/projects/noEmitOnError/src/other.ts No shapes updated in the builder:: //// [/user/username/projects/dev-build.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./noemitonerror/shared/types/db.ts", + "./noemitonerror/src/main.ts", + "./noemitonerror/src/other.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 148 } @@ -106,7 +116,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output file '../dev-build.js' does not exist +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -138,7 +148,11 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/noEmitOnError/shared/types/db.ts +/user/username/projects/noEmitOnError/src/main.ts +/user/username/projects/noEmitOnError/src/other.ts No shapes updated in the builder:: @@ -162,7 +176,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * tsconfig.json -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output '../dev-build.tsbuildinfo' is older than input 'src/main.ts' +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -214,8 +228,20 @@ define("src/other", ["require", "exports"], function (require, exports) { }); -//// [/user/username/projects/dev-build.tsbuildinfo] file written with same contents -//// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/dev-build.tsbuildinfo] +{"root":["./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"version":"FakeTSVersion"} + +//// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./noemitonerror/shared/types/db.ts", + "./noemitonerror/src/main.ts", + "./noemitonerror/src/other.ts" + ], + "version": "FakeTSVersion", + "size": 134 +} + Change:: no-change-run diff --git a/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-command-line-incremental-flag-changes-between-non-dts-changes-discrepancies.js b/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-command-line-incremental-flag-changes-between-non-dts-changes-discrepancies.js index ac621a21c13f0..b71b1e5f6b27d 100644 --- a/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-command-line-incremental-flag-changes-between-non-dts-changes-discrepancies.js +++ b/tests/baselines/reference/tsbuild/outFile/rebuilds-completely-when-command-line-incremental-flag-changes-between-non-dts-changes-discrepancies.js @@ -4,6 +4,9 @@ The incremental build does not build third so will only update timestamps for th TsBuild info text without affectedFilesPendingEmit:: /src/third/thirdjs/output/third-output.tsbuildinfo.readable.baseline.txt:: CleanBuild: { + "root": [ + "../../third_part1.ts" + ], "version": "FakeTSVersion" } IncrementalBuild: diff --git a/tests/baselines/reference/tsbuild/outFile/tsbuildinfo-is-not-generated-when-incremental-is-set-to-false.js b/tests/baselines/reference/tsbuild/outFile/tsbuildinfo-is-not-generated-when-incremental-is-set-to-false.js index 48e224f002393..8b4f9c63c5b39 100644 --- a/tests/baselines/reference/tsbuild/outFile/tsbuildinfo-is-not-generated-when-incremental-is-set-to-false.js +++ b/tests/baselines/reference/tsbuild/outFile/tsbuildinfo-is-not-generated-when-incremental-is-set-to-false.js @@ -316,11 +316,14 @@ c.doSomething(); {"version":3,"file":"third-output.js","sourceRoot":"","sources":["../../third_part1.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,CAAC,CAAC,WAAW,EAAE,CAAC"} //// [/src/third/thirdjs/output/third-output.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../../third_part1.ts"],"version":"FakeTSVersion"} //// [/src/third/thirdjs/output/third-output.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../../third_part1.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 59 } diff --git a/tests/baselines/reference/tsbuild/outFile/when-final-project-is-not-composite-but-uses-project-references.js b/tests/baselines/reference/tsbuild/outFile/when-final-project-is-not-composite-but-uses-project-references.js index a28a36233a09b..46ec7f432feff 100644 --- a/tests/baselines/reference/tsbuild/outFile/when-final-project-is-not-composite-but-uses-project-references.js +++ b/tests/baselines/reference/tsbuild/outFile/when-final-project-is-not-composite-but-uses-project-references.js @@ -1036,12 +1036,15 @@ sourceFile:../../third_part1.ts >>>//# sourceMappingURL=third-output.js.map //// [/src/third/thirdjs/output/third-output.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../../third_part1.ts"],"version":"FakeTSVersion"} //// [/src/third/thirdjs/output/third-output.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../../third_part1.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 59 } diff --git a/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-not-specified.js b/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-not-specified.js index bce1d500378d1..0d9fccaf289b3 100644 --- a/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-not-specified.js +++ b/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-not-specified.js @@ -47,12 +47,15 @@ exports.x = 10; //// [/src/dist/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../src/index.ts"],"version":"FakeTSVersion"} //// [/src/dist/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../src/index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 54 } diff --git a/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified-but-not-all-files-belong-to-rootDir-and-is-composite.js b/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified-but-not-all-files-belong-to-rootDir-and-is-composite.js index 48dbd665a14b4..b306ec35b3f00 100644 --- a/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified-but-not-all-files-belong-to-rootDir-and-is-composite.js +++ b/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified-but-not-all-files-belong-to-rootDir-and-is-composite.js @@ -51,8 +51,19 @@ Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +//// [/src/dist/index.d.ts] +export declare const x = 10; + + +//// [/src/dist/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + + //// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./src/index.ts","./types/type.ts"],"fileInfos":[{"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":false,"affectsGlobalScope":true},{"version":"-10726455937-export const x = 10;","signature":false},{"version":"-4885977236-export type t = string;","signature":false}],"root":[2,3],"options":{"composite":true,"outDir":"./dist","rootDir":"./src"},"changeFileSet":[1,2,3],"version":"FakeTSVersion"} +{"fileNames":["../lib/lib.d.ts","./src/index.ts","./types/type.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n"},{"version":"-4885977236-export type t = string;","signature":"-6618426122-export type t = string;\n"}],"root":[2,3],"options":{"composite":true,"outDir":"./dist","rootDir":"./src"},"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./types/type.d.ts","version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -65,25 +76,27 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped "../lib/lib.d.ts": { "original": { "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": false, "affectsGlobalScope": true }, "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; };", "affectsGlobalScope": true }, "./src/index.ts": { "original": { "version": "-10726455937-export const x = 10;", - "signature": false + "signature": "-6821242887-export declare const x = 10;\n" }, - "version": "-10726455937-export const x = 10;" + "version": "-10726455937-export const x = 10;", + "signature": "-6821242887-export declare const x = 10;\n" }, "./types/type.ts": { "original": { "version": "-4885977236-export type t = string;", - "signature": false + "signature": "-6618426122-export type t = string;\n" }, - "version": "-4885977236-export type t = string;" + "version": "-4885977236-export type t = string;", + "signature": "-6618426122-export type t = string;\n" } }, "root": [ @@ -101,15 +114,34 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped "outDir": "./dist", "rootDir": "./src" }, - "changeFileSet": [ - "../lib/lib.d.ts", - "./src/index.ts", - "./types/type.ts" + "semanticDiagnosticsPerFile": [ + [ + "../lib/lib.d.ts", + "not cached" + ], + [ + "./src/index.ts", + "not cached" + ], + [ + "./types/type.ts", + "not cached" + ] ], + "latestChangedDtsFile": "./types/type.d.ts", "version": "FakeTSVersion", - "size": 841 + "size": 952 } +//// [/src/types/type.d.ts] +export type t = string; + + +//// [/src/types/type.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + Change:: no-change-run @@ -121,7 +153,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -153,94 +185,3 @@ Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated -//// [/src/dist/index.d.ts] -export declare const x = 10; - - -//// [/src/dist/index.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.x = void 0; -exports.x = 10; - - -//// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./src/index.ts","./types/type.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n"},{"version":"-4885977236-export type t = string;","signature":"-6618426122-export type t = string;\n"}],"root":[2,3],"options":{"composite":true,"outDir":"./dist","rootDir":"./src"},"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./types/type.d.ts","version":"FakeTSVersion"} - -//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] -{ - "fileNames": [ - "../lib/lib.d.ts", - "./src/index.ts", - "./types/type.ts" - ], - "fileInfos": { - "../lib/lib.d.ts": { - "original": { - "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; };", - "affectsGlobalScope": true - }, - "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; };", - "affectsGlobalScope": true - }, - "./src/index.ts": { - "original": { - "version": "-10726455937-export const x = 10;", - "signature": "-6821242887-export declare const x = 10;\n" - }, - "version": "-10726455937-export const x = 10;", - "signature": "-6821242887-export declare const x = 10;\n" - }, - "./types/type.ts": { - "original": { - "version": "-4885977236-export type t = string;", - "signature": "-6618426122-export type t = string;\n" - }, - "version": "-4885977236-export type t = string;", - "signature": "-6618426122-export type t = string;\n" - } - }, - "root": [ - [ - 2, - "./src/index.ts" - ], - [ - 3, - "./types/type.ts" - ] - ], - "options": { - "composite": true, - "outDir": "./dist", - "rootDir": "./src" - }, - "semanticDiagnosticsPerFile": [ - [ - "../lib/lib.d.ts", - "not cached or not changed" - ], - [ - "./src/index.ts", - "not cached or not changed" - ], - [ - "./types/type.ts", - "not cached or not changed" - ] - ], - "latestChangedDtsFile": "./types/type.d.ts", - "version": "FakeTSVersion", - "size": 952 -} - -//// [/src/types/type.d.ts] -export type t = string; - - -//// [/src/types/type.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); - - diff --git a/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified-but-not-all-files-belong-to-rootDir.js b/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified-but-not-all-files-belong-to-rootDir.js index 3cad3bc542e9f..20e5ed1770261 100644 --- a/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified-but-not-all-files-belong-to-rootDir.js +++ b/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified-but-not-all-files-belong-to-rootDir.js @@ -50,15 +50,32 @@ Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +//// [/src/dist/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + + //// [/src/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./src/index.ts","./types/type.ts"],"errors":true,"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./src/index.ts", + "./types/type.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 85 } +//// [/src/types/type.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + Change:: no-change-run @@ -70,7 +87,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/tsconfig.json -[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because output file 'src/dist/index.js' does not exist +[HH:MM:SS AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/tsconfig.json'... @@ -84,8 +101,10 @@ Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +//// [/src/dist/index.js] file written with same contents //// [/src/tsconfig.tsbuildinfo] file written with same contents //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/src/types/type.js] file written with same contents Change:: Normal build without change, that does not block emit on error to show files that get emitted @@ -104,15 +123,5 @@ Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated -//// [/src/dist/index.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.x = void 0; -exports.x = 10; - - -//// [/src/types/type.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); - - +//// [/src/dist/index.js] file written with same contents +//// [/src/types/type.js] file written with same contents diff --git a/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified.js b/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified.js index d32d67ac7beab..85089b5559ec8 100644 --- a/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified.js +++ b/tests/baselines/reference/tsbuild/outputPaths/when-rootDir-is-specified.js @@ -48,12 +48,15 @@ exports.x = 10; //// [/src/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./src/index.ts"],"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./src/index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 53 } diff --git a/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-error-for-same-tsbuildinfo-file-because-no-rootDir-in-the-base.js b/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-error-for-same-tsbuildinfo-file-because-no-rootDir-in-the-base.js index 425e9907171ac..38e3ad12cba3d 100644 --- a/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-error-for-same-tsbuildinfo-file-because-no-rootDir-in-the-base.js +++ b/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-error-for-same-tsbuildinfo-file-because-no-rootDir-in-the-base.js @@ -82,12 +82,36 @@ Output:: 6 }   ~~~~~ +[HH:MM:SS AM] Updating unchanged output timestamps of project '/src/src/main/tsconfig.json'... + Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +//// [/src/dist/a.d.ts] +export {}; + + +//// [/src/dist/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var b_1 = require("./b"); +var a = b_1.b; + + +//// [/src/dist/b.d.ts] +export declare const b = 0; + + +//// [/src/dist/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 0; + + //// [/src/dist/other.d.ts] export declare const Other = 0; diff --git a/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-error-for-same-tsbuildinfo-file-without-incremental.js b/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-error-for-same-tsbuildinfo-file-without-incremental.js index c5036c5e846a4..7b7fa36e14edf 100644 --- a/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-error-for-same-tsbuildinfo-file-without-incremental.js +++ b/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-error-for-same-tsbuildinfo-file-without-incremental.js @@ -87,12 +87,28 @@ Output:: 8 }   ~~~~~ +[HH:MM:SS AM] Updating unchanged output timestamps of project '/src/src/main/tsconfig.json'... + Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +//// [/src/dist/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var b_1 = require("./b"); +var a = b_1.b; + + +//// [/src/dist/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 0; + + //// [/src/dist/other.d.ts] export declare const Other = 0; diff --git a/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-error-for-same-tsbuildinfo-file.js b/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-error-for-same-tsbuildinfo-file.js index 28c7caf91f123..b466455cf4224 100644 --- a/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-error-for-same-tsbuildinfo-file.js +++ b/tests/baselines/reference/tsbuild/projectReferenceWithRootDirInParent/reports-error-for-same-tsbuildinfo-file.js @@ -88,12 +88,36 @@ Output:: 9 }   ~~~~~ +[HH:MM:SS AM] Updating unchanged output timestamps of project '/src/src/main/tsconfig.json'... + Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +//// [/src/dist/a.d.ts] +export {}; + + +//// [/src/dist/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var b_1 = require("./b"); +var a = b_1.b; + + +//// [/src/dist/b.d.ts] +export declare const b = 0; + + +//// [/src/dist/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 0; + + //// [/src/dist/other.d.ts] export declare const Other = 0; @@ -175,9 +199,16 @@ Output:: 9 }   ~~~~~ +[HH:MM:SS AM] Updating unchanged output timestamps of project '/src/src/main/tsconfig.json'... + Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +//// [/src/dist/a.d.ts] file written with same contents +//// [/src/dist/a.js] file written with same contents +//// [/src/dist/b.d.ts] file written with same contents +//// [/src/dist/b.js] file written with same contents +//// [/src/dist/tsconfig.tsbuildinfo] file changed its modified time diff --git a/tests/baselines/reference/tsbuild/resolveJsonModule/files-containing-json-file-non-composite.js b/tests/baselines/reference/tsbuild/resolveJsonModule/files-containing-json-file-non-composite.js index bf765d0d9cba9..933949e5fff3d 100644 --- a/tests/baselines/reference/tsbuild/resolveJsonModule/files-containing-json-file-non-composite.js +++ b/tests/baselines/reference/tsbuild/resolveJsonModule/files-containing-json-file-non-composite.js @@ -83,11 +83,15 @@ exports.default = hello_json_1.default.hello; //// [/src/dist/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../src/index.ts","../src/hello.json"],"version":"FakeTSVersion"} //// [/src/dist/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../src/index.ts", + "../src/hello.json" + ], "version": "FakeTSVersion", - "size": 27 + "size": 74 } diff --git a/tests/baselines/reference/tsbuild/resolveJsonModule/include-and-files-non-composite.js b/tests/baselines/reference/tsbuild/resolveJsonModule/include-and-files-non-composite.js index 227cf3a8ecb46..05b45abba64d6 100644 --- a/tests/baselines/reference/tsbuild/resolveJsonModule/include-and-files-non-composite.js +++ b/tests/baselines/reference/tsbuild/resolveJsonModule/include-and-files-non-composite.js @@ -85,11 +85,15 @@ exports.default = hello_json_1.default.hello; //// [/src/dist/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../src/hello.json","../src/index.ts"],"version":"FakeTSVersion"} //// [/src/dist/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../src/hello.json", + "../src/index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 74 } diff --git a/tests/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-and-file-name-matches-ts-file-non-composite.js b/tests/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-and-file-name-matches-ts-file-non-composite.js index 9fad201bf2367..14725addcc082 100644 --- a/tests/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-and-file-name-matches-ts-file-non-composite.js +++ b/tests/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-and-file-name-matches-ts-file-non-composite.js @@ -83,11 +83,15 @@ exports.default = index_json_1.default.hello; //// [/src/dist/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../src/index.ts","../src/index.json"],"version":"FakeTSVersion"} //// [/src/dist/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../src/index.ts", + "../src/index.json" + ], "version": "FakeTSVersion", - "size": 27 + "size": 74 } diff --git a/tests/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-non-composite.js b/tests/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-non-composite.js index 68f74b7af8cb6..f1d5c55de2c94 100644 --- a/tests/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-non-composite.js +++ b/tests/baselines/reference/tsbuild/resolveJsonModule/include-of-json-along-with-other-include-non-composite.js @@ -83,11 +83,15 @@ exports.default = hello_json_1.default.hello; //// [/src/dist/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../src/index.ts","../src/hello.json"],"version":"FakeTSVersion"} //// [/src/dist/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../src/index.ts", + "../src/hello.json" + ], "version": "FakeTSVersion", - "size": 27 + "size": 74 } diff --git a/tests/baselines/reference/tsbuild/resolveJsonModule/include-only-non-composite.js b/tests/baselines/reference/tsbuild/resolveJsonModule/include-only-non-composite.js index abff1d8104d0b..d60ca4de7b366 100644 --- a/tests/baselines/reference/tsbuild/resolveJsonModule/include-only-non-composite.js +++ b/tests/baselines/reference/tsbuild/resolveJsonModule/include-only-non-composite.js @@ -81,11 +81,14 @@ exports.default = hello_json_1.default.hello; //// [/src/dist/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../src/index.ts"],"version":"FakeTSVersion"} //// [/src/dist/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../src/index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 54 } diff --git a/tests/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-not-in-rootDir-non-composite.js b/tests/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-not-in-rootDir-non-composite.js index 68cf7b6f6457e..dd87a8dcaeb1f 100644 --- a/tests/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-not-in-rootDir-non-composite.js +++ b/tests/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-not-in-rootDir-non-composite.js @@ -75,11 +75,14 @@ exports.default = hello_json_1.default.hello; //// [/src/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./src/index.ts"],"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./src/index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 53 } diff --git a/tests/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-without-rootDir-but-outside-configDirectory-non-composite.js b/tests/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-without-rootDir-but-outside-configDirectory-non-composite.js index 57945f6252715..0a5381f249bac 100644 --- a/tests/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-without-rootDir-but-outside-configDirectory-non-composite.js +++ b/tests/baselines/reference/tsbuild/resolveJsonModule/include-only-with-json-without-rootDir-but-outside-configDirectory-non-composite.js @@ -55,14 +55,14 @@ Output:: TSFILE: /src/dist/hello.json TSFILE: /src/dist/src/src/index.js TSFILE: /src/dist/tsconfig.tsbuildinfo -[HH:MM:SS AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... - lib/lib.d.ts Default library for target 'es5' hello.json Imported via "../../hello.json" from file 'src/src/index.ts' src/src/index.ts Matched by include pattern 'src/**/*' in 'src/tsconfig.json' +[HH:MM:SS AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... + exitCode:: ExitStatus.Success @@ -83,11 +83,14 @@ exports.default = hello_json_1.default.hello; //// [/src/dist/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../src/index.ts"],"version":"FakeTSVersion"} //// [/src/dist/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../src/index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 54 } diff --git a/tests/baselines/reference/tsbuild/resolveJsonModule/include-only-without-outDir-non-composite.js b/tests/baselines/reference/tsbuild/resolveJsonModule/include-only-without-outDir-non-composite.js index 17c9999524709..cf80e650583ab 100644 --- a/tests/baselines/reference/tsbuild/resolveJsonModule/include-only-without-outDir-non-composite.js +++ b/tests/baselines/reference/tsbuild/resolveJsonModule/include-only-without-outDir-non-composite.js @@ -73,11 +73,14 @@ exports.default = hello_json_1.default.hello; //// [/src/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./src/index.ts"],"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./src/index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 53 } diff --git a/tests/baselines/reference/tsbuild/resolveJsonModule/include-only.js b/tests/baselines/reference/tsbuild/resolveJsonModule/include-only.js index d26b218e5cfe6..d38f6738d9c69 100644 --- a/tests/baselines/reference/tsbuild/resolveJsonModule/include-only.js +++ b/tests/baselines/reference/tsbuild/resolveJsonModule/include-only.js @@ -58,6 +58,9 @@ Output:: 1 import hello from "./hello.json"    ~~~~~~~~~~~~~~ +TSFILE: /src/dist/src/hello.json +TSFILE: /src/dist/src/index.js +TSFILE: /src/dist/src/index.d.ts TSFILE: /src/dist/tsconfig.tsbuildinfo lib/lib.d.ts Default library for target 'es5' @@ -71,8 +74,29 @@ Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +//// [/src/dist/src/hello.json] +{ + "hello": "world" +} + + +//// [/src/dist/src/index.d.ts] +declare const _default: string; +export default _default; + + +//// [/src/dist/src/index.js] +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var hello_json_1 = __importDefault(require("./hello.json")); +exports.default = hello_json_1.default.hello; + + //// [/src/dist/tsconfig.tsbuildinfo] -{"fileNames":["../../lib/lib.d.ts","../src/hello.json","../src/index.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},"6651571919-{\n \"hello\": \"world\"\n}","-6443385642-import hello from \"./hello.json\"\nexport default hello.hello\n"],"root":[3],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"affectedFilesPendingEmit":[2,3],"emitSignatures":[3],"version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.d.ts","../src/hello.json","../src/index.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},"6651571919-{\n \"hello\": \"world\"\n}",{"version":"-6443385642-import hello from \"./hello.json\"\nexport default hello.hello\n","signature":"6785192742-declare const _default: string;\nexport default _default;\n"}],"root":[3],"options":{"allowSyntheticDefaultImports":true,"composite":true,"esModuleInterop":true,"module":1,"outDir":"./","skipDefaultLibCheck":true},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/index.d.ts","errors":true,"version":"FakeTSVersion"} //// [/src/dist/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -101,8 +125,12 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped "signature": "6651571919-{\n \"hello\": \"world\"\n}" }, "../src/index.ts": { + "original": { + "version": "-6443385642-import hello from \"./hello.json\"\nexport default hello.hello\n", + "signature": "6785192742-declare const _default: string;\nexport default _default;\n" + }, "version": "-6443385642-import hello from \"./hello.json\"\nexport default hello.hello\n", - "signature": "-6443385642-import hello from \"./hello.json\"\nexport default hello.hello\n" + "signature": "6785192742-declare const _default: string;\nexport default _default;\n" } }, "root": [ @@ -124,20 +152,9 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped "../src/hello.json" ] }, - "affectedFilesPendingEmit": [ - [ - "../src/hello.json", - "Js | Dts" - ], - [ - "../src/index.ts", - "Js | Dts" - ] - ], - "emitSignatures": [ - "../src/index.ts" - ], + "latestChangedDtsFile": "./src/index.d.ts", + "errors": true, "version": "FakeTSVersion", - "size": 963 + "size": 1062 } diff --git a/tests/baselines/reference/tsbuild/resolveJsonModule/sourcemap-non-composite.js b/tests/baselines/reference/tsbuild/resolveJsonModule/sourcemap-non-composite.js index cc163f4f74de8..5973bb53c7be6 100644 --- a/tests/baselines/reference/tsbuild/resolveJsonModule/sourcemap-non-composite.js +++ b/tests/baselines/reference/tsbuild/resolveJsonModule/sourcemap-non-composite.js @@ -55,8 +55,8 @@ Output:: [HH:MM:SS AM] Building project '/src/tsconfig.json'... TSFILE: /src/dist/hello.json -TSFILE: /src/dist/index.js.map TSFILE: /src/dist/index.js +TSFILE: /src/dist/index.js.map TSFILE: /src/dist/tsconfig.tsbuildinfo lib/lib.d.ts Default library for target 'es5' @@ -88,12 +88,16 @@ exports.default = hello_json_1.default.hello; {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,4DAAgC;AAChC,kBAAe,oBAAK,CAAC,KAAK,CAAA"} //// [/src/dist/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../src/index.ts","../src/hello.json"],"version":"FakeTSVersion"} //// [/src/dist/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../src/index.ts", + "../src/hello.json" + ], "version": "FakeTSVersion", - "size": 27 + "size": 74 } diff --git a/tests/baselines/reference/tsbuild/resolveJsonModule/sourcemap.js b/tests/baselines/reference/tsbuild/resolveJsonModule/sourcemap.js index ea3696e065f1e..79a0658d17004 100644 --- a/tests/baselines/reference/tsbuild/resolveJsonModule/sourcemap.js +++ b/tests/baselines/reference/tsbuild/resolveJsonModule/sourcemap.js @@ -56,8 +56,8 @@ Output:: [HH:MM:SS AM] Building project '/src/tsconfig.json'... TSFILE: /src/dist/src/hello.json -TSFILE: /src/dist/src/index.js.map TSFILE: /src/dist/src/index.js +TSFILE: /src/dist/src/index.js.map TSFILE: /src/dist/src/index.d.ts TSFILE: /src/dist/tsconfig.tsbuildinfo lib/lib.d.ts diff --git a/tests/baselines/reference/tsbuild/resolveJsonModule/without-outDir-non-composite.js b/tests/baselines/reference/tsbuild/resolveJsonModule/without-outDir-non-composite.js index 76dc113cfc649..50d0344fb4f50 100644 --- a/tests/baselines/reference/tsbuild/resolveJsonModule/without-outDir-non-composite.js +++ b/tests/baselines/reference/tsbuild/resolveJsonModule/without-outDir-non-composite.js @@ -75,12 +75,16 @@ exports.default = hello_json_1.default.hello; //// [/src/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./src/index.ts","./src/hello.json"],"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./src/index.ts", + "./src/hello.json" + ], "version": "FakeTSVersion", - "size": 27 + "size": 72 } diff --git a/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-project-is-not-composite-or-doesnt-have-any-references.js b/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-project-is-not-composite-or-doesnt-have-any-references.js index 9b28560946e83..701fcdcbcd5c7 100644 --- a/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-project-is-not-composite-or-doesnt-have-any-references.js +++ b/tests/baselines/reference/tsbuild/sample1/builds-correctly-when-project-is-not-composite-or-doesnt-have-any-references.js @@ -143,11 +143,16 @@ function multiply(a, b) { return a * b; } //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./anothermodule.ts","./index.ts","./some_decl.d.ts"],"version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 89 } diff --git a/tests/baselines/reference/tsbuild/sample1/does-not-build-downstream-projects-if-upstream-projects-have-errors.js b/tests/baselines/reference/tsbuild/sample1/does-not-build-downstream-projects-if-upstream-projects-have-errors.js index e0eb2299a8acc..bfc7dff7e260f 100644 --- a/tests/baselines/reference/tsbuild/sample1/does-not-build-downstream-projects-if-upstream-projects-have-errors.js +++ b/tests/baselines/reference/tsbuild/sample1/does-not-build-downstream-projects-if-upstream-projects-have-errors.js @@ -231,8 +231,30 @@ function multiply(a, b) { return a * b; } "size": 1380 } +//// [/user/username/projects/sample1/logic/index.d.ts] +export declare function getSecondsInDay(): any; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + + +//// [/user/username/projects/sample1/logic/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +var c = require("../core/index"); +function getSecondsInDay() { + return c.muitply(); +} +var mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map + +//// [/user/username/projects/sample1/logic/index.js.map] +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AACA,0CAEC;AAHD,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC;AACvB,CAAC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} + //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileIdsList":[[2,3]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n","-11192027815-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.muitply();\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n"],"root":[4],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"semanticDiagnosticsPerFile":[[4,[{"start":85,"length":7,"code":2339,"category":1,"messageText":"Property 'muitply' does not exist on type 'typeof import(\"/user/username/projects/sample1/core/index\")'."}]]],"affectedFilesPendingEmit":[4],"emitSignatures":[4],"version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileIdsList":[[2,3]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n",{"version":"-11192027815-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.muitply();\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n","signature":"-5620866737-export declare function getSecondsInDay(): any;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"root":[4],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"semanticDiagnosticsPerFile":[[4,[{"start":85,"length":7,"code":2339,"category":1,"messageText":"Property 'muitply' does not exist on type 'typeof import(\"/user/username/projects/sample1/core/index\")'."}]]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -267,8 +289,12 @@ function multiply(a, b) { return a * b; } "signature": "-9234818176-export declare const World = \"hello\";\n" }, "./index.ts": { + "original": { + "version": "-11192027815-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.muitply();\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n", + "signature": "-5620866737-export declare function getSecondsInDay(): any;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + }, "version": "-11192027815-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.muitply();\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n", - "signature": "-11192027815-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.muitply();\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n" + "signature": "-5620866737-export declare function getSecondsInDay(): any;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" } }, "root": [ @@ -303,17 +329,9 @@ function multiply(a, b) { return a * b; } ] ] ], - "affectedFilesPendingEmit": [ - [ - "./index.ts", - "Js | JsMap | Dts" - ] - ], - "emitSignatures": [ - "./index.ts" - ], + "latestChangedDtsFile": "./index.d.ts", "version": "FakeTSVersion", - "size": 1469 + "size": 1627 } @@ -331,7 +349,7 @@ Output:: [HH:MM:SS AM] Project 'core/tsconfig.json' is up to date because newest input 'core/anotherModule.ts' is older than output 'core/tsconfig.tsbuildinfo' -[HH:MM:SS AM] Project 'logic/tsconfig.json' is out of date because buildinfo file 'logic/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'logic/tsconfig.json' is out of date because buildinfo file 'logic/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/sample1/logic/tsconfig.json'... diff --git a/tests/baselines/reference/tsbuild/sample1/listEmittedFiles.js b/tests/baselines/reference/tsbuild/sample1/listEmittedFiles.js index 98e31910dcbcf..579a85bfda8ab 100644 --- a/tests/baselines/reference/tsbuild/sample1/listEmittedFiles.js +++ b/tests/baselines/reference/tsbuild/sample1/listEmittedFiles.js @@ -99,14 +99,14 @@ export const m = mod; Output:: /a/lib/tsc --b tests --listEmittedFiles TSFILE: /user/username/projects/sample1/core/anotherModule.js -TSFILE: /user/username/projects/sample1/core/anotherModule.d.ts.map TSFILE: /user/username/projects/sample1/core/anotherModule.d.ts +TSFILE: /user/username/projects/sample1/core/anotherModule.d.ts.map TSFILE: /user/username/projects/sample1/core/index.js -TSFILE: /user/username/projects/sample1/core/index.d.ts.map TSFILE: /user/username/projects/sample1/core/index.d.ts +TSFILE: /user/username/projects/sample1/core/index.d.ts.map TSFILE: /user/username/projects/sample1/core/tsconfig.tsbuildinfo -TSFILE: /user/username/projects/sample1/logic/index.js.map TSFILE: /user/username/projects/sample1/logic/index.js +TSFILE: /user/username/projects/sample1/logic/index.js.map TSFILE: /user/username/projects/sample1/logic/index.d.ts TSFILE: /user/username/projects/sample1/logic/tsconfig.tsbuildinfo TSFILE: /user/username/projects/sample1/tests/index.js @@ -421,11 +421,11 @@ export class someClass { } Output:: /a/lib/tsc --b tests --listEmittedFiles TSFILE: /user/username/projects/sample1/core/index.js -TSFILE: /user/username/projects/sample1/core/index.d.ts.map TSFILE: /user/username/projects/sample1/core/index.d.ts +TSFILE: /user/username/projects/sample1/core/index.d.ts.map TSFILE: /user/username/projects/sample1/core/tsconfig.tsbuildinfo -TSFILE: /user/username/projects/sample1/logic/index.js.map TSFILE: /user/username/projects/sample1/logic/index.js +TSFILE: /user/username/projects/sample1/logic/index.js.map TSFILE: /user/username/projects/sample1/logic/tsconfig.tsbuildinfo TSFILE: /user/username/projects/sample1/tests/index.js TSFILE: /user/username/projects/sample1/tests/tsconfig.tsbuildinfo diff --git a/tests/baselines/reference/tsbuild/sample1/reports-error-if-input-file-is-missing-with-force.js b/tests/baselines/reference/tsbuild/sample1/reports-error-if-input-file-is-missing-with-force.js index bf9e0a8485b6d..fd276d26c1421 100644 --- a/tests/baselines/reference/tsbuild/sample1/reports-error-if-input-file-is-missing-with-force.js +++ b/tests/baselines/reference/tsbuild/sample1/reports-error-if-input-file-is-missing-with-force.js @@ -129,8 +129,25 @@ Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +//// [/user/username/projects/sample1/core/index.d.ts] +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; + + +//// [/user/username/projects/sample1/core/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } + + //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"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":false,"affectsGlobalScope":true},{"version":"-15745098553-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n","signature":false},{"version":"-7959511260-declare const dts: any;","signature":false,"affectsGlobalScope":true}],"root":[2,3],"options":{"composite":true},"changeFileSet":[1,2,3],"version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-15745098553-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"},{"version":"-7959511260-declare const dts: any;","affectsGlobalScope":true}],"root":[2,3],"options":{"composite":true},"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -143,26 +160,27 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped "../../../../../a/lib/lib.d.ts": { "original": { "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": false, "affectsGlobalScope": true }, "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; };", "affectsGlobalScope": true }, "./index.ts": { "original": { "version": "-15745098553-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n", - "signature": false + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" }, - "version": "-15745098553-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n" + "version": "-15745098553-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" }, "./some_decl.d.ts": { "original": { "version": "-7959511260-declare const dts: any;", - "signature": false, "affectsGlobalScope": true }, "version": "-7959511260-declare const dts: any;", + "signature": "-7959511260-declare const dts: any;", "affectsGlobalScope": true } }, @@ -179,12 +197,22 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped "options": { "composite": true }, - "changeFileSet": [ - "../../../../../a/lib/lib.d.ts", - "./index.ts", - "./some_decl.d.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../../../../a/lib/lib.d.ts", + "not cached" + ], + [ + "./index.ts", + "not cached" + ], + [ + "./some_decl.d.ts", + "not cached" + ] ], + "latestChangedDtsFile": "./index.d.ts", "version": "FakeTSVersion", - "size": 1005 + "size": 1200 } diff --git a/tests/baselines/reference/tsbuild/sample1/reports-error-if-input-file-is-missing.js b/tests/baselines/reference/tsbuild/sample1/reports-error-if-input-file-is-missing.js index be20eeb7992bc..41597404931c9 100644 --- a/tests/baselines/reference/tsbuild/sample1/reports-error-if-input-file-is-missing.js +++ b/tests/baselines/reference/tsbuild/sample1/reports-error-if-input-file-is-missing.js @@ -129,8 +129,25 @@ Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +//// [/user/username/projects/sample1/core/index.d.ts] +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; + + +//// [/user/username/projects/sample1/core/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } + + //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"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":false,"affectsGlobalScope":true},{"version":"-15745098553-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n","signature":false},{"version":"-7959511260-declare const dts: any;","signature":false,"affectsGlobalScope":true}],"root":[2,3],"options":{"composite":true},"changeFileSet":[1,2,3],"version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-15745098553-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"},{"version":"-7959511260-declare const dts: any;","affectsGlobalScope":true}],"root":[2,3],"options":{"composite":true},"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -143,26 +160,27 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped "../../../../../a/lib/lib.d.ts": { "original": { "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": false, "affectsGlobalScope": true }, "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; };", "affectsGlobalScope": true }, "./index.ts": { "original": { "version": "-15745098553-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n", - "signature": false + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" }, - "version": "-15745098553-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n" + "version": "-15745098553-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" }, "./some_decl.d.ts": { "original": { "version": "-7959511260-declare const dts: any;", - "signature": false, "affectsGlobalScope": true }, "version": "-7959511260-declare const dts: any;", + "signature": "-7959511260-declare const dts: any;", "affectsGlobalScope": true } }, @@ -179,12 +197,22 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped "options": { "composite": true }, - "changeFileSet": [ - "../../../../../a/lib/lib.d.ts", - "./index.ts", - "./some_decl.d.ts" + "semanticDiagnosticsPerFile": [ + [ + "../../../../../a/lib/lib.d.ts", + "not cached" + ], + [ + "./index.ts", + "not cached" + ], + [ + "./some_decl.d.ts", + "not cached" + ] ], + "latestChangedDtsFile": "./index.d.ts", "version": "FakeTSVersion", - "size": 1005 + "size": 1200 } diff --git a/tests/baselines/reference/tsbuild/transitiveReferences/builds-correctly-when-the-referenced-project-uses-different-module-resolution.js b/tests/baselines/reference/tsbuild/transitiveReferences/builds-correctly-when-the-referenced-project-uses-different-module-resolution.js index 9a2439c82efc9..b3d3b24b2989b 100644 --- a/tests/baselines/reference/tsbuild/transitiveReferences/builds-correctly-when-the-referenced-project-uses-different-module-resolution.js +++ b/tests/baselines/reference/tsbuild/transitiveReferences/builds-correctly-when-the-referenced-project-uses-different-module-resolution.js @@ -237,11 +237,14 @@ a_1.X; } //// [/user/username/projects/transitiveReferences/tsconfig.c.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./c.ts"],"version":"FakeTSVersion"} //// [/user/username/projects/transitiveReferences/tsconfig.c.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./c.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 45 } diff --git a/tests/baselines/reference/tsbuild/transitiveReferences/builds-correctly.js b/tests/baselines/reference/tsbuild/transitiveReferences/builds-correctly.js index 01245e2d78b21..1b1b51c0b14d6 100644 --- a/tests/baselines/reference/tsbuild/transitiveReferences/builds-correctly.js +++ b/tests/baselines/reference/tsbuild/transitiveReferences/builds-correctly.js @@ -243,11 +243,14 @@ a_1.X; } //// [/user/username/projects/transitiveReferences/tsconfig.c.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./c.ts"],"version":"FakeTSVersion"} //// [/user/username/projects/transitiveReferences/tsconfig.c.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./c.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 45 } diff --git a/tests/baselines/reference/tsbuild/transitiveReferences/reports-error-about-module-not-found-with-node-resolution-with-external-module-name.js b/tests/baselines/reference/tsbuild/transitiveReferences/reports-error-about-module-not-found-with-node-resolution-with-external-module-name.js index 5170858d12186..960585cbc318d 100644 --- a/tests/baselines/reference/tsbuild/transitiveReferences/reports-error-about-module-not-found-with-node-resolution-with-external-module-name.js +++ b/tests/baselines/reference/tsbuild/transitiveReferences/reports-error-about-module-not-found-with-node-resolution-with-external-module-name.js @@ -117,6 +117,18 @@ var A = /** @class */ (function () { exports.A = A; +//// [/user/username/projects/transitiveReferences/b.d.ts] +export declare const b: any; + + +//// [/user/username/projects/transitiveReferences/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +var a_1 = require("a"); +exports.b = new a_1.A(); + + //// [/user/username/projects/transitiveReferences/tsconfig.a.tsbuildinfo] {"fileNames":["../../../../a/lib/lib.d.ts","./a.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-7808316224-export class A {}\n","signature":"-8728835846-export declare class A {\n}\n"}],"root":[2],"options":{"composite":true},"latestChangedDtsFile":"./a.d.ts","version":"FakeTSVersion"} @@ -160,7 +172,7 @@ exports.A = A; } //// [/user/username/projects/transitiveReferences/tsconfig.b.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./b.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},"-17186364832-import {A} from 'a';\nexport const b = new A();"],"root":[2],"options":{"composite":true},"semanticDiagnosticsPerFile":[[2,[{"start":16,"length":3,"messageText":"Cannot find module 'a' or its corresponding type declarations.","category":1,"code":2307}]]],"affectedFilesPendingEmit":[2],"emitSignatures":[2],"version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./b.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-17186364832-import {A} from 'a';\nexport const b = new A();","signature":"-5666291609-export declare const b: any;\n"}],"root":[2],"options":{"composite":true},"semanticDiagnosticsPerFile":[[2,[{"start":16,"length":3,"messageText":"Cannot find module 'a' or its corresponding type declarations.","category":1,"code":2307}]]],"latestChangedDtsFile":"./b.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/transitiveReferences/tsconfig.b.tsbuildinfo.readable.baseline.txt] { @@ -179,8 +191,12 @@ exports.A = A; "affectsGlobalScope": true }, "./b.ts": { + "original": { + "version": "-17186364832-import {A} from 'a';\nexport const b = new A();", + "signature": "-5666291609-export declare const b: any;\n" + }, "version": "-17186364832-import {A} from 'a';\nexport const b = new A();", - "signature": "-17186364832-import {A} from 'a';\nexport const b = new A();" + "signature": "-5666291609-export declare const b: any;\n" } }, "root": [ @@ -206,16 +222,8 @@ exports.A = A; ] ] ], - "affectedFilesPendingEmit": [ - [ - "./b.ts", - "Js | Dts" - ] - ], - "emitSignatures": [ - "./b.ts" - ], + "latestChangedDtsFile": "./b.d.ts", "version": "FakeTSVersion", - "size": 892 + "size": 943 } diff --git a/tests/baselines/reference/tsbuildWatch/configFileErrors/multiFile/reports-syntax-errors-in-config-file.js b/tests/baselines/reference/tsbuildWatch/configFileErrors/multiFile/reports-syntax-errors-in-config-file.js index fe8f456aebf0c..6951816fee027 100644 --- a/tests/baselines/reference/tsbuildWatch/configFileErrors/multiFile/reports-syntax-errors-in-config-file.js +++ b/tests/baselines/reference/tsbuildWatch/configFileErrors/multiFile/reports-syntax-errors-in-config-file.js @@ -45,8 +45,30 @@ Output:: +//// [/user/username/projects/myproject/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.foo = foo; +function foo() { } + + +//// [/user/username/projects/myproject/a.d.ts] +export declare function foo(): void; + + +//// [/user/username/projects/myproject/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.bar = bar; +function bar() { } + + +//// [/user/username/projects/myproject/b.d.ts] +export declare function bar(): void; + + //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","signature":false,"affectsGlobalScope":true},{"version":"4646078106-export function foo() { }","signature":false},{"version":"1045484683-export function bar() { }","signature":false}],"root":[2,3],"options":{"composite":true},"changeFileSet":[1,2,3],"version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},{"version":"4646078106-export function foo() { }","signature":"-5677608893-export declare function foo(): void;\n"},{"version":"1045484683-export function bar() { }","signature":"-2904461644-export declare function bar(): void;\n"}],"root":[2,3],"options":{"composite":true},"latestChangedDtsFile":"./b.d.ts","errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -59,25 +81,27 @@ Output:: "../../../../a/lib/lib.d.ts": { "original": { "version": "-7698705165-/// \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; }", - "signature": false, "affectsGlobalScope": true }, "version": "-7698705165-/// \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; }", + "signature": "-7698705165-/// \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; }", "affectsGlobalScope": true }, "./a.ts": { "original": { "version": "4646078106-export function foo() { }", - "signature": false + "signature": "-5677608893-export declare function foo(): void;\n" }, - "version": "4646078106-export function foo() { }" + "version": "4646078106-export function foo() { }", + "signature": "-5677608893-export declare function foo(): void;\n" }, "./b.ts": { "original": { "version": "1045484683-export function bar() { }", - "signature": false + "signature": "-2904461644-export declare function bar(): void;\n" }, - "version": "1045484683-export function bar() { }" + "version": "1045484683-export function bar() { }", + "signature": "-2904461644-export declare function bar(): void;\n" } }, "root": [ @@ -93,13 +117,10 @@ Output:: "options": { "composite": true }, - "changeFileSet": [ - "../../../../a/lib/lib.d.ts", - "./a.ts", - "./b.ts" - ], + "latestChangedDtsFile": "./b.d.ts", + "errors": true, "version": "FakeTSVersion", - "size": 723 + "size": 823 } @@ -127,9 +148,15 @@ Program files:: /user/username/projects/myproject/a.ts /user/username/projects/myproject/b.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/myproject/a.ts +/user/username/projects/myproject/b.ts -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/myproject/a.ts (computed .d.ts during emit) +/user/username/projects/myproject/b.ts (computed .d.ts during emit) exitCode:: ExitStatus.undefined @@ -189,7 +216,7 @@ Program files:: /user/username/projects/myproject/a.ts /user/username/projects/myproject/b.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -223,8 +250,19 @@ Output:: +//// [/user/username/projects/myproject/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fooBar = fooBar; +function fooBar() { } + + +//// [/user/username/projects/myproject/a.d.ts] +export declare function fooBar(): void; + + //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","signature":false,"affectsGlobalScope":true},{"version":"-3260843409-export function fooBar() { }","signature":false},{"version":"1045484683-export function bar() { }","signature":false}],"root":[2,3],"options":{"composite":true,"declaration":true},"changeFileSet":[1,2,3],"version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},{"version":"-3260843409-export function fooBar() { }","signature":"-6611919720-export declare function fooBar(): void;\n"},{"version":"1045484683-export function bar() { }","signature":"-2904461644-export declare function bar(): void;\n"}],"root":[2,3],"options":{"composite":true,"declaration":true},"latestChangedDtsFile":"./a.d.ts","errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -237,25 +275,27 @@ Output:: "../../../../a/lib/lib.d.ts": { "original": { "version": "-7698705165-/// \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; }", - "signature": false, "affectsGlobalScope": true }, "version": "-7698705165-/// \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; }", + "signature": "-7698705165-/// \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; }", "affectsGlobalScope": true }, "./a.ts": { "original": { "version": "-3260843409-export function fooBar() { }", - "signature": false + "signature": "-6611919720-export declare function fooBar(): void;\n" }, - "version": "-3260843409-export function fooBar() { }" + "version": "-3260843409-export function fooBar() { }", + "signature": "-6611919720-export declare function fooBar(): void;\n" }, "./b.ts": { "original": { "version": "1045484683-export function bar() { }", - "signature": false + "signature": "-2904461644-export declare function bar(): void;\n" }, - "version": "1045484683-export function bar() { }" + "version": "1045484683-export function bar() { }", + "signature": "-2904461644-export declare function bar(): void;\n" } }, "root": [ @@ -272,13 +312,10 @@ Output:: "composite": true, "declaration": true }, - "changeFileSet": [ - "../../../../a/lib/lib.d.ts", - "./a.ts", - "./b.ts" - ], + "latestChangedDtsFile": "./a.d.ts", + "errors": true, "version": "FakeTSVersion", - "size": 746 + "size": 849 } @@ -300,9 +337,11 @@ Program files:: /user/username/projects/myproject/a.ts /user/username/projects/myproject/b.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/user/username/projects/myproject/a.ts -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/user/username/projects/myproject/a.ts (computed .d.ts) exitCode:: ExitStatus.undefined @@ -351,7 +390,7 @@ Program files:: /user/username/projects/myproject/a.ts /user/username/projects/myproject/b.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -390,7 +429,7 @@ Output:: //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},{"version":"-3260843409-export function fooBar() { }","signature":"-6611919720-export declare function fooBar(): void;\n"},{"version":"1045484683-export function bar() { }","signature":"-2904461644-export declare function bar(): void;\n"}],"root":[2,3],"options":{"composite":true,"declaration":true},"latestChangedDtsFile":"./b.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},{"version":"-3260843409-export function fooBar() { }","signature":"-6611919720-export declare function fooBar(): void;\n"},{"version":"1045484683-export function bar() { }","signature":"-2904461644-export declare function bar(): void;\n"}],"root":[2,3],"options":{"composite":true,"declaration":true},"latestChangedDtsFile":"./a.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -440,33 +479,11 @@ Output:: "composite": true, "declaration": true }, - "latestChangedDtsFile": "./b.d.ts", + "latestChangedDtsFile": "./a.d.ts", "version": "FakeTSVersion", "size": 835 } -//// [/user/username/projects/myproject/a.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.fooBar = fooBar; -function fooBar() { } - - -//// [/user/username/projects/myproject/a.d.ts] -export declare function fooBar(): void; - - -//// [/user/username/projects/myproject/b.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.bar = bar; -function bar() { } - - -//// [/user/username/projects/myproject/b.d.ts] -export declare function bar(): void; - - Program root files: [ @@ -487,13 +504,7 @@ Program files:: /user/username/projects/myproject/b.ts Semantic diagnostics in builder refreshed for:: -/a/lib/lib.d.ts -/user/username/projects/myproject/a.ts -/user/username/projects/myproject/b.ts -Shape signatures in builder refreshed for:: -/a/lib/lib.d.ts (used version) -/user/username/projects/myproject/a.ts (computed .d.ts) -/user/username/projects/myproject/b.ts (computed .d.ts) +No shapes updated in the builder:: exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsbuildWatch/configFileErrors/outFile/reports-syntax-errors-in-config-file.js b/tests/baselines/reference/tsbuildWatch/configFileErrors/outFile/reports-syntax-errors-in-config-file.js index 77d06485949b1..18a0010266462 100644 --- a/tests/baselines/reference/tsbuildWatch/configFileErrors/outFile/reports-syntax-errors-in-config-file.js +++ b/tests/baselines/reference/tsbuildWatch/configFileErrors/outFile/reports-syntax-errors-in-config-file.js @@ -48,8 +48,32 @@ Output:: +//// [/user/username/projects/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.foo = foo; + function foo() { } +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.bar = bar; + function bar() { } +}); + + +//// [/user/username/projects/outFile.d.ts] +declare module "a" { + export function foo(): void; +} +declare module "b" { + export function bar(): void; +} + + //// [/user/username/projects/outFile.tsbuildinfo] -{"fileNames":["../../../a/lib/lib.d.ts","./myproject/a.ts","./myproject/b.ts"],"fileInfos":["-7698705165-/// \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; }","4646078106-export function foo() { }","1045484683-export function bar() { }"],"root":[2,3],"options":{"composite":true,"module":2,"outFile":"./outFile.js"},"changeFileSet":[1,2,3],"version":"FakeTSVersion"} +{"fileNames":["../../../a/lib/lib.d.ts","./myproject/a.ts","./myproject/b.ts"],"fileInfos":["-7698705165-/// \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; }","4646078106-export function foo() { }","1045484683-export function bar() { }"],"root":[2,3],"options":{"composite":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-5340070911-declare module \"a\" {\n export function foo(): void;\n}\ndeclare module \"b\" {\n export function bar(): void;\n}\n","latestChangedDtsFile":"./outFile.d.ts","errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -78,13 +102,11 @@ Output:: "module": 2, "outFile": "./outFile.js" }, - "changeFileSet": [ - "../../../a/lib/lib.d.ts", - "./myproject/a.ts", - "./myproject/b.ts" - ], + "outSignature": "-5340070911-declare module \"a\" {\n export function foo(): void;\n}\ndeclare module \"b\" {\n export function bar(): void;\n}\n", + "latestChangedDtsFile": "./outFile.d.ts", + "errors": true, "version": "FakeTSVersion", - "size": 660 + "size": 842 } @@ -114,7 +136,10 @@ Program files:: /user/username/projects/myproject/a.ts /user/username/projects/myproject/b.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/myproject/a.ts +/user/username/projects/myproject/b.ts No shapes updated in the builder:: @@ -181,7 +206,7 @@ Program files:: /user/username/projects/myproject/a.ts /user/username/projects/myproject/b.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -215,8 +240,32 @@ Output:: +//// [/user/username/projects/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.fooBar = fooBar; + function fooBar() { } +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.bar = bar; + function bar() { } +}); + + +//// [/user/username/projects/outFile.d.ts] +declare module "a" { + export function fooBar(): void; +} +declare module "b" { + export function bar(): void; +} + + //// [/user/username/projects/outFile.tsbuildinfo] -{"fileNames":["../../../a/lib/lib.d.ts","./myproject/a.ts","./myproject/b.ts"],"fileInfos":["-7698705165-/// \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; }","-3260843409-export function fooBar() { }","1045484683-export function bar() { }"],"root":[2,3],"options":{"composite":true,"declaration":true,"module":2,"outFile":"./outFile.js"},"changeFileSet":[1,2,3],"version":"FakeTSVersion"} +{"fileNames":["../../../a/lib/lib.d.ts","./myproject/a.ts","./myproject/b.ts"],"fileInfos":["-7698705165-/// \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; }","-3260843409-export function fooBar() { }","1045484683-export function bar() { }"],"root":[2,3],"options":{"composite":true,"declaration":true,"module":2,"outFile":"./outFile.js"},"outSignature":"771185302-declare module \"a\" {\n export function fooBar(): void;\n}\ndeclare module \"b\" {\n export function bar(): void;\n}\n","latestChangedDtsFile":"./outFile.d.ts","errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -246,13 +295,11 @@ Output:: "module": 2, "outFile": "./outFile.js" }, - "changeFileSet": [ - "../../../a/lib/lib.d.ts", - "./myproject/a.ts", - "./myproject/b.ts" - ], + "outSignature": "771185302-declare module \"a\" {\n export function fooBar(): void;\n}\ndeclare module \"b\" {\n export function bar(): void;\n}\n", + "latestChangedDtsFile": "./outFile.d.ts", + "errors": true, "version": "FakeTSVersion", - "size": 683 + "size": 866 } @@ -276,7 +323,10 @@ Program files:: /user/username/projects/myproject/a.ts /user/username/projects/myproject/b.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/myproject/a.ts +/user/username/projects/myproject/b.ts No shapes updated in the builder:: @@ -329,7 +379,7 @@ Program files:: /user/username/projects/myproject/a.ts /user/username/projects/myproject/b.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -406,30 +456,6 @@ Output:: "size": 852 } -//// [/user/username/projects/outFile.js] -define("a", ["require", "exports"], function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.fooBar = fooBar; - function fooBar() { } -}); -define("b", ["require", "exports"], function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.bar = bar; - function bar() { } -}); - - -//// [/user/username/projects/outFile.d.ts] -declare module "a" { - export function fooBar(): void; -} -declare module "b" { - export function bar(): void; -} - - Program root files: [ @@ -452,9 +478,6 @@ Program files:: /user/username/projects/myproject/b.ts Semantic diagnostics in builder refreshed for:: -/a/lib/lib.d.ts -/user/username/projects/myproject/a.ts -/user/username/projects/myproject/b.ts No shapes updated in the builder:: diff --git a/tests/baselines/reference/tsbuildWatch/demo/updates-with-bad-reference.js b/tests/baselines/reference/tsbuildWatch/demo/updates-with-bad-reference.js index 421d2139404e2..1c82773f2993f 100644 --- a/tests/baselines/reference/tsbuildWatch/demo/updates-with-bad-reference.js +++ b/tests/baselines/reference/tsbuildWatch/demo/updates-with-bad-reference.js @@ -219,8 +219,80 @@ Output:: +//// [/user/username/projects/demo/animals/animal.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/user/username/projects/demo/animals/animal.d.ts] +export type Size = "small" | "medium" | "large"; +export default interface Animal { + size: Size; +} + + +//// [/user/username/projects/demo/animals/dog.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createDog = createDog; +var utilities_1 = require("../core/utilities"); +function createDog() { + return ({ + size: "medium", + woof: function () { + console.log("".concat(this.name, " says \"Woof\"!")); + }, + name: (0, utilities_1.makeRandomName)() + }); +} + + +//// [/user/username/projects/demo/animals/dog.d.ts] +import Animal from '.'; +export interface Dog extends Animal { + woof(): void; + name: string; +} +export declare function createDog(): Dog; + + +//// [/user/username/projects/demo/animals/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createDog = void 0; +var dog_1 = require("./dog"); +Object.defineProperty(exports, "createDog", { enumerable: true, get: function () { return dog_1.createDog; } }); + + +//// [/user/username/projects/demo/animals/index.d.ts] +import Animal from './animal'; +export default Animal; +import { createDog, Dog } from './dog'; +export { createDog, Dog }; + + +//// [/user/username/projects/demo/lib/core/utilities.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.makeRandomName = makeRandomName; +exports.lastElementOf = lastElementOf; +function makeRandomName() { + return "Bob!?! "; +} +function lastElementOf(arr) { + if (arr.length === 0) + return undefined; + return arr[arr.length - 1]; +} + + +//// [/user/username/projects/demo/lib/core/utilities.d.ts] +export declare function makeRandomName(): string; +export declare function lastElementOf(arr: T[]): T | undefined; + + //// [/user/username/projects/demo/lib/core/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../../a/lib/lib.d.ts","../../animals/animal.ts","../../animals/dog.ts","../../animals/index.ts","../../core/utilities.ts"],"fileIdsList":[[4,5],[2,3],[4]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-9289341318-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n","-18870194049-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}\n","-7220553464-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n","-22163106409-import * as A from '../animals';\nexport function makeRandomName() {\n return \"Bob!?! \";\n}\n\nexport function lastElementOf(arr: T[]): T | undefined {\n if (arr.length === 0) return undefined;\n return arr[arr.length - 1];\n}\n"],"root":[5],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../core","strict":true,"target":1},"referencedMap":[[3,1],[4,2],[5,3]],"semanticDiagnosticsPerFile":[[5,[{"start":0,"length":32,"messageText":"'A' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true}]]],"affectedFilesPendingEmit":[2,3,4,5],"emitSignatures":[2,3,4,5],"version":"FakeTSVersion"} +{"fileNames":["../../../../../../a/lib/lib.d.ts","../../animals/animal.ts","../../animals/dog.ts","../../animals/index.ts","../../core/utilities.ts"],"fileIdsList":[[4,5],[2,3],[4]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-9289341318-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n",{"version":"-18870194049-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}\n","signature":"6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n"},{"version":"-7220553464-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n","signature":"1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n"},{"version":"-22163106409-import * as A from '../animals';\nexport function makeRandomName() {\n return \"Bob!?! \";\n}\n\nexport function lastElementOf(arr: T[]): T | undefined {\n if (arr.length === 0) return undefined;\n return arr[arr.length - 1];\n}\n","signature":"-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n"}],"root":[5],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../core","strict":true,"target":1},"referencedMap":[[3,1],[4,2],[5,3]],"semanticDiagnosticsPerFile":[[5,[{"start":0,"length":32,"messageText":"'A' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true}]]],"latestChangedDtsFile":"./utilities.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/demo/lib/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -259,16 +331,28 @@ Output:: "signature": "-9289341318-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n" }, "../../animals/dog.ts": { + "original": { + "version": "-18870194049-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}\n", + "signature": "6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n" + }, "version": "-18870194049-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}\n", - "signature": "-18870194049-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}\n" + "signature": "6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n" }, "../../animals/index.ts": { + "original": { + "version": "-7220553464-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n", + "signature": "1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n" + }, "version": "-7220553464-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n", - "signature": "-7220553464-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n" + "signature": "1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n" }, "../../core/utilities.ts": { + "original": { + "version": "-22163106409-import * as A from '../animals';\nexport function makeRandomName() {\n return \"Bob!?! \";\n}\n\nexport function lastElementOf(arr: T[]): T | undefined {\n if (arr.length === 0) return undefined;\n return arr[arr.length - 1];\n}\n", + "signature": "-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n" + }, "version": "-22163106409-import * as A from '../animals';\nexport function makeRandomName() {\n return \"Bob!?! \";\n}\n\nexport function lastElementOf(arr: T[]): T | undefined {\n if (arr.length === 0) return undefined;\n return arr[arr.length - 1];\n}\n", - "signature": "-22163106409-import * as A from '../animals';\nexport function makeRandomName() {\n return \"Bob!?! \";\n}\n\nexport function lastElementOf(arr: T[]): T | undefined {\n if (arr.length === 0) return undefined;\n return arr[arr.length - 1];\n}\n" + "signature": "-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n" } }, "root": [ @@ -318,32 +402,9 @@ Output:: ] ] ], - "affectedFilesPendingEmit": [ - [ - "../../animals/animal.ts", - "Js | Dts" - ], - [ - "../../animals/dog.ts", - "Js | Dts" - ], - [ - "../../animals/index.ts", - "Js | Dts" - ], - [ - "../../core/utilities.ts", - "Js | Dts" - ] - ], - "emitSignatures": [ - "../../animals/animal.ts", - "../../animals/dog.ts", - "../../animals/index.ts", - "../../core/utilities.ts" - ], + "latestChangedDtsFile": "./utilities.d.ts", "version": "FakeTSVersion", - "size": 2147 + "size": 2633 } @@ -418,9 +479,9 @@ Semantic diagnostics in builder refreshed for:: Shape signatures in builder refreshed for:: /a/lib/lib.d.ts (used version) /user/username/projects/demo/animals/animal.ts (used version) -/user/username/projects/demo/animals/dog.ts (used version) -/user/username/projects/demo/animals/index.ts (used version) -/user/username/projects/demo/core/utilities.ts (used version) +/user/username/projects/demo/animals/dog.ts (computed .d.ts during emit) +/user/username/projects/demo/animals/index.ts (computed .d.ts during emit) +/user/username/projects/demo/core/utilities.ts (computed .d.ts during emit) exitCode:: ExitStatus.undefined @@ -453,7 +514,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'core/tsconfig.json' is out of date because buildinfo file 'lib/core/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'core/tsconfig.json' is out of date because buildinfo file 'lib/core/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/demo/core/tsconfig.json'... @@ -512,8 +573,9 @@ Output:: +//// [/user/username/projects/demo/lib/core/utilities.js] file written with same contents //// [/user/username/projects/demo/lib/core/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../../a/lib/lib.d.ts","../../animals/animal.ts","../../animals/dog.ts","../../animals/index.ts","../../core/utilities.ts"],"fileIdsList":[[4,5],[2,3],[4]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-9289341318-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n",{"version":"-18870194049-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}\n","signature":"6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n"},{"version":"-7220553464-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n","signature":"1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n"},{"version":"-11321611519-\nimport * as A from '../animals';\nexport function makeRandomName() {\n return \"Bob!?! \";\n}\n\nexport function lastElementOf(arr: T[]): T | undefined {\n if (arr.length === 0) return undefined;\n return arr[arr.length - 1];\n}\n","signature":"-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n"}],"root":[5],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../core","strict":true,"target":1},"referencedMap":[[3,1],[4,2],[5,3]],"semanticDiagnosticsPerFile":[[5,[{"start":1,"length":32,"messageText":"'A' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true}]]],"affectedFilesPendingEmit":[2,3,4,5],"emitSignatures":[2,3,4,5],"version":"FakeTSVersion"} +{"fileNames":["../../../../../../a/lib/lib.d.ts","../../animals/animal.ts","../../animals/dog.ts","../../animals/index.ts","../../core/utilities.ts"],"fileIdsList":[[4,5],[2,3],[4]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-9289341318-export type Size = \"small\" | \"medium\" | \"large\";\nexport default interface Animal {\n size: Size;\n}\n",{"version":"-18870194049-import Animal from '.';\nimport { makeRandomName } from '../core/utilities';\n\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\n\nexport function createDog(): Dog {\n return ({\n size: \"medium\",\n woof: function(this: Dog) {\n console.log(`${ this.name } says \"Woof\"!`);\n },\n name: makeRandomName()\n });\n}\n","signature":"6032048049-import Animal from '.';\nexport interface Dog extends Animal {\n woof(): void;\n name: string;\n}\nexport declare function createDog(): Dog;\n"},{"version":"-7220553464-import Animal from './animal';\n\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n","signature":"1096904574-import Animal from './animal';\nexport default Animal;\nimport { createDog, Dog } from './dog';\nexport { createDog, Dog };\n"},{"version":"-11321611519-\nimport * as A from '../animals';\nexport function makeRandomName() {\n return \"Bob!?! \";\n}\n\nexport function lastElementOf(arr: T[]): T | undefined {\n if (arr.length === 0) return undefined;\n return arr[arr.length - 1];\n}\n","signature":"-11345568166-export declare function makeRandomName(): string;\nexport declare function lastElementOf(arr: T[]): T | undefined;\n"}],"root":[5],"options":{"composite":true,"declaration":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../../core","strict":true,"target":1},"referencedMap":[[3,1],[4,2],[5,3]],"semanticDiagnosticsPerFile":[[5,[{"start":1,"length":32,"messageText":"'A' is declared but its value is never read.","category":1,"code":6133,"reportsUnnecessary":true}]]],"latestChangedDtsFile":"./utilities.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/demo/lib/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -623,32 +685,9 @@ Output:: ] ] ], - "affectedFilesPendingEmit": [ - [ - "../../animals/animal.ts", - "Js | Dts" - ], - [ - "../../animals/dog.ts", - "Js | Dts" - ], - [ - "../../animals/index.ts", - "Js | Dts" - ], - [ - "../../core/utilities.ts", - "Js | Dts" - ] - ], - "emitSignatures": [ - "../../animals/animal.ts", - "../../animals/dog.ts", - "../../animals/index.ts", - "../../core/utilities.ts" - ], + "latestChangedDtsFile": "./utilities.d.ts", "version": "FakeTSVersion", - "size": 2657 + "size": 2635 } @@ -681,13 +720,9 @@ Program files:: /user/username/projects/demo/core/utilities.ts Semantic diagnostics in builder refreshed for:: -/user/username/projects/demo/animals/dog.ts -/user/username/projects/demo/animals/index.ts /user/username/projects/demo/core/utilities.ts Shape signatures in builder refreshed for:: /user/username/projects/demo/core/utilities.ts (computed .d.ts) -/user/username/projects/demo/animals/dog.ts (computed .d.ts) -/user/username/projects/demo/animals/index.ts (computed .d.ts) exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsbuildWatch/extends/configDir-template.js b/tests/baselines/reference/tsbuildWatch/extends/configDir-template.js index b7ada9cd4a222..b67e135a6adf6 100644 --- a/tests/baselines/reference/tsbuildWatch/extends/configDir-template.js +++ b/tests/baselines/reference/tsbuildWatch/extends/configDir-template.js @@ -183,12 +183,16 @@ export declare const z = 10; //// [/home/src/projects/myproject/outDir/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../main.ts","../src/secondary.ts"],"version":"FakeTSVersion"} //// [/home/src/projects/myproject/outDir/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../main.ts", + "../src/secondary.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 71 } @@ -299,7 +303,7 @@ After running Timeout callback:: count: 0 Output:: [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'outDir/main.js' is older than input '../configs/first/tsconfig.json' +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'outDir/tsconfig.tsbuildinfo' is older than input '../configs/first/tsconfig.json' [HH:MM:SS AM] Building project '/home/src/projects/myproject/tsconfig.json'... @@ -332,8 +336,6 @@ File '/home/src/projects/myproject/root2/other/sometype2/package.json' does not File '/home/src/projects/myproject/root2/other/sometype2/index.d.ts' exists - use it as a name resolution result. Resolving real path for '/home/src/projects/myproject/root2/other/sometype2/index.d.ts', result '/home/src/projects/myproject/root2/other/sometype2/index.d.ts'. ======== Module name 'other/sometype2' was successfully resolved to '/home/src/projects/myproject/root2/other/sometype2/index.d.ts'. ======== -[HH:MM:SS AM] Updating unchanged output timestamps of project '/home/src/projects/myproject/tsconfig.json'... - ../../../../a/lib/lib.d.ts Default library for target 'es5' types/sometype.ts @@ -344,6 +346,8 @@ root2/other/sometype2/index.d.ts Imported via "other/sometype2" from file 'src/secondary.ts' src/secondary.ts Matched by include pattern '${configDir}/src' in 'tsconfig.json' +[HH:MM:SS AM] Updating unchanged output timestamps of project '/home/src/projects/myproject/tsconfig.json'... + [HH:MM:SS AM] Found 0 errors. Watching for file changes. diff --git a/tests/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-for-changes-to-package-json-main-fields.js b/tests/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-for-changes-to-package-json-main-fields.js index 100d39b9fbf42..9d6251b241a45 100644 --- a/tests/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-for-changes-to-package-json-main-fields.js +++ b/tests/baselines/reference/tsbuildWatch/moduleResolution/build-mode-watches-for-changes-to-package-json-main-fields.js @@ -233,12 +233,15 @@ exports.theNum = 42; //// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../index.ts"],"version":"FakeTSVersion"} //// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 50 } @@ -351,7 +354,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'packages/pkg1/tsconfig.json' is out of date because output 'packages/pkg1/build/index.js' is older than input 'packages/pkg2/package.json' +[HH:MM:SS AM] Project 'packages/pkg1/tsconfig.json' is out of date because output 'packages/pkg1/build/tsconfig.tsbuildinfo' is older than input 'packages/pkg2/package.json' [HH:MM:SS AM] Building project '/user/username/projects/myproject/packages/pkg1/tsconfig.json'... @@ -385,8 +388,20 @@ Resolving real path for '/user/username/projects/myproject/node_modules/pkg2/bui -//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] file written with same contents -//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/myproject/packages/pkg1/build/index.js] file written with same contents +//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] +{"root":["../index.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "../index.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 64 +} + Program root files: [ @@ -438,7 +453,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'packages/pkg1/tsconfig.json' is out of date because output 'packages/pkg1/build/index.js' is older than input 'packages/pkg2/package.json' +[HH:MM:SS AM] Project 'packages/pkg1/tsconfig.json' is out of date because buildinfo file 'packages/pkg1/build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/myproject/packages/pkg1/tsconfig.json'... @@ -477,8 +492,18 @@ File '/user/username/projects/myproject/packages/pkg2/build/const.d.ts' exists - //// [/user/username/projects/myproject/packages/pkg1/build/index.js] file written with same contents -//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] file written with same contents -//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] +{"root":["../index.ts"],"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "../index.ts" + ], + "version": "FakeTSVersion", + "size": 50 +} + Program root files: [ diff --git a/tests/baselines/reference/tsbuildWatch/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-cts-and-mts-extensions.js b/tests/baselines/reference/tsbuildWatch/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-cts-and-mts-extensions.js index 8638acd123f71..7c24c6bb94fa4 100644 --- a/tests/baselines/reference/tsbuildWatch/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-cts-and-mts-extensions.js +++ b/tests/baselines/reference/tsbuildWatch/moduleResolution/resolves-specifier-in-output-declaration-file-from-referenced-project-correctly-with-cts-and-mts-extensions.js @@ -225,12 +225,15 @@ export const theNum = 42; //// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../index.ts"],"version":"FakeTSVersion"} //// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 50 } @@ -351,7 +354,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'packages/pkg1/tsconfig.json' is out of date because output 'packages/pkg1/build/index.js' is older than input 'packages/pkg1/package.json' +[HH:MM:SS AM] Project 'packages/pkg1/tsconfig.json' is out of date because output 'packages/pkg1/build/tsconfig.tsbuildinfo' is older than input 'packages/pkg1/package.json' [HH:MM:SS AM] Building project '/user/username/projects/myproject/packages/pkg1/tsconfig.json'... @@ -403,8 +406,26 @@ File '/package.json' does not exist. -//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] file written with same contents -//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/myproject/packages/pkg1/build/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.theNum = void 0; +exports.theNum = 42; + + +//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] +{"root":["../index.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "../index.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 64 +} + Program root files: [ @@ -457,7 +478,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'packages/pkg1/tsconfig.json' is out of date because output 'packages/pkg1/build/index.js' is older than input 'packages/pkg1/package.json' +[HH:MM:SS AM] Project 'packages/pkg1/tsconfig.json' is out of date because buildinfo file 'packages/pkg1/build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/myproject/packages/pkg1/tsconfig.json'... @@ -500,9 +521,22 @@ File '/package.json' does not exist. -//// [/user/username/projects/myproject/packages/pkg1/build/index.js] file written with same contents -//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] file written with same contents -//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/myproject/packages/pkg1/build/index.js] +export const theNum = 42; + + +//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] +{"root":["../index.ts"],"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "../index.ts" + ], + "version": "FakeTSVersion", + "size": 50 +} + Program root files: [ @@ -555,7 +589,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'packages/pkg1/tsconfig.json' is out of date because output 'packages/pkg1/build/index.js' is older than input 'packages/pkg1/package.json' +[HH:MM:SS AM] Project 'packages/pkg1/tsconfig.json' is out of date because output 'packages/pkg1/build/tsconfig.tsbuildinfo' is older than input 'packages/pkg1/package.json' [HH:MM:SS AM] Building project '/user/username/projects/myproject/packages/pkg1/tsconfig.json'... @@ -607,8 +641,26 @@ File '/package.json' does not exist. -//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] file written with same contents -//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/myproject/packages/pkg1/build/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.theNum = void 0; +exports.theNum = 42; + + +//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] +{"root":["../index.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "../index.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 64 +} + Program root files: [ @@ -809,7 +861,7 @@ Before running Timeout callback:: count: 1 Host is moving to new time After running Timeout callback:: count: 0 Output:: -[HH:MM:SS AM] Project 'packages/pkg1/tsconfig.json' is out of date because output 'packages/pkg1/build/index.js' is older than input 'packages/pkg2' +[HH:MM:SS AM] Project 'packages/pkg1/tsconfig.json' is out of date because buildinfo file 'packages/pkg1/build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/myproject/packages/pkg1/tsconfig.json'... @@ -852,15 +904,19 @@ File '/package.json' does not exist according to earlier cached lookups. -//// [/user/username/projects/myproject/packages/pkg1/build/index.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.theNum = void 0; -exports.theNum = 42; +//// [/user/username/projects/myproject/packages/pkg1/build/index.js] file written with same contents +//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] +{"root":["../index.ts"],"version":"FakeTSVersion"} +//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "../index.ts" + ], + "version": "FakeTSVersion", + "size": 50 +} -//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo] file written with same contents -//// [/user/username/projects/myproject/packages/pkg1/build/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents Program root files: [ diff --git a/tests/baselines/reference/tsbuildWatch/noEmit/multiFile/does-not-go-in-loop-when-watching-when-no-files-are-emitted.js b/tests/baselines/reference/tsbuildWatch/noEmit/multiFile/does-not-go-in-loop-when-watching-when-no-files-are-emitted.js index c48bdbaae91d6..d64957985b0c2 100644 --- a/tests/baselines/reference/tsbuildWatch/noEmit/multiFile/does-not-go-in-loop-when-watching-when-no-files-are-emitted.js +++ b/tests/baselines/reference/tsbuildWatch/noEmit/multiFile/does-not-go-in-loop-when-watching-when-no-files-are-emitted.js @@ -47,12 +47,16 @@ Output:: //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./a.js","./b.ts"],"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./a.js", + "./b.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 54 } diff --git a/tests/baselines/reference/tsbuildWatch/noEmit/outFile/does-not-go-in-loop-when-watching-when-no-files-are-emitted.js b/tests/baselines/reference/tsbuildWatch/noEmit/outFile/does-not-go-in-loop-when-watching-when-no-files-are-emitted.js index d854081789d40..517642071387f 100644 --- a/tests/baselines/reference/tsbuildWatch/noEmit/outFile/does-not-go-in-loop-when-watching-when-no-files-are-emitted.js +++ b/tests/baselines/reference/tsbuildWatch/noEmit/outFile/does-not-go-in-loop-when-watching-when-no-files-are-emitted.js @@ -48,12 +48,16 @@ Output:: //// [/user/username/projects/out.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./myproject/a.js","./myproject/b.ts"],"version":"FakeTSVersion"} //// [/user/username/projects/out.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./myproject/a.js", + "./myproject/b.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 74 } diff --git a/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/does-not-emit-any-files-on-error-with-declaration-with-incremental.js b/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/does-not-emit-any-files-on-error-with-declaration-with-incremental.js index 866d879c6d5d6..b411926284e6e 100644 --- a/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/does-not-emit-any-files-on-error-with-declaration-with-incremental.js +++ b/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/does-not-emit-any-files-on-error-with-declaration-with-incremental.js @@ -66,7 +66,7 @@ Output:: //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"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":false,"affectsGlobalScope":true},{"version":"-5014788164-export interface A {\n name: string;\n}\n","signature":false},{"version":"-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","signature":false},{"version":"9084524823-console.log(\"hi\");\nexport { }\n","signature":false}],"root":[[2,4]],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"changeFileSet":[1,2,3,4],"version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"affectedFilesPendingEmit":[2,3,4],"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -85,32 +85,23 @@ Output:: "../../../../../a/lib/lib.d.ts": { "original": { "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": false, "affectsGlobalScope": true }, "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; };", "affectsGlobalScope": true }, "../shared/types/db.ts": { - "original": { - "version": "-5014788164-export interface A {\n name: string;\n}\n", - "signature": false - }, - "version": "-5014788164-export interface A {\n name: string;\n}\n" + "version": "-5014788164-export interface A {\n name: string;\n}\n", + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { - "original": { - "version": "-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n", - "signature": false - }, - "version": "-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n" + "version": "-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n", + "signature": "-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n" }, "../src/other.ts": { - "original": { - "version": "9084524823-console.log(\"hi\");\nexport { }\n", - "signature": false - }, - "version": "9084524823-console.log(\"hi\");\nexport { }\n" + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" } }, "root": [ @@ -136,14 +127,23 @@ Output:: "../shared/types/db.ts" ] }, - "changeFileSet": [ - "../../../../../a/lib/lib.d.ts", - "../shared/types/db.ts", - "../src/main.ts", - "../src/other.ts" + "affectedFilesPendingEmit": [ + [ + "../shared/types/db.ts", + "Js | Dts" + ], + [ + "../src/main.ts", + "Js | Dts" + ], + [ + "../src/other.ts", + "Js | Dts" + ] ], + "errors": true, "version": "FakeTSVersion", - "size": 1087 + "size": 1002 } @@ -182,9 +182,17 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/noEmitOnError/shared/types/db.ts +/user/username/projects/noEmitOnError/src/main.ts +/user/username/projects/noEmitOnError/src/other.ts -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/noemitonerror/shared/types/db.ts (used version) +/user/username/projects/noemitonerror/src/main.ts (used version) +/user/username/projects/noemitonerror/src/other.ts (used version) exitCode:: ExitStatus.undefined @@ -205,7 +213,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -241,7 +249,7 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -269,7 +277,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -408,16 +416,10 @@ Program files:: /user/username/projects/noEmitOnError/src/other.ts Semantic diagnostics in builder refreshed for:: -/a/lib/lib.d.ts -/user/username/projects/noEmitOnError/shared/types/db.ts /user/username/projects/noEmitOnError/src/main.ts -/user/username/projects/noEmitOnError/src/other.ts Shape signatures in builder refreshed for:: -/a/lib/lib.d.ts (used version) -/user/username/projects/noemitonerror/shared/types/db.ts (computed .d.ts) /user/username/projects/noemitonerror/src/main.ts (computed .d.ts) -/user/username/projects/noemitonerror/src/other.ts (computed .d.ts) exitCode:: ExitStatus.undefined @@ -596,7 +598,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -658,7 +660,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... diff --git a/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/does-not-emit-any-files-on-error-with-declaration.js b/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/does-not-emit-any-files-on-error-with-declaration.js index aa2c69d1e5d06..48ad94fb9638d 100644 --- a/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/does-not-emit-any-files-on-error-with-declaration.js +++ b/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/does-not-emit-any-files-on-error-with-declaration.js @@ -65,12 +65,18 @@ Output:: //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 109 } @@ -108,9 +114,17 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/noEmitOnError/shared/types/db.ts +/user/username/projects/noEmitOnError/src/main.ts +/user/username/projects/noEmitOnError/src/other.ts -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/noemitonerror/shared/types/db.ts (used version) +/user/username/projects/noemitonerror/src/main.ts (used version) +/user/username/projects/noemitonerror/src/other.ts (used version) exitCode:: ExitStatus.undefined @@ -131,7 +145,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -166,7 +180,7 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -194,7 +208,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -202,8 +216,20 @@ Output:: -//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] file written with same contents -//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "version": "FakeTSVersion", + "size": 95 +} + //// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -260,16 +286,10 @@ Program files:: /user/username/projects/noEmitOnError/src/other.ts Semantic diagnostics in builder refreshed for:: -/a/lib/lib.d.ts -/user/username/projects/noEmitOnError/shared/types/db.ts /user/username/projects/noEmitOnError/src/main.ts -/user/username/projects/noEmitOnError/src/other.ts Shape signatures in builder refreshed for:: -/a/lib/lib.d.ts (used version) -/user/username/projects/noemitonerror/shared/types/db.ts (computed .d.ts) /user/username/projects/noemitonerror/src/main.ts (computed .d.ts) -/user/username/projects/noemitonerror/src/other.ts (computed .d.ts) exitCode:: ExitStatus.undefined @@ -306,8 +326,21 @@ Output:: -//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] file written with same contents -//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 109 +} + Program root files: [ @@ -355,7 +388,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -416,7 +449,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -426,8 +459,20 @@ Output:: -//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] file written with same contents -//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "version": "FakeTSVersion", + "size": 95 +} + //// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] file changed its modified time //// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.d.ts] file changed its modified time //// [/user/username/projects/noEmitOnError/dev-build/src/main.js] diff --git a/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/does-not-emit-any-files-on-error-with-incremental.js b/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/does-not-emit-any-files-on-error-with-incremental.js index b2df146073972..be71f83283878 100644 --- a/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/does-not-emit-any-files-on-error-with-incremental.js +++ b/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/does-not-emit-any-files-on-error-with-incremental.js @@ -65,7 +65,7 @@ Output:: //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"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":false,"affectsGlobalScope":true},{"version":"-5014788164-export interface A {\n name: string;\n}\n","signature":false},{"version":"-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","signature":false},{"version":"9084524823-console.log(\"hi\");\nexport { }\n","signature":false}],"root":[[2,4]],"options":{"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"changeFileSet":[1,2,3,4],"version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"affectedFilesPendingEmit":[2,3,4],"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -84,32 +84,23 @@ Output:: "../../../../../a/lib/lib.d.ts": { "original": { "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": false, "affectsGlobalScope": true }, "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; };", "affectsGlobalScope": true }, "../shared/types/db.ts": { - "original": { - "version": "-5014788164-export interface A {\n name: string;\n}\n", - "signature": false - }, - "version": "-5014788164-export interface A {\n name: string;\n}\n" + "version": "-5014788164-export interface A {\n name: string;\n}\n", + "signature": "-5014788164-export interface A {\n name: string;\n}\n" }, "../src/main.ts": { - "original": { - "version": "-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n", - "signature": false - }, - "version": "-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n" + "version": "-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n", + "signature": "-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n" }, "../src/other.ts": { - "original": { - "version": "9084524823-console.log(\"hi\");\nexport { }\n", - "signature": false - }, - "version": "9084524823-console.log(\"hi\");\nexport { }\n" + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" } }, "root": [ @@ -134,14 +125,23 @@ Output:: "../shared/types/db.ts" ] }, - "changeFileSet": [ - "../../../../../a/lib/lib.d.ts", - "../shared/types/db.ts", - "../src/main.ts", - "../src/other.ts" + "affectedFilesPendingEmit": [ + [ + "../shared/types/db.ts", + "Js" + ], + [ + "../src/main.ts", + "Js" + ], + [ + "../src/other.ts", + "Js" + ] ], + "errors": true, "version": "FakeTSVersion", - "size": 1068 + "size": 983 } @@ -179,9 +179,17 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/noEmitOnError/shared/types/db.ts +/user/username/projects/noEmitOnError/src/main.ts +/user/username/projects/noEmitOnError/src/other.ts -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/noemitonerror/shared/types/db.ts (used version) +/user/username/projects/noemitonerror/src/main.ts (used version) +/user/username/projects/noemitonerror/src/other.ts (used version) exitCode:: ExitStatus.undefined @@ -202,7 +210,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -237,7 +245,7 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -265,7 +273,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -274,7 +282,7 @@ Output:: //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n",{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n"},{"version":"9084524823-console.log(\"hi\");\nexport { }\n","signature":"-3531856636-export {};\n"}],"root":[[2,4]],"options":{"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n",{"version":"-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};","signature":"-3531856636-export {};\n"},"9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -312,12 +320,8 @@ Output:: "signature": "-3531856636-export {};\n" }, "../src/other.ts": { - "original": { - "version": "9084524823-console.log(\"hi\");\nexport { }\n", - "signature": "-3531856636-export {};\n" - }, "version": "9084524823-console.log(\"hi\");\nexport { }\n", - "signature": "-3531856636-export {};\n" + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" } }, "root": [ @@ -343,7 +347,7 @@ Output:: ] }, "version": "FakeTSVersion", - "size": 1035 + "size": 984 } //// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] @@ -388,16 +392,10 @@ Program files:: /user/username/projects/noEmitOnError/src/other.ts Semantic diagnostics in builder refreshed for:: -/a/lib/lib.d.ts -/user/username/projects/noEmitOnError/shared/types/db.ts /user/username/projects/noEmitOnError/src/main.ts -/user/username/projects/noEmitOnError/src/other.ts Shape signatures in builder refreshed for:: -/a/lib/lib.d.ts (used version) -/user/username/projects/noemitonerror/shared/types/db.ts (computed .d.ts) /user/username/projects/noemitonerror/src/main.ts (computed .d.ts) -/user/username/projects/noemitonerror/src/other.ts (computed .d.ts) exitCode:: ExitStatus.undefined @@ -435,7 +433,7 @@ Output:: //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n",{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n"},{"version":"9084524823-console.log(\"hi\");\nexport { }\n","signature":"-3531856636-export {};\n"}],"root":[[2,4]],"options":{"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[3,[{"start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]]],"affectedFilesPendingEmit":[3],"version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n",{"version":"-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","signature":"-3531856636-export {};\n"},"9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[3,[{"start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]]],"affectedFilesPendingEmit":[3],"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -473,12 +471,8 @@ Output:: "signature": "-3531856636-export {};\n" }, "../src/other.ts": { - "original": { - "version": "9084524823-console.log(\"hi\");\nexport { }\n", - "signature": "-3531856636-export {};\n" - }, "version": "9084524823-console.log(\"hi\");\nexport { }\n", - "signature": "-3531856636-export {};\n" + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" } }, "root": [ @@ -524,7 +518,7 @@ Output:: ] ], "version": "FakeTSVersion", - "size": 1203 + "size": 1152 } @@ -574,7 +568,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -635,7 +629,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -644,7 +638,7 @@ Output:: //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n",{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n"},{"version":"9084524823-console.log(\"hi\");\nexport { }\n","signature":"-3531856636-export {};\n"}],"root":[[2,4]],"options":{"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n",{"version":"-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";","signature":"-3531856636-export {};\n"},"9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -682,12 +676,8 @@ Output:: "signature": "-3531856636-export {};\n" }, "../src/other.ts": { - "original": { - "version": "9084524823-console.log(\"hi\");\nexport { }\n", - "signature": "-3531856636-export {};\n" - }, "version": "9084524823-console.log(\"hi\");\nexport { }\n", - "signature": "-3531856636-export {};\n" + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" } }, "root": [ @@ -713,7 +703,7 @@ Output:: ] }, "version": "FakeTSVersion", - "size": 1026 + "size": 975 } //// [/user/username/projects/noEmitOnError/dev-build/src/main.js] diff --git a/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/does-not-emit-any-files-on-error.js b/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/does-not-emit-any-files-on-error.js index 9c7e24002d972..508d58bbc73aa 100644 --- a/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/does-not-emit-any-files-on-error.js +++ b/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/does-not-emit-any-files-on-error.js @@ -64,12 +64,18 @@ Output:: //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 109 } @@ -106,9 +112,17 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/noEmitOnError/shared/types/db.ts +/user/username/projects/noEmitOnError/src/main.ts +/user/username/projects/noEmitOnError/src/other.ts -No shapes updated in the builder:: +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/noemitonerror/shared/types/db.ts (used version) +/user/username/projects/noemitonerror/src/main.ts (used version) +/user/username/projects/noemitonerror/src/other.ts (used version) exitCode:: ExitStatus.undefined @@ -129,7 +143,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -163,7 +177,7 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -191,7 +205,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -199,8 +213,20 @@ Output:: -//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] file written with same contents -//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "version": "FakeTSVersion", + "size": 95 +} + //// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); @@ -242,16 +268,10 @@ Program files:: /user/username/projects/noEmitOnError/src/other.ts Semantic diagnostics in builder refreshed for:: -/a/lib/lib.d.ts -/user/username/projects/noEmitOnError/shared/types/db.ts /user/username/projects/noEmitOnError/src/main.ts -/user/username/projects/noEmitOnError/src/other.ts Shape signatures in builder refreshed for:: -/a/lib/lib.d.ts (used version) -/user/username/projects/noemitonerror/shared/types/db.ts (computed .d.ts) /user/username/projects/noemitonerror/src/main.ts (computed .d.ts) -/user/username/projects/noemitonerror/src/other.ts (computed .d.ts) exitCode:: ExitStatus.undefined @@ -288,8 +308,21 @@ Output:: -//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] file written with same contents -//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 109 +} + Program root files: [ @@ -336,7 +369,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -396,7 +429,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output 'dev-build/tsconfig.tsbuildinfo' is older than input 'src/main.ts' +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file 'dev-build/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -406,8 +439,20 @@ Output:: -//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] file written with same contents -//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"root":["../shared/types/db.ts","../src/main.ts","../src/other.ts"],"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "version": "FakeTSVersion", + "size": 95 +} + //// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] file changed its modified time //// [/user/username/projects/noEmitOnError/dev-build/src/main.js] "use strict"; diff --git a/tests/baselines/reference/tsbuildWatch/noEmitOnError/outFile/does-not-emit-any-files-on-error-with-declaration-with-incremental.js b/tests/baselines/reference/tsbuildWatch/noEmitOnError/outFile/does-not-emit-any-files-on-error-with-declaration-with-incremental.js index a896759e63826..f3ea2d30c4c42 100644 --- a/tests/baselines/reference/tsbuildWatch/noEmitOnError/outFile/does-not-emit-any-files-on-error-with-declaration-with-incremental.js +++ b/tests/baselines/reference/tsbuildWatch/noEmitOnError/outFile/does-not-emit-any-files-on-error-with-declaration-with-incremental.js @@ -67,7 +67,7 @@ Output:: //// [/user/username/projects/dev-build.tsbuildinfo] -{"fileNames":["../../../a/lib/lib.d.ts","./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"fileInfos":["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; };","-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"declaration":true,"module":2,"noEmitOnError":true,"outFile":"./dev-build.js"},"changeFileSet":[1,2,3,4],"version":"FakeTSVersion"} +{"fileNames":["../../../a/lib/lib.d.ts","./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"fileInfos":["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; };","-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"declaration":true,"module":2,"noEmitOnError":true,"outFile":"./dev-build.js"},"pendingEmit":false,"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] { @@ -102,14 +102,13 @@ Output:: "noEmitOnError": true, "outFile": "./dev-build.js" }, - "changeFileSet": [ - "../../../a/lib/lib.d.ts", - "./noemitonerror/shared/types/db.ts", - "./noemitonerror/src/main.ts", - "./noemitonerror/src/other.ts" + "pendingEmit": [ + "Js | Dts", + false ], + "errors": true, "version": "FakeTSVersion", - "size": 954 + "size": 962 } @@ -149,7 +148,11 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/noEmitOnError/shared/types/db.ts +/user/username/projects/noEmitOnError/src/main.ts +/user/username/projects/noEmitOnError/src/other.ts No shapes updated in the builder:: @@ -172,7 +175,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -209,7 +212,7 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -237,7 +240,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -492,7 +495,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -555,7 +558,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... diff --git a/tests/baselines/reference/tsbuildWatch/noEmitOnError/outFile/does-not-emit-any-files-on-error-with-declaration.js b/tests/baselines/reference/tsbuildWatch/noEmitOnError/outFile/does-not-emit-any-files-on-error-with-declaration.js index b89e70a359100..7f9cdee84059d 100644 --- a/tests/baselines/reference/tsbuildWatch/noEmitOnError/outFile/does-not-emit-any-files-on-error-with-declaration.js +++ b/tests/baselines/reference/tsbuildWatch/noEmitOnError/outFile/does-not-emit-any-files-on-error-with-declaration.js @@ -66,12 +66,18 @@ Output:: //// [/user/username/projects/dev-build.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./noemitonerror/shared/types/db.ts", + "./noemitonerror/src/main.ts", + "./noemitonerror/src/other.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 148 } @@ -110,7 +116,11 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/noEmitOnError/shared/types/db.ts +/user/username/projects/noEmitOnError/src/main.ts +/user/username/projects/noEmitOnError/src/other.ts No shapes updated in the builder:: @@ -133,7 +143,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output '../dev-build.tsbuildinfo' is older than input 'src/main.ts' +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -169,7 +179,7 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -197,7 +207,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output '../dev-build.tsbuildinfo' is older than input 'src/main.ts' +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -205,8 +215,20 @@ Output:: -//// [/user/username/projects/dev-build.tsbuildinfo] file written with same contents -//// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/dev-build.tsbuildinfo] +{"root":["./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"version":"FakeTSVersion"} + +//// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./noemitonerror/shared/types/db.ts", + "./noemitonerror/src/main.ts", + "./noemitonerror/src/other.ts" + ], + "version": "FakeTSVersion", + "size": 134 +} + //// [/user/username/projects/dev-build.js] define("shared/types/db", ["require", "exports"], function (require, exports) { "use strict"; @@ -304,8 +326,21 @@ Output:: -//// [/user/username/projects/dev-build.tsbuildinfo] file written with same contents -//// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/dev-build.tsbuildinfo] +{"root":["./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./noemitonerror/shared/types/db.ts", + "./noemitonerror/src/main.ts", + "./noemitonerror/src/other.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 148 +} + Program root files: [ @@ -356,7 +391,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output '../dev-build.tsbuildinfo' is older than input 'src/main.ts' +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -418,7 +453,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output '../dev-build.tsbuildinfo' is older than input 'src/main.ts' +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -426,8 +461,20 @@ Output:: -//// [/user/username/projects/dev-build.tsbuildinfo] file written with same contents -//// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/dev-build.tsbuildinfo] +{"root":["./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"version":"FakeTSVersion"} + +//// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./noemitonerror/shared/types/db.ts", + "./noemitonerror/src/main.ts", + "./noemitonerror/src/other.ts" + ], + "version": "FakeTSVersion", + "size": 134 +} + //// [/user/username/projects/dev-build.js] define("shared/types/db", ["require", "exports"], function (require, exports) { "use strict"; diff --git a/tests/baselines/reference/tsbuildWatch/noEmitOnError/outFile/does-not-emit-any-files-on-error-with-incremental.js b/tests/baselines/reference/tsbuildWatch/noEmitOnError/outFile/does-not-emit-any-files-on-error-with-incremental.js index 62ce2593691c8..d18caa3ed1d3a 100644 --- a/tests/baselines/reference/tsbuildWatch/noEmitOnError/outFile/does-not-emit-any-files-on-error-with-incremental.js +++ b/tests/baselines/reference/tsbuildWatch/noEmitOnError/outFile/does-not-emit-any-files-on-error-with-incremental.js @@ -66,7 +66,7 @@ Output:: //// [/user/username/projects/dev-build.tsbuildinfo] -{"fileNames":["../../../a/lib/lib.d.ts","./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"fileInfos":["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; };","-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"module":2,"noEmitOnError":true,"outFile":"./dev-build.js"},"changeFileSet":[1,2,3,4],"version":"FakeTSVersion"} +{"fileNames":["../../../a/lib/lib.d.ts","./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"fileInfos":["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; };","-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"module":2,"noEmitOnError":true,"outFile":"./dev-build.js"},"pendingEmit":false,"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] { @@ -100,14 +100,13 @@ Output:: "noEmitOnError": true, "outFile": "./dev-build.js" }, - "changeFileSet": [ - "../../../a/lib/lib.d.ts", - "./noemitonerror/shared/types/db.ts", - "./noemitonerror/src/main.ts", - "./noemitonerror/src/other.ts" + "pendingEmit": [ + "Js", + false ], + "errors": true, "version": "FakeTSVersion", - "size": 935 + "size": 943 } @@ -146,7 +145,11 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/noEmitOnError/shared/types/db.ts +/user/username/projects/noEmitOnError/src/main.ts +/user/username/projects/noEmitOnError/src/other.ts No shapes updated in the builder:: @@ -169,7 +172,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -205,7 +208,7 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -233,7 +236,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -472,7 +475,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -534,7 +537,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... diff --git a/tests/baselines/reference/tsbuildWatch/noEmitOnError/outFile/does-not-emit-any-files-on-error.js b/tests/baselines/reference/tsbuildWatch/noEmitOnError/outFile/does-not-emit-any-files-on-error.js index 1d4c363d49e04..91923ee6f5a6d 100644 --- a/tests/baselines/reference/tsbuildWatch/noEmitOnError/outFile/does-not-emit-any-files-on-error.js +++ b/tests/baselines/reference/tsbuildWatch/noEmitOnError/outFile/does-not-emit-any-files-on-error.js @@ -65,12 +65,18 @@ Output:: //// [/user/username/projects/dev-build.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./noemitonerror/shared/types/db.ts", + "./noemitonerror/src/main.ts", + "./noemitonerror/src/other.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 148 } @@ -108,7 +114,11 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/noEmitOnError/shared/types/db.ts +/user/username/projects/noEmitOnError/src/main.ts +/user/username/projects/noEmitOnError/src/other.ts No shapes updated in the builder:: @@ -131,7 +141,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output '../dev-build.tsbuildinfo' is older than input 'src/main.ts' +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -166,7 +176,7 @@ Program files:: /user/username/projects/noEmitOnError/src/main.ts /user/username/projects/noEmitOnError/src/other.ts -No cached semantic diagnostics in the builder:: +Semantic diagnostics in builder refreshed for:: No shapes updated in the builder:: @@ -194,7 +204,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output '../dev-build.tsbuildinfo' is older than input 'src/main.ts' +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -202,8 +212,20 @@ Output:: -//// [/user/username/projects/dev-build.tsbuildinfo] file written with same contents -//// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/dev-build.tsbuildinfo] +{"root":["./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"version":"FakeTSVersion"} + +//// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./noemitonerror/shared/types/db.ts", + "./noemitonerror/src/main.ts", + "./noemitonerror/src/other.ts" + ], + "version": "FakeTSVersion", + "size": 134 +} + //// [/user/username/projects/dev-build.js] define("shared/types/db", ["require", "exports"], function (require, exports) { "use strict"; @@ -288,8 +310,21 @@ Output:: -//// [/user/username/projects/dev-build.tsbuildinfo] file written with same contents -//// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/dev-build.tsbuildinfo] +{"root":["./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./noemitonerror/shared/types/db.ts", + "./noemitonerror/src/main.ts", + "./noemitonerror/src/other.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 148 +} + Program root files: [ @@ -339,7 +374,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output '../dev-build.tsbuildinfo' is older than input 'src/main.ts' +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -400,7 +435,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output '../dev-build.tsbuildinfo' is older than input 'src/main.ts' +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because buildinfo file '../dev-build.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... @@ -408,8 +443,20 @@ Output:: -//// [/user/username/projects/dev-build.tsbuildinfo] file written with same contents -//// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/dev-build.tsbuildinfo] +{"root":["./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"version":"FakeTSVersion"} + +//// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./noemitonerror/shared/types/db.ts", + "./noemitonerror/src/main.ts", + "./noemitonerror/src/other.ts" + ], + "version": "FakeTSVersion", + "size": 134 +} + //// [/user/username/projects/dev-build.js] define("shared/types/db", ["require", "exports"], function (require, exports) { "use strict"; diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-file-with-no-error-changes.js b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-file-with-no-error-changes.js index 789f86dda8c9c..effddb855e312 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-file-with-no-error-changes.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-file-with-no-error-changes.js @@ -203,8 +203,21 @@ Output:: +//// [/user/username/projects/solution/app/fileWithError.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.myClassWithError = void 0; +exports.myClassWithError = /** @class */ (function () { + function class_1() { + this.p = 12; + } + class_1.prototype.tags = function () { }; + return class_1; +}()); + + //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},{"version":"-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };","signature":"7927555551-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n(11,16)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-11785903855-export class myClass { }","signature":"-7432826827-export declare class myClass {\n}\n"}],"root":[2,3],"options":{"composite":true},"affectedFilesPendingEmit":[2],"emitSignatures":[[2,"6892461904-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n"]],"latestChangedDtsFile":"./fileWithoutError.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},{"version":"-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };","signature":"7927555551-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n(11,16)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-11785903855-export class myClass { }","signature":"-7432826827-export declare class myClass {\n}\n"}],"root":[2,3],"options":{"composite":true},"emitDiagnosticsPerFile":[[2,[{"start":11,"length":16,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"emitSignatures":[[2,"6892461904-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n"]],"latestChangedDtsFile":"./fileWithoutError.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -253,10 +266,18 @@ Output:: "options": { "composite": true }, - "affectedFilesPendingEmit": [ + "emitDiagnosticsPerFile": [ [ "./filewitherror.ts", - "Js | Dts" + [ + { + "start": 11, + "length": 16, + "messageText": "Property 'p' of exported class expression may not be private or protected.", + "category": 1, + "code": 4094 + } + ] ] ], "emitSignatures": [ @@ -267,7 +288,7 @@ Output:: ], "latestChangedDtsFile": "./fileWithoutError.d.ts", "version": "FakeTSVersion", - "size": 1238 + "size": 1381 } @@ -324,8 +345,25 @@ Output:: +//// [/user/username/projects/solution/app/fileWithoutError.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.myClass2 = void 0; +var myClass2 = /** @class */ (function () { + function myClass2() { + } + return myClass2; +}()); +exports.myClass2 = myClass2; + + +//// [/user/username/projects/solution/app/fileWithoutError.d.ts] +export declare class myClass2 { +} + + //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},{"version":"-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };","signature":"7927555551-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n(11,16)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-10959532701-export class myClass2 { }","signature":"-8459626297-export declare class myClass2 {\n}\n"}],"root":[2,3],"options":{"composite":true},"affectedFilesPendingEmit":[2,3],"emitSignatures":[[2,"6892461904-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n"],[3,"-7432826827-export declare class myClass {\n}\n"]],"latestChangedDtsFile":"./fileWithoutError.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},{"version":"-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };","signature":"7927555551-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n(11,16)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-10959532701-export class myClass2 { }","signature":"-8459626297-export declare class myClass2 {\n}\n"}],"root":[2,3],"options":{"composite":true},"emitDiagnosticsPerFile":[[2,[{"start":11,"length":16,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"emitSignatures":[[2,"6892461904-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n"]],"latestChangedDtsFile":"./fileWithoutError.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -374,29 +412,29 @@ Output:: "options": { "composite": true }, - "affectedFilesPendingEmit": [ + "emitDiagnosticsPerFile": [ [ "./filewitherror.ts", - "Js | Dts" - ], - [ - "./filewithouterror.ts", - "Js | Dts" + [ + { + "start": 11, + "length": 16, + "messageText": "Property 'p' of exported class expression may not be private or protected.", + "category": 1, + "code": 4094 + } + ] ] ], "emitSignatures": [ [ "./filewitherror.ts", "6892461904-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n" - ], - [ - "./filewithouterror.ts", - "-7432826827-export declare class myClass {\n}\n" ] ], "latestChangedDtsFile": "./fileWithoutError.d.ts", "version": "FakeTSVersion", - "size": 1296 + "size": 1383 } diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-fixing-errors-only-changed-file-is-emitted.js b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-fixing-errors-only-changed-file-is-emitted.js index 54b90a176cf30..7c363fac00ec1 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-fixing-errors-only-changed-file-is-emitted.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-fixing-errors-only-changed-file-is-emitted.js @@ -203,8 +203,21 @@ Output:: +//// [/user/username/projects/solution/app/fileWithError.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.myClassWithError = void 0; +exports.myClassWithError = /** @class */ (function () { + function class_1() { + this.p = 12; + } + class_1.prototype.tags = function () { }; + return class_1; +}()); + + //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},{"version":"-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };","signature":"7927555551-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n(11,16)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-11785903855-export class myClass { }","signature":"-7432826827-export declare class myClass {\n}\n"}],"root":[2,3],"options":{"composite":true},"affectedFilesPendingEmit":[2],"emitSignatures":[[2,"6892461904-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n"]],"latestChangedDtsFile":"./fileWithoutError.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},{"version":"-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };","signature":"7927555551-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n(11,16)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-11785903855-export class myClass { }","signature":"-7432826827-export declare class myClass {\n}\n"}],"root":[2,3],"options":{"composite":true},"emitDiagnosticsPerFile":[[2,[{"start":11,"length":16,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"emitSignatures":[[2,"6892461904-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n"]],"latestChangedDtsFile":"./fileWithoutError.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -253,10 +266,18 @@ Output:: "options": { "composite": true }, - "affectedFilesPendingEmit": [ + "emitDiagnosticsPerFile": [ [ "./filewitherror.ts", - "Js | Dts" + [ + { + "start": 11, + "length": 16, + "messageText": "Property 'p' of exported class expression may not be private or protected.", + "category": 1, + "code": 4094 + } + ] ] ], "emitSignatures": [ @@ -267,7 +288,7 @@ Output:: ], "latestChangedDtsFile": "./fileWithoutError.d.ts", "version": "FakeTSVersion", - "size": 1238 + "size": 1381 } @@ -322,7 +343,18 @@ Output:: -//// [/user/username/projects/solution/app/fileWithError.js] file written with same contents +//// [/user/username/projects/solution/app/fileWithError.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.myClassWithError = void 0; +exports.myClassWithError = /** @class */ (function () { + function myClassWithError() { + } + myClassWithError.prototype.tags = function () { }; + return myClassWithError; +}()); + + //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] {"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},{"version":"-8106435186-export var myClassWithError = class {\n tags() { }\n \n };","signature":"6892461904-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n"},{"version":"-11785903855-export class myClass { }","signature":"-7432826827-export declare class myClass {\n}\n"}],"root":[2,3],"options":{"composite":true},"latestChangedDtsFile":"./fileWithoutError.d.ts","version":"FakeTSVersion"} diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/when-file-with-no-error-changes.js b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/when-file-with-no-error-changes.js index 63d4741c6c8d6..9f9f0d052a2c7 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/when-file-with-no-error-changes.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/when-file-with-no-error-changes.js @@ -44,8 +44,38 @@ Output:: +//// [/user/username/projects/solution/app/fileWithError.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.myClassWithError = void 0; +exports.myClassWithError = /** @class */ (function () { + function class_1() { + this.p = 12; + } + class_1.prototype.tags = function () { }; + return class_1; +}()); + + +//// [/user/username/projects/solution/app/fileWithoutError.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.myClass = void 0; +var myClass = /** @class */ (function () { + function myClass() { + } + return myClass; +}()); +exports.myClass = myClass; + + +//// [/user/username/projects/solution/app/fileWithoutError.d.ts] +export declare class myClass { +} + + //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},"-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };",{"version":"-11785903855-export class myClass { }","signature":"-7432826827-export declare class myClass {\n}\n"}],"root":[2,3],"options":{"composite":true},"affectedFilesPendingEmit":[2,3],"emitSignatures":[2,3],"version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},"-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };",{"version":"-11785903855-export class myClass { }","signature":"-7432826827-export declare class myClass {\n}\n"}],"root":[2,3],"options":{"composite":true},"emitDiagnosticsPerFile":[[2,[{"start":11,"length":16,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"emitSignatures":[2],"latestChangedDtsFile":"./fileWithoutError.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -90,22 +120,26 @@ Output:: "options": { "composite": true }, - "affectedFilesPendingEmit": [ + "emitDiagnosticsPerFile": [ [ "./filewitherror.ts", - "Js | Dts" - ], - [ - "./filewithouterror.ts", - "Js | Dts" + [ + { + "start": 11, + "length": 16, + "messageText": "Property 'p' of exported class expression may not be private or protected.", + "category": 1, + "code": 4094 + } + ] ] ], "emitSignatures": [ - "./filewitherror.ts", - "./filewithouterror.ts" + "./filewitherror.ts" ], + "latestChangedDtsFile": "./fileWithoutError.d.ts", "version": "FakeTSVersion", - "size": 847 + "size": 1035 } @@ -177,8 +211,25 @@ Output:: +//// [/user/username/projects/solution/app/fileWithoutError.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.myClass2 = void 0; +var myClass2 = /** @class */ (function () { + function myClass2() { + } + return myClass2; +}()); +exports.myClass2 = myClass2; + + +//// [/user/username/projects/solution/app/fileWithoutError.d.ts] +export declare class myClass2 { +} + + //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},"-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };",{"version":"-10959532701-export class myClass2 { }","signature":"-8459626297-export declare class myClass2 {\n}\n"}],"root":[2,3],"options":{"composite":true},"affectedFilesPendingEmit":[2,3],"emitSignatures":[2,3],"version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},"-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };",{"version":"-10959532701-export class myClass2 { }","signature":"-8459626297-export declare class myClass2 {\n}\n"}],"root":[2,3],"options":{"composite":true},"emitDiagnosticsPerFile":[[2,[{"start":11,"length":16,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"emitSignatures":[2],"latestChangedDtsFile":"./fileWithoutError.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -223,22 +274,26 @@ Output:: "options": { "composite": true }, - "affectedFilesPendingEmit": [ + "emitDiagnosticsPerFile": [ [ "./filewitherror.ts", - "Js | Dts" - ], - [ - "./filewithouterror.ts", - "Js | Dts" + [ + { + "start": 11, + "length": 16, + "messageText": "Property 'p' of exported class expression may not be private or protected.", + "category": 1, + "code": 4094 + } + ] ] ], "emitSignatures": [ - "./filewitherror.ts", - "./filewithouterror.ts" + "./filewitherror.ts" ], + "latestChangedDtsFile": "./fileWithoutError.d.ts", "version": "FakeTSVersion", - "size": 849 + "size": 1037 } diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/when-fixing-error-files-all-files-are-emitted.js b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/when-fixing-error-files-all-files-are-emitted.js index 581a7b61f6bd9..1d0451aecbbf1 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/when-fixing-error-files-all-files-are-emitted.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/when-fixing-error-files-all-files-are-emitted.js @@ -44,8 +44,38 @@ Output:: +//// [/user/username/projects/solution/app/fileWithError.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.myClassWithError = void 0; +exports.myClassWithError = /** @class */ (function () { + function class_1() { + this.p = 12; + } + class_1.prototype.tags = function () { }; + return class_1; +}()); + + +//// [/user/username/projects/solution/app/fileWithoutError.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.myClass = void 0; +var myClass = /** @class */ (function () { + function myClass() { + } + return myClass; +}()); +exports.myClass = myClass; + + +//// [/user/username/projects/solution/app/fileWithoutError.d.ts] +export declare class myClass { +} + + //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},"-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };",{"version":"-11785903855-export class myClass { }","signature":"-7432826827-export declare class myClass {\n}\n"}],"root":[2,3],"options":{"composite":true},"affectedFilesPendingEmit":[2,3],"emitSignatures":[2,3],"version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},"-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };",{"version":"-11785903855-export class myClass { }","signature":"-7432826827-export declare class myClass {\n}\n"}],"root":[2,3],"options":{"composite":true},"emitDiagnosticsPerFile":[[2,[{"start":11,"length":16,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"emitSignatures":[2],"latestChangedDtsFile":"./fileWithoutError.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -90,22 +120,26 @@ Output:: "options": { "composite": true }, - "affectedFilesPendingEmit": [ + "emitDiagnosticsPerFile": [ [ "./filewitherror.ts", - "Js | Dts" - ], - [ - "./filewithouterror.ts", - "Js | Dts" + [ + { + "start": 11, + "length": 16, + "messageText": "Property 'p' of exported class expression may not be private or protected.", + "category": 1, + "code": 4094 + } + ] ] ], "emitSignatures": [ - "./filewitherror.ts", - "./filewithouterror.ts" + "./filewitherror.ts" ], + "latestChangedDtsFile": "./fileWithoutError.d.ts", "version": "FakeTSVersion", - "size": 847 + "size": 1035 } @@ -175,8 +209,20 @@ Output:: +//// [/user/username/projects/solution/app/fileWithError.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.myClassWithError = void 0; +exports.myClassWithError = /** @class */ (function () { + function myClassWithError() { + } + myClassWithError.prototype.tags = function () { }; + return myClassWithError; +}()); + + //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},{"version":"-8106435186-export var myClassWithError = class {\n tags() { }\n \n };","signature":"6892461904-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n"},{"version":"-11785903855-export class myClass { }","signature":"-7432826827-export declare class myClass {\n}\n"}],"root":[2,3],"options":{"composite":true},"latestChangedDtsFile":"./fileWithoutError.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},{"version":"-8106435186-export var myClassWithError = class {\n tags() { }\n \n };","signature":"6892461904-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n"},{"version":"-11785903855-export class myClass { }","signature":"-7432826827-export declare class myClass {\n}\n"}],"root":[2,3],"options":{"composite":true},"latestChangedDtsFile":"./fileWithError.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -225,23 +271,11 @@ Output:: "options": { "composite": true }, - "latestChangedDtsFile": "./fileWithoutError.d.ts", + "latestChangedDtsFile": "./fileWithError.d.ts", "version": "FakeTSVersion", - "size": 954 + "size": 951 } -//// [/user/username/projects/solution/app/fileWithError.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.myClassWithError = void 0; -exports.myClassWithError = /** @class */ (function () { - function myClassWithError() { - } - myClassWithError.prototype.tags = function () { }; - return myClassWithError; -}()); - - //// [/user/username/projects/solution/app/fileWithError.d.ts] export declare var myClassWithError: { new (): { @@ -250,23 +284,6 @@ export declare var myClassWithError: { }; -//// [/user/username/projects/solution/app/fileWithoutError.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.myClass = void 0; -var myClass = /** @class */ (function () { - function myClass() { - } - return myClass; -}()); -exports.myClass = myClass; - - -//// [/user/username/projects/solution/app/fileWithoutError.d.ts] -export declare class myClass { -} - - Program root files: [ diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-preserveWatchOutput-is-not-used.js b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-preserveWatchOutput-is-not-used.js index 1c5a8961492fb..d59856a35e7a7 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-preserveWatchOutput-is-not-used.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-preserveWatchOutput-is-not-used.js @@ -553,8 +553,25 @@ Output:: +//// [/user/username/projects/sample1/logic/index.js.map] +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AACA,0CAEC;AAHD,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC;AAErB,IAAI,CAAC,GAAW,EAAE,CAAC"} + +//// [/user/username/projects/sample1/logic/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +var c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +var mod = require("../core/anotherModule"); +exports.m = mod; +var y = 10; +//# sourceMappingURL=index.js.map + //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileIdsList":[[2,3]],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n",{"version":"-5319769398-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n\nlet y: string = 10;","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"root":[4],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"semanticDiagnosticsPerFile":[[4,[{"start":178,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]]],"affectedFilesPendingEmit":[4],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileIdsList":[[2,3]],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n",{"version":"-5319769398-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n\nlet y: string = 10;","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"root":[4],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"semanticDiagnosticsPerFile":[[4,[{"start":178,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -629,15 +646,9 @@ Output:: ] ] ], - "affectedFilesPendingEmit": [ - [ - "./index.ts", - "Js | JsMap | Dts" - ] - ], "latestChangedDtsFile": "./index.d.ts", "version": "FakeTSVersion", - "size": 1552 + "size": 1521 } @@ -707,8 +718,21 @@ Output:: +//// [/user/username/projects/sample1/core/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } +var x = 10; + + +//// [/user/username/projects/sample1/core/index.d.ts.map] file written with same contents //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},{"version":"-3090574810-export const World = \"hello\";","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-15390729096-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n\nlet x: string = 10;","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"},{"version":"-7959511260-declare const dts: any;","affectsGlobalScope":true}],"root":[[2,4]],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"semanticDiagnosticsPerFile":[[3,[{"start":183,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]]],"affectedFilesPendingEmit":[3],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},{"version":"-3090574810-export const World = \"hello\";","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-15390729096-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n\nlet x: string = 10;","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"},{"version":"-7959511260-declare const dts: any;","affectsGlobalScope":true}],"root":[[2,4]],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"semanticDiagnosticsPerFile":[[3,[{"start":183,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -787,15 +811,9 @@ Output:: ] ] ], - "affectedFilesPendingEmit": [ - [ - "./index.ts", - "Js | Dts | DtsMap" - ] - ], "latestChangedDtsFile": "./index.d.ts", "version": "FakeTSVersion", - "size": 1505 + "size": 1474 } diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-preserveWatchOutput-is-passed-on-command-line.js b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-preserveWatchOutput-is-passed-on-command-line.js index 8643442d0171b..d31c52b2ddca8 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-preserveWatchOutput-is-passed-on-command-line.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-preserveWatchOutput-is-passed-on-command-line.js @@ -554,8 +554,25 @@ Output:: +//// [/user/username/projects/sample1/logic/index.js.map] +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AACA,0CAEC;AAHD,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC;AAErB,IAAI,CAAC,GAAW,EAAE,CAAC"} + +//// [/user/username/projects/sample1/logic/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +var c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +var mod = require("../core/anotherModule"); +exports.m = mod; +var y = 10; +//# sourceMappingURL=index.js.map + //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileIdsList":[[2,3]],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n",{"version":"-5319769398-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n\nlet y: string = 10;","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"root":[4],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"semanticDiagnosticsPerFile":[[4,[{"start":178,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]]],"affectedFilesPendingEmit":[4],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileIdsList":[[2,3]],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n",{"version":"-5319769398-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n\nlet y: string = 10;","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"root":[4],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"semanticDiagnosticsPerFile":[[4,[{"start":178,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -630,15 +647,9 @@ Output:: ] ] ], - "affectedFilesPendingEmit": [ - [ - "./index.ts", - "Js | JsMap | Dts" - ] - ], "latestChangedDtsFile": "./index.d.ts", "version": "FakeTSVersion", - "size": 1552 + "size": 1521 } @@ -708,8 +719,21 @@ Output:: +//// [/user/username/projects/sample1/core/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } +var x = 10; + + +//// [/user/username/projects/sample1/core/index.d.ts.map] file written with same contents //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},{"version":"-3090574810-export const World = \"hello\";","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-15390729096-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n\nlet x: string = 10;","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"},{"version":"-7959511260-declare const dts: any;","affectsGlobalScope":true}],"root":[[2,4]],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"semanticDiagnosticsPerFile":[[3,[{"start":183,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]]],"affectedFilesPendingEmit":[3],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},{"version":"-3090574810-export const World = \"hello\";","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-15390729096-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n\nlet x: string = 10;","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"},{"version":"-7959511260-declare const dts: any;","affectsGlobalScope":true}],"root":[[2,4]],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"semanticDiagnosticsPerFile":[[3,[{"start":183,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -788,15 +812,9 @@ Output:: ] ] ], - "affectedFilesPendingEmit": [ - [ - "./index.ts", - "Js | Dts | DtsMap" - ] - ], "latestChangedDtsFile": "./index.d.ts", "version": "FakeTSVersion", - "size": 1505 + "size": 1474 } diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/when-referenced-project-change-introduces-error-in-the-down-stream-project-and-then-fixes-it.js b/tests/baselines/reference/tsbuildWatch/programUpdates/when-referenced-project-change-introduces-error-in-the-down-stream-project-and-then-fixes-it.js index 719a303dd24e6..3278f04ab62d4 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/when-referenced-project-change-introduces-error-in-the-down-stream-project-and-then-fixes-it.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/when-referenced-project-change-introduces-error-in-the-down-stream-project-and-then-fixes-it.js @@ -126,12 +126,15 @@ var library_1 = require("../Library/library"); //// [/user/username/projects/sample1/App/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./app.ts"],"version":"FakeTSVersion"} //// [/user/username/projects/sample1/App/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./app.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 47 } @@ -316,8 +319,20 @@ Output:: -//// [/user/username/projects/sample1/App/tsconfig.tsbuildinfo] file written with same contents -//// [/user/username/projects/sample1/App/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/sample1/App/app.js] file written with same contents +//// [/user/username/projects/sample1/App/tsconfig.tsbuildinfo] +{"root":["./app.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/App/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./app.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 61 +} + Program root files: [ @@ -472,8 +487,18 @@ Output:: //// [/user/username/projects/sample1/App/app.js] file written with same contents -//// [/user/username/projects/sample1/App/tsconfig.tsbuildinfo] file written with same contents -//// [/user/username/projects/sample1/App/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/sample1/App/tsconfig.tsbuildinfo] +{"root":["./app.ts"],"version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/App/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./app.ts" + ], + "version": "FakeTSVersion", + "size": 47 +} + Program root files: [ diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/works-when-noUnusedParameters-changes-to-false.js b/tests/baselines/reference/tsbuildWatch/programUpdates/works-when-noUnusedParameters-changes-to-false.js index 1e56de7a4474c..718daa2af6760 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/works-when-noUnusedParameters-changes-to-false.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/works-when-noUnusedParameters-changes-to-false.js @@ -38,13 +38,21 @@ Output:: +//// [/user/username/projects/myproject/index.js] +var fn = function (a, b) { return b; }; + + //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./index.ts"],"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./index.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 63 } @@ -109,11 +117,18 @@ Output:: -//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] file written with same contents -//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents -//// [/user/username/projects/myproject/index.js] -var fn = function (a, b) { return b; }; +//// [/user/username/projects/myproject/index.js] file changed its modified time +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"root":["./index.ts"],"version":"FakeTSVersion"} +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "./index.ts" + ], + "version": "FakeTSVersion", + "size": 49 +} diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/works-with-extended-source-files.js b/tests/baselines/reference/tsbuildWatch/programUpdates/works-with-extended-source-files.js index 3c78ceb389141..6614d4e95e23c 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/works-with-extended-source-files.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/works-with-extended-source-files.js @@ -251,12 +251,15 @@ var k = 0; //// [/a/b/project3.tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./other2.ts"],"version":"FakeTSVersion"} //// [/a/b/project3.tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./other2.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 50 } @@ -726,12 +729,18 @@ var z = 0; //// [/a/b/project2.tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./commonfile1.ts","./commonfile2.ts","./other.ts","./other2.ts"],"version":"FakeTSVersion"} //// [/a/b/project2.tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./commonfile1.ts", + "./commonfile2.ts", + "./other.ts", + "./other2.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 101 } //// [/a/b/other2.js] @@ -940,7 +949,7 @@ Before running Timeout callback:: count: 1 Host is moving to new time After running Timeout callback:: count: 0 Output:: -[HH:MM:SS AM] Project 'project2.tsconfig.json' is out of date because output 'commonFile1.js' is older than input 'alpha.tsconfig.json' +[HH:MM:SS AM] Project 'project2.tsconfig.json' is out of date because output 'project2.tsconfig.tsbuildinfo' is older than input 'alpha.tsconfig.json' [HH:MM:SS AM] Building project '/a/b/project2.tsconfig.json'... @@ -1015,7 +1024,7 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -[HH:MM:SS AM] Project 'project3.tsconfig.json' is out of date because output 'other2.js' is older than input 'extendsConfig2.tsconfig.json' +[HH:MM:SS AM] Project 'project3.tsconfig.json' is out of date because output 'project3.tsconfig.tsbuildinfo' is older than input 'extendsConfig2.tsconfig.json' [HH:MM:SS AM] Building project '/a/b/project3.tsconfig.json'... @@ -1026,7 +1035,8 @@ Output:: //// [/a/b/other2.js] file changed its modified time -//// [/a/b/project3.tsconfig.tsbuildinfo] file changed its modified time +//// [/a/b/project3.tsconfig.tsbuildinfo] file written with same contents +//// [/a/b/project3.tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents Program root files: [ @@ -1094,7 +1104,8 @@ Output:: //// [/a/b/other2.js] file changed its modified time -//// [/a/b/project3.tsconfig.tsbuildinfo] file changed its modified time +//// [/a/b/project3.tsconfig.tsbuildinfo] file written with same contents +//// [/a/b/project3.tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents FsWatches:: /a/b/alpha.tsconfig.json: diff --git a/tests/baselines/reference/tsbuildWatch/reexport/Reports-errors-correctly.js b/tests/baselines/reference/tsbuildWatch/reexport/Reports-errors-correctly.js index 2c13d9fda5292..423d7209ac8ee 100644 --- a/tests/baselines/reference/tsbuildWatch/reexport/Reports-errors-correctly.js +++ b/tests/baselines/reference/tsbuildWatch/reexport/Reports-errors-correctly.js @@ -207,12 +207,15 @@ exports.session = { //// [/user/username/projects/reexport/out/main/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../../src/main/index.ts"],"version":"FakeTSVersion"} //// [/user/username/projects/reexport/out/main/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../../src/main/index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 62 } @@ -420,12 +423,26 @@ Output::    ~~~ 'bar' is declared here. +[HH:MM:SS AM] Updating unchanged output timestamps of project '/user/username/projects/reexport/src/main/tsconfig.json'... + [HH:MM:SS AM] Found 1 error. Watching for file changes. -//// [/user/username/projects/reexport/out/main/tsconfig.tsbuildinfo] file written with same contents -//// [/user/username/projects/reexport/out/main/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/reexport/out/main/index.js] file changed its modified time +//// [/user/username/projects/reexport/out/main/tsconfig.tsbuildinfo] +{"root":["../../src/main/index.ts"],"errors":true,"version":"FakeTSVersion"} + +//// [/user/username/projects/reexport/out/main/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "../../src/main/index.ts" + ], + "errors": true, + "version": "FakeTSVersion", + "size": 76 +} + Program root files: [ @@ -593,7 +610,7 @@ Before running Timeout callback:: count: 1 Host is moving to new time After running Timeout callback:: count: 0 Output:: -[HH:MM:SS AM] Failed to parse file 'src/main/tsconfig.json': Semantic errors. +[HH:MM:SS AM] Project 'src/main/tsconfig.json' is out of date because it had errors. [HH:MM:SS AM] Building project '/user/username/projects/reexport/src/main/tsconfig.json'... @@ -604,8 +621,18 @@ Output:: //// [/user/username/projects/reexport/out/main/index.js] file changed its modified time -//// [/user/username/projects/reexport/out/main/tsconfig.tsbuildinfo] file written with same contents -//// [/user/username/projects/reexport/out/main/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/reexport/out/main/tsconfig.tsbuildinfo] +{"root":["../../src/main/index.ts"],"version":"FakeTSVersion"} + +//// [/user/username/projects/reexport/out/main/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "root": [ + "../../src/main/index.ts" + ], + "version": "FakeTSVersion", + "size": 62 +} + Program root files: [ diff --git a/tests/baselines/reference/tsbuildWatch/watchEnvironment/same-file-in-multiple-projects-with-single-watcher-per-file.js b/tests/baselines/reference/tsbuildWatch/watchEnvironment/same-file-in-multiple-projects-with-single-watcher-per-file.js index e9568ba67cfe4..c8759c8f97c03 100644 --- a/tests/baselines/reference/tsbuildWatch/watchEnvironment/same-file-in-multiple-projects-with-single-watcher-per-file.js +++ b/tests/baselines/reference/tsbuildWatch/watchEnvironment/same-file-in-multiple-projects-with-single-watcher-per-file.js @@ -133,12 +133,16 @@ exports.pkg0 = 0; //// [/user/username/projects/myproject/pkg0/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./index.ts","../typings/xterm.d.ts"],"version":"FakeTSVersion"} //// [/user/username/projects/myproject/pkg0/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./index.ts", + "../typings/xterm.d.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 73 } //// [/user/username/projects/myproject/pkg1/index.js] @@ -149,12 +153,16 @@ exports.pkg1 = 1; //// [/user/username/projects/myproject/pkg1/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./index.ts","../typings/xterm.d.ts"],"version":"FakeTSVersion"} //// [/user/username/projects/myproject/pkg1/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./index.ts", + "../typings/xterm.d.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 73 } //// [/user/username/projects/myproject/pkg2/index.js] @@ -165,12 +173,16 @@ exports.pkg2 = 2; //// [/user/username/projects/myproject/pkg2/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./index.ts","../typings/xterm.d.ts"],"version":"FakeTSVersion"} //// [/user/username/projects/myproject/pkg2/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./index.ts", + "../typings/xterm.d.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 73 } //// [/user/username/projects/myproject/pkg3/index.js] @@ -181,12 +193,16 @@ exports.pkg3 = 3; //// [/user/username/projects/myproject/pkg3/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./index.ts","../typings/xterm.d.ts"],"version":"FakeTSVersion"} //// [/user/username/projects/myproject/pkg3/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./index.ts", + "../typings/xterm.d.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 73 } diff --git a/tests/baselines/reference/tsc/cancellationToken/when-emitting-buildInfo.js b/tests/baselines/reference/tsc/cancellationToken/when-emitting-buildInfo.js index c1b71f2d6ce45..bd7d0b0f629d6 100644 --- a/tests/baselines/reference/tsc/cancellationToken/when-emitting-buildInfo.js +++ b/tests/baselines/reference/tsc/cancellationToken/when-emitting-buildInfo.js @@ -256,7 +256,7 @@ Operation ws cancelled:: true //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts","./d.ts"],"fileIdsList":[[3],[2]],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},{"version":"-8116587914-export var C = class CReal {\n d = 1;\n};export function foo() {}","signature":"-2874569268-export declare var C: {\n new (): {\n d: number;\n };\n};\n"},{"version":"-6441446591-import {C} from './c';\nexport class B {\n c = new C();\n}","signature":"-12916012021-export declare class B {\n c: {\n d: number;\n };\n}\n"},{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"},{"version":"-7804761415-export class D { }","signature":"-8611429667-export declare class D {\n}\n"}],"root":[[2,5]],"options":{"declaration":true},"referencedMap":[[4,1],[3,2]],"changeFileSet":[2],"version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts","./d.ts"],"fileIdsList":[[3],[2]],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},{"version":"-8116587914-export var C = class CReal {\n d = 1;\n};export function foo() {}","signature":"-2874569268-export declare var C: {\n new (): {\n d: number;\n };\n};\n"},{"version":"-6441446591-import {C} from './c';\nexport class B {\n c = new C();\n}","signature":"-12916012021-export declare class B {\n c: {\n d: number;\n };\n}\n"},{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"},{"version":"-7804761415-export class D { }","signature":"-8611429667-export declare class D {\n}\n"}],"root":[[2,5]],"options":{"declaration":true},"referencedMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[2],"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -343,11 +343,14 @@ Operation ws cancelled:: true "./c.ts" ] }, - "changeFileSet": [ - "./c.ts" + "semanticDiagnosticsPerFile": [ + [ + "./c.ts", + "not cached" + ] ], "version": "FakeTSVersion", - "size": 1270 + "size": 1283 } @@ -381,34 +384,8 @@ Change:: Normal build Input:: -//// [/user/username/projects/myproject/c.js] -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.C = void 0; -exports.foo = foo; -exports.C = /** @class */ (function () { - function CReal() { - this.d = 1; - } - return CReal; -}()); -function foo() { } - - -//// [/user/username/projects/myproject/c.d.ts] -export declare var C: { - new (): { - d: number; - }; -}; -export declare function foo(): void; - - -//// [/user/username/projects/myproject/b.js] file written with same contents -//// [/user/username/projects/myproject/b.d.ts] file written with same contents -//// [/user/username/projects/myproject/a.d.ts] file written with same contents //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts","./d.ts"],"fileIdsList":[[3],[2]],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},{"version":"-8116587914-export var C = class CReal {\n d = 1;\n};export function foo() {}","signature":"-544179862-export declare var C: {\n new (): {\n d: number;\n };\n};\nexport declare function foo(): void;\n"},{"version":"-6441446591-import {C} from './c';\nexport class B {\n c = new C();\n}","signature":"-12916012021-export declare class B {\n c: {\n d: number;\n };\n}\n"},{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"},{"version":"-7804761415-export class D { }","signature":"-8611429667-export declare class D {\n}\n"}],"root":[[2,5]],"options":{"declaration":true},"referencedMap":[[4,1],[3,2]],"version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts","./d.ts"],"fileIdsList":[[3],[2]],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},{"version":"-8116587914-export var C = class CReal {\n d = 1;\n};export function foo() {}","signature":"-2874569268-export declare var C: {\n new (): {\n d: number;\n };\n};\n"},{"version":"-6441446591-import {C} from './c';\nexport class B {\n c = new C();\n}","signature":"-12916012021-export declare class B {\n c: {\n d: number;\n };\n}\n"},{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"},{"version":"-7804761415-export class D { }","signature":"-8611429667-export declare class D {\n}\n"}],"root":[[2,5]],"options":{"declaration":true},"referencedMap":[[4,1],[3,2]],"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -440,10 +417,10 @@ export declare function foo(): void; "./c.ts": { "original": { "version": "-8116587914-export var C = class CReal {\n d = 1;\n};export function foo() {}", - "signature": "-544179862-export declare var C: {\n new (): {\n d: number;\n };\n};\nexport declare function foo(): void;\n" + "signature": "-2874569268-export declare var C: {\n new (): {\n d: number;\n };\n};\n" }, "version": "-8116587914-export var C = class CReal {\n d = 1;\n};export function foo() {}", - "signature": "-544179862-export declare var C: {\n new (): {\n d: number;\n };\n};\nexport declare function foo(): void;\n" + "signature": "-2874569268-export declare var C: {\n new (): {\n d: number;\n };\n};\n" }, "./b.ts": { "original": { @@ -496,7 +473,7 @@ export declare function foo(): void; ] }, "version": "FakeTSVersion", - "size": 1287 + "size": 1250 } @@ -521,13 +498,8 @@ Program files:: Semantic diagnostics in builder refreshed for:: /user/username/projects/myproject/c.ts -/user/username/projects/myproject/b.ts -/user/username/projects/myproject/a.ts -Shape signatures in builder refreshed for:: -/user/username/projects/myproject/c.ts (computed .d.ts) -/user/username/projects/myproject/b.ts (computed .d.ts) -/user/username/projects/myproject/a.ts (computed .d.ts during emit) +No shapes updated in the builder:: exitCode:: ExitStatus.undefined @@ -535,16 +507,127 @@ Change:: Clean build Input:: -//// [/user/username/projects/myproject/c.js] file written with same contents -//// [/user/username/projects/myproject/c.d.ts] file written with same contents +//// [/user/username/projects/myproject/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.C = void 0; +exports.foo = foo; +exports.C = /** @class */ (function () { + function CReal() { + this.d = 1; + } + return CReal; +}()); +function foo() { } + + +//// [/user/username/projects/myproject/c.d.ts] +export declare var C: { + new (): { + d: number; + }; +}; +export declare function foo(): void; + + //// [/user/username/projects/myproject/b.js] file written with same contents //// [/user/username/projects/myproject/b.d.ts] file written with same contents //// [/user/username/projects/myproject/a.js] file written with same contents //// [/user/username/projects/myproject/a.d.ts] file written with same contents //// [/user/username/projects/myproject/d.js] file written with same contents //// [/user/username/projects/myproject/d.d.ts] file written with same contents -//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] file written with same contents -//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts","./d.ts"],"fileIdsList":[[3],[2]],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},{"version":"-8116587914-export var C = class CReal {\n d = 1;\n};export function foo() {}","signature":"-544179862-export declare var C: {\n new (): {\n d: number;\n };\n};\nexport declare function foo(): void;\n"},{"version":"-6441446591-import {C} from './c';\nexport class B {\n c = new C();\n}","signature":"-12916012021-export declare class B {\n c: {\n d: number;\n };\n}\n"},{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"},{"version":"-7804761415-export class D { }","signature":"-8611429667-export declare class D {\n}\n"}],"root":[[2,5]],"options":{"declaration":true},"referencedMap":[[4,1],[3,2]],"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./c.ts", + "./b.ts", + "./a.ts", + "./d.ts" + ], + "fileIdsList": [ + [ + "./b.ts" + ], + [ + "./c.ts" + ] + ], + "fileInfos": { + "../../../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \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; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \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; }", + "signature": "-7698705165-/// \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; }", + "affectsGlobalScope": true + }, + "./c.ts": { + "original": { + "version": "-8116587914-export var C = class CReal {\n d = 1;\n};export function foo() {}", + "signature": "-544179862-export declare var C: {\n new (): {\n d: number;\n };\n};\nexport declare function foo(): void;\n" + }, + "version": "-8116587914-export var C = class CReal {\n d = 1;\n};export function foo() {}", + "signature": "-544179862-export declare var C: {\n new (): {\n d: number;\n };\n};\nexport declare function foo(): void;\n" + }, + "./b.ts": { + "original": { + "version": "-6441446591-import {C} from './c';\nexport class B {\n c = new C();\n}", + "signature": "-12916012021-export declare class B {\n c: {\n d: number;\n };\n}\n" + }, + "version": "-6441446591-import {C} from './c';\nexport class B {\n c = new C();\n}", + "signature": "-12916012021-export declare class B {\n c: {\n d: number;\n };\n}\n" + }, + "./a.ts": { + "original": { + "version": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);", + "signature": "-3531856636-export {};\n" + }, + "version": "4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);", + "signature": "-3531856636-export {};\n" + }, + "./d.ts": { + "original": { + "version": "-7804761415-export class D { }", + "signature": "-8611429667-export declare class D {\n}\n" + }, + "version": "-7804761415-export class D { }", + "signature": "-8611429667-export declare class D {\n}\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./c.ts", + "./b.ts", + "./a.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./a.ts": [ + "./b.ts" + ], + "./b.ts": [ + "./c.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1287 +} + Program root files: [ "/user/username/projects/myproject/a.ts", diff --git a/tests/baselines/reference/tsc/cancellationToken/when-using-state.js b/tests/baselines/reference/tsc/cancellationToken/when-using-state.js index e401a1d0123d8..a19074b6ee326 100644 --- a/tests/baselines/reference/tsc/cancellationToken/when-using-state.js +++ b/tests/baselines/reference/tsc/cancellationToken/when-using-state.js @@ -256,7 +256,7 @@ Operation ws cancelled:: true //// [/user/username/projects/myproject/tsconfig.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts","./d.ts"],"fileIdsList":[[3],[2]],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},{"version":"-8116587914-export var C = class CReal {\n d = 1;\n};export function foo() {}","signature":"-2874569268-export declare var C: {\n new (): {\n d: number;\n };\n};\n"},{"version":"-6441446591-import {C} from './c';\nexport class B {\n c = new C();\n}","signature":"-12916012021-export declare class B {\n c: {\n d: number;\n };\n}\n"},{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"},{"version":"-7804761415-export class D { }","signature":"-8611429667-export declare class D {\n}\n"}],"root":[[2,5]],"options":{"declaration":true},"referencedMap":[[4,1],[3,2]],"changeFileSet":[2],"version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./c.ts","./b.ts","./a.ts","./d.ts"],"fileIdsList":[[3],[2]],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},{"version":"-8116587914-export var C = class CReal {\n d = 1;\n};export function foo() {}","signature":"-2874569268-export declare var C: {\n new (): {\n d: number;\n };\n};\n"},{"version":"-6441446591-import {C} from './c';\nexport class B {\n c = new C();\n}","signature":"-12916012021-export declare class B {\n c: {\n d: number;\n };\n}\n"},{"version":"4878398349-import {B} from './b';\ndeclare var console: any;\nlet b = new B();\nconsole.log(b.c.d);","signature":"-3531856636-export {};\n"},{"version":"-7804761415-export class D { }","signature":"-8611429667-export declare class D {\n}\n"}],"root":[[2,5]],"options":{"declaration":true},"referencedMap":[[4,1],[3,2]],"semanticDiagnosticsPerFile":[2],"version":"FakeTSVersion"} //// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -343,11 +343,14 @@ Operation ws cancelled:: true "./c.ts" ] }, - "changeFileSet": [ - "./c.ts" + "semanticDiagnosticsPerFile": [ + [ + "./c.ts", + "not cached" + ] ], "version": "FakeTSVersion", - "size": 1270 + "size": 1283 } diff --git a/tests/baselines/reference/tsc/declarationEmit/multiFile/reports-dts-generation-errors-with-incremental.js b/tests/baselines/reference/tsc/declarationEmit/multiFile/reports-dts-generation-errors-with-incremental.js index 044dcc66118b3..6f1719601aca4 100644 --- a/tests/baselines/reference/tsc/declarationEmit/multiFile/reports-dts-generation-errors-with-incremental.js +++ b/tests/baselines/reference/tsc/declarationEmit/multiFile/reports-dts-generation-errors-with-incremental.js @@ -219,7 +219,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/project/tsconfig.json -[HH:MM:SS AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/project/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/project/tsconfig.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project/tsconfig.json'... diff --git a/tests/baselines/reference/tsc/declarationEmit/multiFile/reports-dts-generation-errors.js b/tests/baselines/reference/tsc/declarationEmit/multiFile/reports-dts-generation-errors.js index a1d3bb1877469..9bc49b0cff6bf 100644 --- a/tests/baselines/reference/tsc/declarationEmit/multiFile/reports-dts-generation-errors.js +++ b/tests/baselines/reference/tsc/declarationEmit/multiFile/reports-dts-generation-errors.js @@ -144,6 +144,7 @@ Output:: 2 export const api = ky.extend({});    ~~~ +TSFILE: /src/project/index.js TSFILE: /src/project/tsconfig.tsbuildinfo lib/lib.esnext.full.d.ts Default library for target 'esnext' @@ -153,18 +154,25 @@ src/project/node_modules/ky/distribution/index.d.ts src/project/index.ts Matched by default include pattern '**/*' File is ECMAScript module because 'src/project/package.json' has field "type" with value "module" +[HH:MM:SS AM] Updating unchanged output timestamps of project '/src/project/tsconfig.json'... + Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +//// [/src/project/index.js] file written with same contents //// [/src/project/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./index.ts"],"errors":true,"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./index.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 63 } diff --git a/tests/baselines/reference/tsc/declarationEmit/outFile/reports-dts-generation-errors-with-incremental.js b/tests/baselines/reference/tsc/declarationEmit/outFile/reports-dts-generation-errors-with-incremental.js index a153793240f1b..955fdb67bf216 100644 --- a/tests/baselines/reference/tsc/declarationEmit/outFile/reports-dts-generation-errors-with-incremental.js +++ b/tests/baselines/reference/tsc/declarationEmit/outFile/reports-dts-generation-errors-with-incremental.js @@ -172,7 +172,7 @@ Output:: [HH:MM:SS AM] Projects in this build: * src/project/tsconfig.json -[HH:MM:SS AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/project/outFile.tsbuildinfo' indicates that some of the changes were not emitted +[HH:MM:SS AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/project/outFile.tsbuildinfo' indicates that program needs to report errors. [HH:MM:SS AM] Building project '/src/project/tsconfig.json'... diff --git a/tests/baselines/reference/tsc/declarationEmit/outFile/reports-dts-generation-errors.js b/tests/baselines/reference/tsc/declarationEmit/outFile/reports-dts-generation-errors.js index 955da2776e633..da64734f2874a 100644 --- a/tests/baselines/reference/tsc/declarationEmit/outFile/reports-dts-generation-errors.js +++ b/tests/baselines/reference/tsc/declarationEmit/outFile/reports-dts-generation-errors.js @@ -135,6 +135,7 @@ Output:: 2 export const api = ky.extend({});    ~~~ +TSFILE: /src/project/outFile.js TSFILE: /src/project/outFile.tsbuildinfo lib/lib.d.ts Default library for target 'es5' @@ -142,18 +143,25 @@ src/project/ky.d.ts Imported via 'ky' from file 'src/project/src/index.ts' src/project/src/index.ts Matched by include pattern 'src' in 'src/project/tsconfig.json' +[HH:MM:SS AM] Updating unchanged output timestamps of project '/src/project/tsconfig.json'... + Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +//// [/src/project/outFile.js] file written with same contents //// [/src/project/outFile.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./src/index.ts"],"errors":true,"version":"FakeTSVersion"} //// [/src/project/outFile.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./src/index.ts" + ], + "errors": true, "version": "FakeTSVersion", - "size": 27 + "size": 67 } diff --git a/tests/baselines/reference/tsc/incremental/when-global-file-is-added,-the-signatures-are-updated.js b/tests/baselines/reference/tsc/incremental/when-global-file-is-added,-the-signatures-are-updated.js index aa4f4db600c5f..b37560ea3456e 100644 --- a/tests/baselines/reference/tsc/incremental/when-global-file-is-added,-the-signatures-are-updated.js +++ b/tests/baselines/reference/tsc/incremental/when-global-file-is-added,-the-signatures-are-updated.js @@ -120,7 +120,7 @@ function main() { } //// [/src/project/tsconfig.tsbuildinfo] -{"fileNames":["../../lib/lib.d.ts","./src/filepresent.ts","./src/anotherfilewithsamereferenes.ts","./src/main.ts","./src/filenotfound.ts"],"fileIdsList":[[2,5]],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-12346563362-function something() { return 10; }","signature":"-4903250974-declare function something(): number;\n","affectsGlobalScope":true},{"version":"-28237004260-/// \n/// \nfunction anotherFileWithSameReferenes() { }\n","signature":"-11249446897-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true},{"version":"-21256825585-/// \n/// \nfunction main() { }\n","signature":"-1399491038-declare function main(): void;\n","affectsGlobalScope":true}],"root":[[2,4]],"options":{"composite":true},"referencedMap":[[3,1],[4,1]],"latestChangedDtsFile":"./src/main.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.d.ts","./src/filepresent.ts","./src/anotherfilewithsamereferenes.ts","./src/main.ts","./src/filenotfound.ts"],"fileIdsList":[[2,5]],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-12346563362-function something() { return 10; }","signature":"-4903250974-declare function something(): number;\n","affectsGlobalScope":true},{"version":"-28237004260-/// \n/// \nfunction anotherFileWithSameReferenes() { }\n","signature":"-11249446897-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true},{"version":"-21256825585-/// \n/// \nfunction main() { }\n","signature":"-1399491038-declare function main(): void;\n","affectsGlobalScope":true}],"root":[[2,4]],"options":{"composite":true},"referencedMap":[[3,1],[4,1]],"latestChangedDtsFile":"./src/main.d.ts","errors":true,"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -205,8 +205,9 @@ function main() { } ] }, "latestChangedDtsFile": "./src/main.d.ts", + "errors": true, "version": "FakeTSVersion", - "size": 1445 + "size": 1459 } @@ -319,7 +320,7 @@ something(); //// [/src/project/tsconfig.tsbuildinfo] -{"fileNames":["../../lib/lib.d.ts","./src/filepresent.ts","./src/anotherfilewithsamereferenes.ts","./src/main.ts","./src/filenotfound.ts"],"fileIdsList":[[2,5]],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-12346563362-function something() { return 10; }","signature":"-4903250974-declare function something(): number;\n","affectsGlobalScope":true},{"version":"-28237004260-/// \n/// \nfunction anotherFileWithSameReferenes() { }\n","signature":"-11249446897-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true},{"version":"-24702349751-/// \n/// \nfunction main() { }\nsomething();","signature":"-1399491038-declare function main(): void;\n","affectsGlobalScope":true}],"root":[[2,4]],"options":{"composite":true},"referencedMap":[[3,1],[4,1]],"latestChangedDtsFile":"./src/main.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.d.ts","./src/filepresent.ts","./src/anotherfilewithsamereferenes.ts","./src/main.ts","./src/filenotfound.ts"],"fileIdsList":[[2,5]],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-12346563362-function something() { return 10; }","signature":"-4903250974-declare function something(): number;\n","affectsGlobalScope":true},{"version":"-28237004260-/// \n/// \nfunction anotherFileWithSameReferenes() { }\n","signature":"-11249446897-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true},{"version":"-24702349751-/// \n/// \nfunction main() { }\nsomething();","signature":"-1399491038-declare function main(): void;\n","affectsGlobalScope":true}],"root":[[2,4]],"options":{"composite":true},"referencedMap":[[3,1],[4,1]],"latestChangedDtsFile":"./src/main.d.ts","errors":true,"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -404,8 +405,9 @@ something(); ] }, "latestChangedDtsFile": "./src/main.d.ts", + "errors": true, "version": "FakeTSVersion", - "size": 1457 + "size": 1471 } @@ -472,7 +474,7 @@ something(); //// [/src/project/tsconfig.tsbuildinfo] -{"fileNames":["../../lib/lib.d.ts","./src/filepresent.ts","./src/anotherfilewithsamereferenes.ts","./src/main.ts","./src/filenotfound.ts"],"fileIdsList":[[2,5]],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-12346563362-function something() { return 10; }","signature":"-4903250974-declare function something(): number;\n","affectsGlobalScope":true},{"version":"-28237004260-/// \n/// \nfunction anotherFileWithSameReferenes() { }\n","signature":"-11249446897-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true},{"version":"-20086051197-/// \n/// \nfunction main() { }\nsomething();something();","signature":"-1399491038-declare function main(): void;\n","affectsGlobalScope":true}],"root":[[2,4]],"options":{"composite":true},"referencedMap":[[3,1],[4,1]],"latestChangedDtsFile":"./src/main.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.d.ts","./src/filepresent.ts","./src/anotherfilewithsamereferenes.ts","./src/main.ts","./src/filenotfound.ts"],"fileIdsList":[[2,5]],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-12346563362-function something() { return 10; }","signature":"-4903250974-declare function something(): number;\n","affectsGlobalScope":true},{"version":"-28237004260-/// \n/// \nfunction anotherFileWithSameReferenes() { }\n","signature":"-11249446897-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true},{"version":"-20086051197-/// \n/// \nfunction main() { }\nsomething();something();","signature":"-1399491038-declare function main(): void;\n","affectsGlobalScope":true}],"root":[[2,4]],"options":{"composite":true},"referencedMap":[[3,1],[4,1]],"latestChangedDtsFile":"./src/main.d.ts","errors":true,"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -557,8 +559,9 @@ something(); ] }, "latestChangedDtsFile": "./src/main.d.ts", + "errors": true, "version": "FakeTSVersion", - "size": 1469 + "size": 1483 } @@ -650,7 +653,7 @@ function foo() { return 20; } //// [/src/project/tsconfig.tsbuildinfo] -{"fileNames":["../../lib/lib.d.ts","./src/filepresent.ts","./src/anotherfilewithsamereferenes.ts","./src/newfile.ts","./src/main.ts","./src/filenotfound.ts"],"fileIdsList":[[2,6],[2,4,6]],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-12346563362-function something() { return 10; }","signature":"-4903250974-declare function something(): number;\n","affectsGlobalScope":true},{"version":"-28237004260-/// \n/// \nfunction anotherFileWithSameReferenes() { }\n","signature":"-11249446897-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true},{"version":"5451387573-function foo() { return 20; }","signature":"517738360-declare function foo(): number;\n","affectsGlobalScope":true},{"version":"-3581559188-/// \n/// \n/// \nfunction main() { }\nsomething();something();foo();","signature":"-1399491038-declare function main(): void;\n","affectsGlobalScope":true}],"root":[[2,5]],"options":{"composite":true},"referencedMap":[[3,1],[5,2]],"latestChangedDtsFile":"./src/newFile.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.d.ts","./src/filepresent.ts","./src/anotherfilewithsamereferenes.ts","./src/newfile.ts","./src/main.ts","./src/filenotfound.ts"],"fileIdsList":[[2,6],[2,4,6]],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-12346563362-function something() { return 10; }","signature":"-4903250974-declare function something(): number;\n","affectsGlobalScope":true},{"version":"-28237004260-/// \n/// \nfunction anotherFileWithSameReferenes() { }\n","signature":"-11249446897-declare function anotherFileWithSameReferenes(): void;\n","affectsGlobalScope":true},{"version":"5451387573-function foo() { return 20; }","signature":"517738360-declare function foo(): number;\n","affectsGlobalScope":true},{"version":"-3581559188-/// \n/// \n/// \nfunction main() { }\nsomething();something();foo();","signature":"-1399491038-declare function main(): void;\n","affectsGlobalScope":true}],"root":[[2,5]],"options":{"composite":true},"referencedMap":[[3,1],[5,2]],"latestChangedDtsFile":"./src/newFile.d.ts","errors":true,"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -753,8 +756,9 @@ function foo() { return 20; } ] }, "latestChangedDtsFile": "./src/newFile.d.ts", + "errors": true, "version": "FakeTSVersion", - "size": 1683 + "size": 1697 } diff --git a/tests/baselines/reference/tsc/incremental/when-new-file-is-added-to-the-referenced-project-discrepancies.js b/tests/baselines/reference/tsc/incremental/when-new-file-is-added-to-the-referenced-project-discrepancies.js index b409f8f9ec131..81bf4cf9e0eee 100644 --- a/tests/baselines/reference/tsc/incremental/when-new-file-is-added-to-the-referenced-project-discrepancies.js +++ b/tests/baselines/reference/tsc/incremental/when-new-file-is-added-to-the-referenced-project-discrepancies.js @@ -31,15 +31,15 @@ CleanBuild: "semanticDiagnosticsPerFile": [ [ "../../../lib/lib.d.ts", - "not cached or not changed" + "not cached" ], [ "../project1/class1.d.ts", - "not cached or not changed" + "not cached" ], [ "./class2.ts", - "not cached or not changed" + "not cached" ] ], "latestChangedDtsFile": "FakeFileName", @@ -72,6 +72,7 @@ IncrementalBuild: "module": 0 }, "latestChangedDtsFile": "FakeFileName", + "errors": true, "version": "FakeTSVersion" } 3:: Delete output for class3 @@ -107,15 +108,15 @@ CleanBuild: "semanticDiagnosticsPerFile": [ [ "../../../lib/lib.d.ts", - "not cached or not changed" + "not cached" ], [ "../project1/class1.d.ts", - "not cached or not changed" + "not cached" ], [ "./class2.ts", - "not cached or not changed" + "not cached" ] ], "latestChangedDtsFile": "FakeFileName", @@ -150,11 +151,11 @@ IncrementalBuild: "semanticDiagnosticsPerFile": [ [ "../project1/class1.d.ts", - "not cached or not changed" + "not cached" ], [ "./class2.ts", - "not cached or not changed" + "not cached" ] ], "latestChangedDtsFile": "FakeFileName", diff --git a/tests/baselines/reference/tsc/incremental/when-new-file-is-added-to-the-referenced-project.js b/tests/baselines/reference/tsc/incremental/when-new-file-is-added-to-the-referenced-project.js index 0b4056007200e..63d85312cd294 100644 --- a/tests/baselines/reference/tsc/incremental/when-new-file-is-added-to-the-referenced-project.js +++ b/tests/baselines/reference/tsc/incremental/when-new-file-is-added-to-the-referenced-project.js @@ -153,6 +153,62 @@ Found 1 error. exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +//// [/src/projects/project2/tsconfig.tsbuildinfo] +{"fileNames":["../../../lib/lib.d.ts","../project1/class1.d.ts","./class2.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-3469237238-declare class class1 {}","affectsGlobalScope":true},{"version":"777969115-class class2 {}","signature":"-2684084705-declare class class2 {\n}\n","affectsGlobalScope":true}],"root":[3],"options":{"composite":true,"module":0},"latestChangedDtsFile":"./class2.d.ts","errors":true,"version":"FakeTSVersion"} + +//// [/src/projects/project2/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../../../lib/lib.d.ts", + "../project1/class1.d.ts", + "./class2.ts" + ], + "fileInfos": { + "../../../lib/lib.d.ts": { + "original": { + "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; };", + "affectsGlobalScope": true + }, + "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; };", + "affectsGlobalScope": true + }, + "../project1/class1.d.ts": { + "original": { + "version": "-3469237238-declare class class1 {}", + "affectsGlobalScope": true + }, + "version": "-3469237238-declare class class1 {}", + "signature": "-3469237238-declare class class1 {}", + "affectsGlobalScope": true + }, + "./class2.ts": { + "original": { + "version": "777969115-class class2 {}", + "signature": "-2684084705-declare class class2 {\n}\n", + "affectsGlobalScope": true + }, + "version": "777969115-class class2 {}", + "signature": "-2684084705-declare class class2 {\n}\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + 3, + "./class2.ts" + ] + ], + "options": { + "composite": true, + "module": 0 + }, + "latestChangedDtsFile": "./class2.d.ts", + "errors": true, + "version": "FakeTSVersion", + "size": 898 +} + Change:: Add output of class3 @@ -329,11 +385,11 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated "semanticDiagnosticsPerFile": [ [ "../project1/class1.d.ts", - "not cached or not changed" + "not cached" ], [ "./class2.ts", - "not cached or not changed" + "not cached" ] ], "latestChangedDtsFile": "./class2.d.ts", diff --git a/tests/baselines/reference/tsc/libraryResolution/unknown-lib.js b/tests/baselines/reference/tsc/libraryResolution/unknown-lib.js index fbaffe6713849..b3f86fe1ba4e7 100644 --- a/tests/baselines/reference/tsc/libraryResolution/unknown-lib.js +++ b/tests/baselines/reference/tsc/libraryResolution/unknown-lib.js @@ -176,7 +176,7 @@ exports.x = "type1"; //// [/home/src/projects/project1/tsconfig.tsbuildinfo] -{"fileNames":["../../lib/lib.d.ts","../../lib/lib.scripthost.d.ts","./core.d.ts","./file.ts","./file2.ts","./index.ts","./utils.d.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-5403980302-interface ScriptHostInterface { }","affectsGlobalScope":true},"-15683237936-export const core = 10;",{"version":"-16628394009-export const file = 10;","signature":"-9025507999-export declare const file = 10;\n"},{"version":"-15920922626-/// \n/// \n/// \n","signature":"5381-"},{"version":"-11532698187-export const x = \"type1\";","signature":"-5899226897-export declare const x = \"type1\";\n"},"-13729955264-export const y = 10;"],"root":[[3,7]],"options":{"composite":true},"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.d.ts","../../lib/lib.scripthost.d.ts","./core.d.ts","./file.ts","./file2.ts","./index.ts","./utils.d.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-5403980302-interface ScriptHostInterface { }","affectsGlobalScope":true},"-15683237936-export const core = 10;",{"version":"-16628394009-export const file = 10;","signature":"-9025507999-export declare const file = 10;\n"},{"version":"-15920922626-/// \n/// \n/// \n","signature":"5381-"},{"version":"-11532698187-export const x = \"type1\";","signature":"-5899226897-export declare const x = \"type1\";\n"},"-13729955264-export const y = 10;"],"root":[[3,7]],"options":{"composite":true},"latestChangedDtsFile":"./index.d.ts","errors":true,"version":"FakeTSVersion"} //// [/home/src/projects/project1/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -260,7 +260,8 @@ exports.x = "type1"; "composite": true }, "latestChangedDtsFile": "./index.d.ts", + "errors": true, "version": "FakeTSVersion", - "size": 1286 + "size": 1300 } diff --git a/tests/baselines/reference/tsc/moduleResolution/alternateResult.js b/tests/baselines/reference/tsc/moduleResolution/alternateResult.js index 2baf46187b384..5a12ea54c693a 100644 --- a/tests/baselines/reference/tsc/moduleResolution/alternateResult.js +++ b/tests/baselines/reference/tsc/moduleResolution/alternateResult.js @@ -461,19 +461,19 @@ export {}; "semanticDiagnosticsPerFile": [ [ "../../../../lib/lib.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/foo2/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/@types/bar2/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./index.mts", - "not cached or not changed" + "not cached" ] ], "version": "FakeTSVersion", @@ -1682,23 +1682,23 @@ Shape signatures in builder refreshed for:: "semanticDiagnosticsPerFile": [ [ "../../../../lib/lib.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/@types/bar/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/foo2/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/@types/bar2/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./index.mts", - "not cached or not changed" + "not cached" ] ], "version": "FakeTSVersion", @@ -1972,27 +1972,27 @@ Shape signatures in builder refreshed for:: "semanticDiagnosticsPerFile": [ [ "../../../../lib/lib.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/foo/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/@types/bar/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/foo2/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/@types/bar2/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./index.mts", - "not cached or not changed" + "not cached" ] ], "version": "FakeTSVersion", @@ -2290,23 +2290,23 @@ Shape signatures in builder refreshed for:: "semanticDiagnosticsPerFile": [ [ "../../../../lib/lib.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/foo/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/@types/bar/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/foo2/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./index.mts", - "not cached or not changed" + "not cached" ] ], "version": "FakeTSVersion", @@ -2621,19 +2621,19 @@ Shape signatures in builder refreshed for:: "semanticDiagnosticsPerFile": [ [ "../../../../lib/lib.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/foo/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/@types/bar/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./index.mts", - "not cached or not changed" + "not cached" ] ], "version": "FakeTSVersion", diff --git a/tests/baselines/reference/tsc/noEmitOnError/multiFile/syntax-errors-with-declaration-with-incremental.js b/tests/baselines/reference/tsc/noEmitOnError/multiFile/syntax-errors-with-declaration-with-incremental.js index 6d994b4c0dacd..59b068da532fd 100644 --- a/tests/baselines/reference/tsc/noEmitOnError/multiFile/syntax-errors-with-declaration-with-incremental.js +++ b/tests/baselines/reference/tsc/noEmitOnError/multiFile/syntax-errors-with-declaration-with-incremental.js @@ -89,7 +89,7 @@ Shape signatures in builder refreshed for:: //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"affectedFilesPendingEmit":[2,3,4],"version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"affectedFilesPendingEmit":[2,3,4],"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -164,8 +164,9 @@ Shape signatures in builder refreshed for:: "Js | Dts" ] ], + "errors": true, "version": "FakeTSVersion", - "size": 988 + "size": 1002 } diff --git a/tests/baselines/reference/tsc/noEmitOnError/multiFile/syntax-errors-with-incremental.js b/tests/baselines/reference/tsc/noEmitOnError/multiFile/syntax-errors-with-incremental.js index f4eeefd6502c3..d9571ff015651 100644 --- a/tests/baselines/reference/tsc/noEmitOnError/multiFile/syntax-errors-with-incremental.js +++ b/tests/baselines/reference/tsc/noEmitOnError/multiFile/syntax-errors-with-incremental.js @@ -87,7 +87,7 @@ Shape signatures in builder refreshed for:: //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"affectedFilesPendingEmit":[2,3,4],"version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"affectedFilesPendingEmit":[2,3,4],"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -161,8 +161,9 @@ Shape signatures in builder refreshed for:: "Js" ] ], + "errors": true, "version": "FakeTSVersion", - "size": 969 + "size": 983 } diff --git a/tests/baselines/reference/tsc/noEmitOnError/outFile/syntax-errors-with-declaration-with-incremental.js b/tests/baselines/reference/tsc/noEmitOnError/outFile/syntax-errors-with-declaration-with-incremental.js index a7218ab329887..355855188eecf 100644 --- a/tests/baselines/reference/tsc/noEmitOnError/outFile/syntax-errors-with-declaration-with-incremental.js +++ b/tests/baselines/reference/tsc/noEmitOnError/outFile/syntax-errors-with-declaration-with-incremental.js @@ -87,7 +87,7 @@ No shapes updated in the builder:: //// [/user/username/projects/dev-build.tsbuildinfo] -{"fileNames":["../../../a/lib/lib.d.ts","./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"fileInfos":["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; };","-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"declaration":true,"module":2,"noEmitOnError":true,"outFile":"./dev-build.js"},"pendingEmit":false,"version":"FakeTSVersion"} +{"fileNames":["../../../a/lib/lib.d.ts","./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"fileInfos":["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; };","-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"declaration":true,"module":2,"noEmitOnError":true,"outFile":"./dev-build.js"},"pendingEmit":false,"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] { @@ -126,8 +126,9 @@ No shapes updated in the builder:: "Js | Dts", false ], + "errors": true, "version": "FakeTSVersion", - "size": 948 + "size": 962 } diff --git a/tests/baselines/reference/tsc/noEmitOnError/outFile/syntax-errors-with-incremental.js b/tests/baselines/reference/tsc/noEmitOnError/outFile/syntax-errors-with-incremental.js index 7bb0d8f11ab83..078d06e48f93b 100644 --- a/tests/baselines/reference/tsc/noEmitOnError/outFile/syntax-errors-with-incremental.js +++ b/tests/baselines/reference/tsc/noEmitOnError/outFile/syntax-errors-with-incremental.js @@ -85,7 +85,7 @@ No shapes updated in the builder:: //// [/user/username/projects/dev-build.tsbuildinfo] -{"fileNames":["../../../a/lib/lib.d.ts","./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"fileInfos":["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; };","-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"module":2,"noEmitOnError":true,"outFile":"./dev-build.js"},"pendingEmit":false,"version":"FakeTSVersion"} +{"fileNames":["../../../a/lib/lib.d.ts","./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"fileInfos":["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; };","-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"module":2,"noEmitOnError":true,"outFile":"./dev-build.js"},"pendingEmit":false,"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] { @@ -123,8 +123,9 @@ No shapes updated in the builder:: "Js", false ], + "errors": true, "version": "FakeTSVersion", - "size": 929 + "size": 943 } diff --git a/tests/baselines/reference/tsc/projectReferencesConfig/errors-when-a-file-is-outside-the-rootdir.js b/tests/baselines/reference/tsc/projectReferencesConfig/errors-when-a-file-is-outside-the-rootdir.js index bd48973a2dc18..e265a34a6ee44 100644 --- a/tests/baselines/reference/tsc/projectReferencesConfig/errors-when-a-file-is-outside-the-rootdir.js +++ b/tests/baselines/reference/tsc/projectReferencesConfig/errors-when-a-file-is-outside-the-rootdir.js @@ -60,7 +60,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); //// [/alpha/bin/tsconfig.tsbuildinfo] -{"fileNames":["../../lib/lib.d.ts","../../beta/b.ts","../src/a.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-3360792065-export { }","signature":"-3531856636-export {};\n"},{"version":"-5654511483-import * as b from '../../beta/b'","signature":"-3531856636-export {};\n"}],"root":[3],"options":{"composite":true,"outDir":"./"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/a.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.d.ts","../../beta/b.ts","../src/a.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-3360792065-export { }","signature":"-3531856636-export {};\n"},{"version":"-5654511483-import * as b from '../../beta/b'","signature":"-3531856636-export {};\n"}],"root":[3],"options":{"composite":true,"outDir":"./"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./src/a.d.ts","errors":true,"version":"FakeTSVersion"} //// [/alpha/bin/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -117,8 +117,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); ] }, "latestChangedDtsFile": "./src/a.d.ts", + "errors": true, "version": "FakeTSVersion", - "size": 898 + "size": 912 } //// [/beta/b.d.ts] diff --git a/tests/baselines/reference/tsc/projectReferencesConfig/errors-when-declaration-=-false.js b/tests/baselines/reference/tsc/projectReferencesConfig/errors-when-declaration-=-false.js index ab744c69527e5..64ac0c89f1e1a 100644 --- a/tests/baselines/reference/tsc/projectReferencesConfig/errors-when-declaration-=-false.js +++ b/tests/baselines/reference/tsc/projectReferencesConfig/errors-when-declaration-=-false.js @@ -94,11 +94,11 @@ Object.defineProperty(exports, "__esModule", { value: true }); "semanticDiagnosticsPerFile": [ [ "../../lib/lib.d.ts", - "not cached or not changed" + "not cached" ], [ "../a.ts", - "not cached or not changed" + "not cached" ] ], "latestChangedDtsFile": "./a.d.ts", diff --git a/tests/baselines/reference/tsc/projectReferencesConfig/errors-when-the-file-list-is-not-exhaustive.js b/tests/baselines/reference/tsc/projectReferencesConfig/errors-when-the-file-list-is-not-exhaustive.js index fb167bf21a62c..b482e7e1af9fc 100644 --- a/tests/baselines/reference/tsc/projectReferencesConfig/errors-when-the-file-list-is-not-exhaustive.js +++ b/tests/baselines/reference/tsc/projectReferencesConfig/errors-when-the-file-list-is-not-exhaustive.js @@ -67,7 +67,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); //// [/primary/bin/tsconfig.tsbuildinfo] -{"fileNames":["../../lib/lib.d.ts","../b.ts","../a.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-2704852577-export {}","signature":"-3531856636-export {};\n"},{"version":"-4190788607-import * as b from './b'","signature":"-3531856636-export {};\n"}],"root":[3],"options":{"composite":true,"outDir":"./"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./a.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.d.ts","../b.ts","../a.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-2704852577-export {}","signature":"-3531856636-export {};\n"},{"version":"-4190788607-import * as b from './b'","signature":"-3531856636-export {};\n"}],"root":[3],"options":{"composite":true,"outDir":"./"},"referencedMap":[[3,1]],"latestChangedDtsFile":"./a.d.ts","errors":true,"version":"FakeTSVersion"} //// [/primary/bin/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -124,7 +124,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); ] }, "latestChangedDtsFile": "./a.d.ts", + "errors": true, "version": "FakeTSVersion", - "size": 872 + "size": 886 } diff --git a/tests/baselines/reference/tsc/projectReferencesConfig/errors-when-the-referenced-project-doesnt-exist.js b/tests/baselines/reference/tsc/projectReferencesConfig/errors-when-the-referenced-project-doesnt-exist.js index 15f94406b70a4..3675089c127a7 100644 --- a/tests/baselines/reference/tsc/projectReferencesConfig/errors-when-the-referenced-project-doesnt-exist.js +++ b/tests/baselines/reference/tsc/projectReferencesConfig/errors-when-the-referenced-project-doesnt-exist.js @@ -100,11 +100,11 @@ Object.defineProperty(exports, "__esModule", { value: true }); "semanticDiagnosticsPerFile": [ [ "../../lib/lib.d.ts", - "not cached or not changed" + "not cached" ], [ "../a.ts", - "not cached or not changed" + "not cached" ] ], "latestChangedDtsFile": "./a.d.ts", diff --git a/tests/baselines/reference/tsc/projectReferencesConfig/errors-when-the-referenced-project-doesnt-have-composite.js b/tests/baselines/reference/tsc/projectReferencesConfig/errors-when-the-referenced-project-doesnt-have-composite.js index 3a8191e97e687..7f7d445a2bbd5 100644 --- a/tests/baselines/reference/tsc/projectReferencesConfig/errors-when-the-referenced-project-doesnt-have-composite.js +++ b/tests/baselines/reference/tsc/projectReferencesConfig/errors-when-the-referenced-project-doesnt-have-composite.js @@ -115,11 +115,11 @@ Object.defineProperty(exports, "__esModule", { value: true }); "semanticDiagnosticsPerFile": [ [ "../../lib/lib.d.ts", - "not cached or not changed" + "not cached" ], [ "../b.ts", - "not cached or not changed" + "not cached" ] ], "latestChangedDtsFile": "./b.d.ts", diff --git a/tests/baselines/reference/tscWatch/libraryResolution/unknwon-lib.js b/tests/baselines/reference/tscWatch/libraryResolution/unknwon-lib.js index 0115ddd4560e8..563c3039eadf0 100644 --- a/tests/baselines/reference/tscWatch/libraryResolution/unknwon-lib.js +++ b/tests/baselines/reference/tscWatch/libraryResolution/unknwon-lib.js @@ -157,7 +157,7 @@ export declare const x = "type1"; //// [/home/src/projects/project1/tsconfig.tsbuildinfo] -{"fileNames":["../../lib/lib.d.ts","../../lib/lib.scripthost.d.ts","./core.d.ts","./file.ts","./file2.ts","./index.ts","./utils.d.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-5403980302-interface ScriptHostInterface { }","affectsGlobalScope":true},"-15683237936-export const core = 10;",{"version":"-16628394009-export const file = 10;","signature":"-9025507999-export declare const file = 10;\n"},{"version":"-15920922626-/// \n/// \n/// \n","signature":"5381-"},{"version":"-11532698187-export const x = \"type1\";","signature":"-5899226897-export declare const x = \"type1\";\n"},"-13729955264-export const y = 10;"],"root":[[3,7]],"options":{"composite":true},"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.d.ts","../../lib/lib.scripthost.d.ts","./core.d.ts","./file.ts","./file2.ts","./index.ts","./utils.d.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-5403980302-interface ScriptHostInterface { }","affectsGlobalScope":true},"-15683237936-export const core = 10;",{"version":"-16628394009-export const file = 10;","signature":"-9025507999-export declare const file = 10;\n"},{"version":"-15920922626-/// \n/// \n/// \n","signature":"5381-"},{"version":"-11532698187-export const x = \"type1\";","signature":"-5899226897-export declare const x = \"type1\";\n"},"-13729955264-export const y = 10;"],"root":[[3,7]],"options":{"composite":true},"latestChangedDtsFile":"./index.d.ts","errors":true,"version":"FakeTSVersion"} //// [/home/src/projects/project1/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -241,8 +241,9 @@ export declare const x = "type1"; "composite": true }, "latestChangedDtsFile": "./index.d.ts", + "errors": true, "version": "FakeTSVersion", - "size": 1286 + "size": 1300 } @@ -395,7 +396,7 @@ export declare const xyz = 10; //// [/home/src/projects/project1/tsconfig.tsbuildinfo] -{"fileNames":["../../lib/lib.d.ts","../../lib/lib.scripthost.d.ts","./core.d.ts","./file.ts","./file2.ts","./index.ts","./utils.d.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-5403980302-interface ScriptHostInterface { }","affectsGlobalScope":true},"-15683237936-export const core = 10;",{"version":"-16628394009-export const file = 10;","signature":"-9025507999-export declare const file = 10;\n"},{"version":"-15920922626-/// \n/// \n/// \n","signature":"5381-"},{"version":"-6136895998-export const x = \"type1\";export const xyz = 10;","signature":"-9988949802-export declare const x = \"type1\";\nexport declare const xyz = 10;\n"},"-13729955264-export const y = 10;"],"root":[[3,7]],"options":{"composite":true},"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.d.ts","../../lib/lib.scripthost.d.ts","./core.d.ts","./file.ts","./file2.ts","./index.ts","./utils.d.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-5403980302-interface ScriptHostInterface { }","affectsGlobalScope":true},"-15683237936-export const core = 10;",{"version":"-16628394009-export const file = 10;","signature":"-9025507999-export declare const file = 10;\n"},{"version":"-15920922626-/// \n/// \n/// \n","signature":"5381-"},{"version":"-6136895998-export const x = \"type1\";export const xyz = 10;","signature":"-9988949802-export declare const x = \"type1\";\nexport declare const xyz = 10;\n"},"-13729955264-export const y = 10;"],"root":[[3,7]],"options":{"composite":true},"latestChangedDtsFile":"./index.d.ts","errors":true,"version":"FakeTSVersion"} //// [/home/src/projects/project1/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -479,8 +480,9 @@ export declare const xyz = 10; "composite": true }, "latestChangedDtsFile": "./index.d.ts", + "errors": true, "version": "FakeTSVersion", - "size": 1339 + "size": 1353 } @@ -578,7 +580,7 @@ project1/utils.d.ts //// [/home/src/projects/project1/tsconfig.tsbuildinfo] -{"fileNames":["../../lib/lib.d.ts","../../lib/lib.scripthost.d.ts","./file.ts","./file2.ts","./index.ts","./utils.d.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-5403980302-interface ScriptHostInterface { }","affectsGlobalScope":true},{"version":"-16628394009-export const file = 10;","signature":"-9025507999-export declare const file = 10;\n"},{"version":"-15920922626-/// \n/// \n/// \n","signature":"5381-"},{"version":"-6136895998-export const x = \"type1\";export const xyz = 10;","signature":"-9988949802-export declare const x = \"type1\";\nexport declare const xyz = 10;\n"},"-13729955264-export const y = 10;"],"root":[[3,6]],"options":{"composite":true},"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.d.ts","../../lib/lib.scripthost.d.ts","./file.ts","./file2.ts","./index.ts","./utils.d.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-5403980302-interface ScriptHostInterface { }","affectsGlobalScope":true},{"version":"-16628394009-export const file = 10;","signature":"-9025507999-export declare const file = 10;\n"},{"version":"-15920922626-/// \n/// \n/// \n","signature":"5381-"},{"version":"-6136895998-export const x = \"type1\";export const xyz = 10;","signature":"-9988949802-export declare const x = \"type1\";\nexport declare const xyz = 10;\n"},"-13729955264-export const y = 10;"],"root":[[3,6]],"options":{"composite":true},"latestChangedDtsFile":"./index.d.ts","errors":true,"version":"FakeTSVersion"} //// [/home/src/projects/project1/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -656,8 +658,9 @@ project1/utils.d.ts "composite": true }, "latestChangedDtsFile": "./index.d.ts", + "errors": true, "version": "FakeTSVersion", - "size": 1286 + "size": 1300 } @@ -784,7 +787,7 @@ project1/utils.d.ts //// [/home/src/projects/project1/tsconfig.tsbuildinfo] -{"fileNames":["../../lib/lib.d.ts","../../lib/lib.scripthost.d.ts","./file.ts","./file2.ts","./index.ts","./utils.d.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-5403980302-interface ScriptHostInterface { }","affectsGlobalScope":true},{"version":"-16628394009-export const file = 10;","signature":"-9025507999-export declare const file = 10;\n"},{"version":"-13885971376-/// \n/// \n","signature":"5381-"},{"version":"-6136895998-export const x = \"type1\";export const xyz = 10;","signature":"-9988949802-export declare const x = \"type1\";\nexport declare const xyz = 10;\n"},"-13729955264-export const y = 10;"],"root":[[3,6]],"options":{"composite":true},"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.d.ts","../../lib/lib.scripthost.d.ts","./file.ts","./file2.ts","./index.ts","./utils.d.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-5403980302-interface ScriptHostInterface { }","affectsGlobalScope":true},{"version":"-16628394009-export const file = 10;","signature":"-9025507999-export declare const file = 10;\n"},{"version":"-13885971376-/// \n/// \n","signature":"5381-"},{"version":"-6136895998-export const x = \"type1\";export const xyz = 10;","signature":"-9988949802-export declare const x = \"type1\";\nexport declare const xyz = 10;\n"},"-13729955264-export const y = 10;"],"root":[[3,6]],"options":{"composite":true},"latestChangedDtsFile":"./index.d.ts","errors":true,"version":"FakeTSVersion"} //// [/home/src/projects/project1/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -862,8 +865,9 @@ project1/utils.d.ts "composite": true }, "latestChangedDtsFile": "./index.d.ts", + "errors": true, "version": "FakeTSVersion", - "size": 1249 + "size": 1263 } diff --git a/tests/baselines/reference/tscWatch/moduleResolution/alternateResult.js b/tests/baselines/reference/tscWatch/moduleResolution/alternateResult.js index 4d607e1c55178..504db1786f660 100644 --- a/tests/baselines/reference/tscWatch/moduleResolution/alternateResult.js +++ b/tests/baselines/reference/tscWatch/moduleResolution/alternateResult.js @@ -453,19 +453,19 @@ export {}; "semanticDiagnosticsPerFile": [ [ "../../../../a/lib/lib.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/foo2/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/@types/bar2/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./index.mts", - "not cached or not changed" + "not cached" ] ], "version": "FakeTSVersion", @@ -1360,23 +1360,23 @@ File '/package.json' does not exist according to earlier cached lookups. "semanticDiagnosticsPerFile": [ [ "../../../../a/lib/lib.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/@types/bar/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/foo2/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/@types/bar2/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./index.mts", - "not cached or not changed" + "not cached" ] ], "version": "FakeTSVersion", @@ -1654,27 +1654,27 @@ Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modu "semanticDiagnosticsPerFile": [ [ "../../../../a/lib/lib.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/foo/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/@types/bar/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/foo2/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/@types/bar2/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./index.mts", - "not cached or not changed" + "not cached" ] ], "version": "FakeTSVersion", @@ -1992,23 +1992,23 @@ Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modu "semanticDiagnosticsPerFile": [ [ "../../../../a/lib/lib.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/foo/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/@types/bar/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/foo2/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./index.mts", - "not cached or not changed" + "not cached" ] ], "version": "FakeTSVersion", @@ -2289,19 +2289,19 @@ FileWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/foo2/in "semanticDiagnosticsPerFile": [ [ "../../../../a/lib/lib.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/foo/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./node_modules/@types/bar/index.d.ts", - "not cached or not changed" + "not cached" ], [ "./index.mts", - "not cached or not changed" + "not cached" ] ], "version": "FakeTSVersion", diff --git a/tests/baselines/reference/tscWatch/noEmitOnError/multiFile/noEmitOnError-with-declaration-with-incremental.js b/tests/baselines/reference/tscWatch/noEmitOnError/multiFile/noEmitOnError-with-declaration-with-incremental.js index 3579a004e41d9..0b6c88400ba18 100644 --- a/tests/baselines/reference/tscWatch/noEmitOnError/multiFile/noEmitOnError-with-declaration-with-incremental.js +++ b/tests/baselines/reference/tscWatch/noEmitOnError/multiFile/noEmitOnError-with-declaration-with-incremental.js @@ -59,7 +59,7 @@ Output:: //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"affectedFilesPendingEmit":[2,3,4],"version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"affectedFilesPendingEmit":[2,3,4],"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -134,8 +134,9 @@ Output:: "Js | Dts" ] ], + "errors": true, "version": "FakeTSVersion", - "size": 988 + "size": 1002 } diff --git a/tests/baselines/reference/tscWatch/noEmitOnError/multiFile/noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/noEmitOnError/multiFile/noEmitOnError-with-incremental.js index 5f0b153b4c72f..31c5f0c0ace3a 100644 --- a/tests/baselines/reference/tscWatch/noEmitOnError/multiFile/noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/noEmitOnError/multiFile/noEmitOnError-with-incremental.js @@ -58,7 +58,7 @@ Output:: //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"affectedFilesPendingEmit":[2,3,4],"version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"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; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"affectedFilesPendingEmit":[2,3,4],"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -132,8 +132,9 @@ Output:: "Js" ] ], + "errors": true, "version": "FakeTSVersion", - "size": 969 + "size": 983 } diff --git a/tests/baselines/reference/tscWatch/noEmitOnError/outFile/noEmitOnError-with-declaration-with-incremental.js b/tests/baselines/reference/tscWatch/noEmitOnError/outFile/noEmitOnError-with-declaration-with-incremental.js index 4acea46b40c3c..6dabdc7b179e6 100644 --- a/tests/baselines/reference/tscWatch/noEmitOnError/outFile/noEmitOnError-with-declaration-with-incremental.js +++ b/tests/baselines/reference/tscWatch/noEmitOnError/outFile/noEmitOnError-with-declaration-with-incremental.js @@ -60,7 +60,7 @@ Output:: //// [/user/username/projects/dev-build.tsbuildinfo] -{"fileNames":["../../../a/lib/lib.d.ts","./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"fileInfos":["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; };","-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"declaration":true,"module":2,"noEmitOnError":true,"outFile":"./dev-build.js"},"pendingEmit":false,"version":"FakeTSVersion"} +{"fileNames":["../../../a/lib/lib.d.ts","./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"fileInfos":["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; };","-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"declaration":true,"module":2,"noEmitOnError":true,"outFile":"./dev-build.js"},"pendingEmit":false,"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] { @@ -99,8 +99,9 @@ Output:: "Js | Dts", false ], + "errors": true, "version": "FakeTSVersion", - "size": 948 + "size": 962 } diff --git a/tests/baselines/reference/tscWatch/noEmitOnError/outFile/noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/noEmitOnError/outFile/noEmitOnError-with-incremental.js index 20cc7642b6a55..f3567ce6e7ca7 100644 --- a/tests/baselines/reference/tscWatch/noEmitOnError/outFile/noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/noEmitOnError/outFile/noEmitOnError-with-incremental.js @@ -59,7 +59,7 @@ Output:: //// [/user/username/projects/dev-build.tsbuildinfo] -{"fileNames":["../../../a/lib/lib.d.ts","./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"fileInfos":["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; };","-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"module":2,"noEmitOnError":true,"outFile":"./dev-build.js"},"pendingEmit":false,"version":"FakeTSVersion"} +{"fileNames":["../../../a/lib/lib.d.ts","./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"fileInfos":["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; };","-5014788164-export interface A {\n name: string;\n}\n","-2574607723-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n;\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"module":2,"noEmitOnError":true,"outFile":"./dev-build.js"},"pendingEmit":false,"errors":true,"version":"FakeTSVersion"} //// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] { @@ -97,8 +97,9 @@ Output:: "Js", false ], + "errors": true, "version": "FakeTSVersion", - "size": 929 + "size": 943 } diff --git a/tests/baselines/reference/tscWatch/programUpdates/when-new-file-is-added-to-the-referenced-project.js b/tests/baselines/reference/tscWatch/programUpdates/when-new-file-is-added-to-the-referenced-project.js index faebd7f9aaea6..e20784b3f1145 100644 --- a/tests/baselines/reference/tscWatch/programUpdates/when-new-file-is-added-to-the-referenced-project.js +++ b/tests/baselines/reference/tscWatch/programUpdates/when-new-file-is-added-to-the-referenced-project.js @@ -253,6 +253,62 @@ FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/projects/proj +//// [/user/username/projects/myproject/projects/project2/tsconfig.tsbuildinfo] +{"fileNames":["../../../../../../a/lib/lib.d.ts","../project1/class1.d.ts","./class2.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},{"version":"-3469237238-declare class class1 {}","affectsGlobalScope":true},{"version":"777969115-class class2 {}","signature":"-2684084705-declare class class2 {\n}\n","affectsGlobalScope":true}],"root":[3],"options":{"composite":true,"module":0},"latestChangedDtsFile":"./class2.d.ts","errors":true,"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/projects/project2/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../../../../../../a/lib/lib.d.ts", + "../project1/class1.d.ts", + "./class2.ts" + ], + "fileInfos": { + "../../../../../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \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; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \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; }", + "signature": "-7698705165-/// \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; }", + "affectsGlobalScope": true + }, + "../project1/class1.d.ts": { + "original": { + "version": "-3469237238-declare class class1 {}", + "affectsGlobalScope": true + }, + "version": "-3469237238-declare class class1 {}", + "signature": "-3469237238-declare class class1 {}", + "affectsGlobalScope": true + }, + "./class2.ts": { + "original": { + "version": "777969115-class class2 {}", + "signature": "-2684084705-declare class class2 {\n}\n", + "affectsGlobalScope": true + }, + "version": "777969115-class class2 {}", + "signature": "-2684084705-declare class class2 {\n}\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + 3, + "./class2.ts" + ] + ], + "options": { + "composite": true, + "module": 0 + }, + "latestChangedDtsFile": "./class2.d.ts", + "errors": true, + "version": "FakeTSVersion", + "size": 829 +} + PolledWatches:: /user/username/projects/myproject/node_modules/@types: @@ -629,11 +685,11 @@ FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/projects/proj "semanticDiagnosticsPerFile": [ [ "../project1/class1.d.ts", - "not cached or not changed" + "not cached" ], [ "./class2.ts", - "not cached or not changed" + "not cached" ] ], "latestChangedDtsFile": "./class2.d.ts", diff --git a/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references-in-different-folders-with-no-files-clause.js b/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references-in-different-folders-with-no-files-clause.js index 13ce6db1e78e7..0e9ddb37c710d 100644 --- a/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references-in-different-folders-with-no-files-clause.js +++ b/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references-in-different-folders-with-no-files-clause.js @@ -212,12 +212,15 @@ a_1.X; //// [/user/username/projects/transitiveReferences/c/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./index.ts"],"version":"FakeTSVersion"} //// [/user/username/projects/transitiveReferences/c/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 49 } diff --git a/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references-in-different-folders.js b/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references-in-different-folders.js index af455d5581084..ddd3464c38578 100644 --- a/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references-in-different-folders.js +++ b/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references-in-different-folders.js @@ -221,12 +221,15 @@ a_1.X; //// [/user/username/projects/transitiveReferences/c/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./index.ts"],"version":"FakeTSVersion"} //// [/user/username/projects/transitiveReferences/c/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 49 } diff --git a/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references-with-nodenext.js b/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references-with-nodenext.js index ea7ccdc2a1507..1696a203bea32 100644 --- a/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references-with-nodenext.js +++ b/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references-with-nodenext.js @@ -249,12 +249,15 @@ a_1.X; //// [/user/username/projects/transitiveReferences/tsconfig.c.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./c.ts"],"version":"FakeTSVersion"} //// [/user/username/projects/transitiveReferences/tsconfig.c.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./c.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 45 } diff --git a/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references.js b/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references.js index f61b93cb66ffb..b6cd8ea567b72 100644 --- a/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references.js +++ b/tests/baselines/reference/tscWatch/projectsWithReferences/on-transitive-references.js @@ -226,12 +226,15 @@ a_1.X; //// [/user/username/projects/transitiveReferences/tsconfig.c.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./c.ts"],"version":"FakeTSVersion"} //// [/user/username/projects/transitiveReferences/tsconfig.c.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./c.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 45 } diff --git a/tests/baselines/reference/tscWatch/projectsWithReferences/when-referenced-project-uses-different-module-resolution.js b/tests/baselines/reference/tscWatch/projectsWithReferences/when-referenced-project-uses-different-module-resolution.js index 84aab6cbaf997..0709881047139 100644 --- a/tests/baselines/reference/tscWatch/projectsWithReferences/when-referenced-project-uses-different-module-resolution.js +++ b/tests/baselines/reference/tscWatch/projectsWithReferences/when-referenced-project-uses-different-module-resolution.js @@ -219,12 +219,15 @@ a_1.X; //// [/user/username/projects/transitiveReferences/tsconfig.c.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./c.ts"],"version":"FakeTSVersion"} //// [/user/username/projects/transitiveReferences/tsconfig.c.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./c.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 45 } diff --git a/tests/baselines/reference/tscWatch/symlinks/monorepo-style-sibling-packages-symlinked-Linux.js b/tests/baselines/reference/tscWatch/symlinks/monorepo-style-sibling-packages-symlinked-Linux.js index e3c78516a7ef0..bdb24d97e5e06 100644 --- a/tests/baselines/reference/tscWatch/symlinks/monorepo-style-sibling-packages-symlinked-Linux.js +++ b/tests/baselines/reference/tscWatch/symlinks/monorepo-style-sibling-packages-symlinked-Linux.js @@ -293,12 +293,15 @@ export type BarType = "bar"; //// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] Inode:: 27 -{"version":"FakeTSVersion"} +{"root":["./src/index.ts"],"version":"FakeTSVersion"} //// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 28 { + "root": [ + "./src/index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 53 } diff --git a/tests/baselines/reference/tscWatch/symlinks/monorepo-style-sibling-packages-symlinked-package1-built-Linux.js b/tests/baselines/reference/tscWatch/symlinks/monorepo-style-sibling-packages-symlinked-package1-built-Linux.js index f1f8a14b9b30c..238cda3033061 100644 --- a/tests/baselines/reference/tscWatch/symlinks/monorepo-style-sibling-packages-symlinked-package1-built-Linux.js +++ b/tests/baselines/reference/tscWatch/symlinks/monorepo-style-sibling-packages-symlinked-package1-built-Linux.js @@ -92,12 +92,15 @@ export type BarType = "bar"; //// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] Inode:: 24 -{"version":"FakeTSVersion"} +{"root":["./src/index.ts"],"version":"FakeTSVersion"} //// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 25 { + "root": [ + "./src/index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 53 } diff --git a/tests/baselines/reference/tscWatch/symlinks/monorepo-style-sibling-packages-symlinked-package1-built.js b/tests/baselines/reference/tscWatch/symlinks/monorepo-style-sibling-packages-symlinked-package1-built.js index aa3e73ca2e029..62c52f497895a 100644 --- a/tests/baselines/reference/tscWatch/symlinks/monorepo-style-sibling-packages-symlinked-package1-built.js +++ b/tests/baselines/reference/tscWatch/symlinks/monorepo-style-sibling-packages-symlinked-package1-built.js @@ -92,12 +92,15 @@ export type BarType = "bar"; //// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./src/index.ts"],"version":"FakeTSVersion"} //// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./src/index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 53 } diff --git a/tests/baselines/reference/tscWatch/symlinks/monorepo-style-sibling-packages-symlinked.js b/tests/baselines/reference/tscWatch/symlinks/monorepo-style-sibling-packages-symlinked.js index 20897b812aca5..d3ed0c93f7652 100644 --- a/tests/baselines/reference/tscWatch/symlinks/monorepo-style-sibling-packages-symlinked.js +++ b/tests/baselines/reference/tscWatch/symlinks/monorepo-style-sibling-packages-symlinked.js @@ -289,12 +289,15 @@ export type BarType = "bar"; //// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./src/index.ts"],"version":"FakeTSVersion"} //// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./src/index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 53 } diff --git a/tests/baselines/reference/tscWatch/watchApi/when-new-file-is-added-to-the-referenced-project-with-host-implementing-getParsedCommandLine-without-implementing-useSourceOfProjectReferenceRedirect.js b/tests/baselines/reference/tscWatch/watchApi/when-new-file-is-added-to-the-referenced-project-with-host-implementing-getParsedCommandLine-without-implementing-useSourceOfProjectReferenceRedirect.js index 739853bb299fe..35b372f84ef20 100644 --- a/tests/baselines/reference/tscWatch/watchApi/when-new-file-is-added-to-the-referenced-project-with-host-implementing-getParsedCommandLine-without-implementing-useSourceOfProjectReferenceRedirect.js +++ b/tests/baselines/reference/tscWatch/watchApi/when-new-file-is-added-to-the-referenced-project-with-host-implementing-getParsedCommandLine-without-implementing-useSourceOfProjectReferenceRedirect.js @@ -251,6 +251,62 @@ FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/projects/proj +//// [/user/username/projects/myproject/projects/project2/tsconfig.tsbuildinfo] +{"fileNames":["../../../../../../a/lib/lib.d.ts","../project1/class1.d.ts","./class2.ts"],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},{"version":"-3469237238-declare class class1 {}","affectsGlobalScope":true},{"version":"777969115-class class2 {}","signature":"-2684084705-declare class class2 {\n}\n","affectsGlobalScope":true}],"root":[3],"options":{"composite":true,"module":0},"latestChangedDtsFile":"./class2.d.ts","errors":true,"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/projects/project2/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../../../../../../a/lib/lib.d.ts", + "../project1/class1.d.ts", + "./class2.ts" + ], + "fileInfos": { + "../../../../../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \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; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \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; }", + "signature": "-7698705165-/// \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; }", + "affectsGlobalScope": true + }, + "../project1/class1.d.ts": { + "original": { + "version": "-3469237238-declare class class1 {}", + "affectsGlobalScope": true + }, + "version": "-3469237238-declare class class1 {}", + "signature": "-3469237238-declare class class1 {}", + "affectsGlobalScope": true + }, + "./class2.ts": { + "original": { + "version": "777969115-class class2 {}", + "signature": "-2684084705-declare class class2 {\n}\n", + "affectsGlobalScope": true + }, + "version": "777969115-class class2 {}", + "signature": "-2684084705-declare class class2 {\n}\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + 3, + "./class2.ts" + ] + ], + "options": { + "composite": true, + "module": 0 + }, + "latestChangedDtsFile": "./class2.d.ts", + "errors": true, + "version": "FakeTSVersion", + "size": 829 +} + PolledWatches:: /user/username/projects/myproject/node_modules/@types: @@ -623,11 +679,11 @@ FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/projects/proj "semanticDiagnosticsPerFile": [ [ "../project1/class1.d.ts", - "not cached or not changed" + "not cached" ], [ "./class2.ts", - "not cached or not changed" + "not cached" ] ], "latestChangedDtsFile": "./class2.d.ts", diff --git a/tests/baselines/reference/tsserver/configuredProjects/when-default-configured-project-does-not-contain-the-file.js b/tests/baselines/reference/tsserver/configuredProjects/when-default-configured-project-does-not-contain-the-file.js index 13c7508b8eed0..5ec14fc5d532e 100644 --- a/tests/baselines/reference/tsserver/configuredProjects/when-default-configured-project-does-not-contain-the-file.js +++ b/tests/baselines/reference/tsserver/configuredProjects/when-default-configured-project-does-not-contain-the-file.js @@ -54,12 +54,15 @@ export declare function foo(): void; //// [/user/username/projects/myproject/foo/lib/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../index.ts"],"version":"FakeTSVersion"} //// [/user/username/projects/myproject/foo/lib/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 50 } diff --git a/tests/baselines/reference/tsserver/projectReferences/ancestor-and-project-ref-management.js b/tests/baselines/reference/tsserver/projectReferences/ancestor-and-project-ref-management.js index 363298b5966be..ac76ef9bdd65a 100644 --- a/tests/baselines/reference/tsserver/projectReferences/ancestor-and-project-ref-management.js +++ b/tests/baselines/reference/tsserver/projectReferences/ancestor-and-project-ref-management.js @@ -155,12 +155,15 @@ var container; //// [/user/username/projects/container/built/local/exec.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../../exec/index.ts"],"version":"FakeTSVersion"} //// [/user/username/projects/container/built/local/exec.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../../exec/index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 58 } //// [/user/username/projects/container/built/local/compositeExec.js] diff --git a/tests/baselines/reference/tsserver/projectReferences/auto-import-with-referenced-project-when-built-with-disableSourceOfProjectReferenceRedirect.js b/tests/baselines/reference/tsserver/projectReferences/auto-import-with-referenced-project-when-built-with-disableSourceOfProjectReferenceRedirect.js index 3837901cd2dcb..b30c209096557 100644 --- a/tests/baselines/reference/tsserver/projectReferences/auto-import-with-referenced-project-when-built-with-disableSourceOfProjectReferenceRedirect.js +++ b/tests/baselines/reference/tsserver/projectReferences/auto-import-with-referenced-project-when-built-with-disableSourceOfProjectReferenceRedirect.js @@ -121,8 +121,24 @@ export declare function foo(): void; "size": 728 } +//// [/user/username/projects/myproject/app/bld/program/bar.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/user/username/projects/myproject/app/bld/program/bar.d.ts] +export {}; + + +//// [/user/username/projects/myproject/app/bld/program/index.js] +foo; + + +//// [/user/username/projects/myproject/app/bld/program/index.d.ts] + + //// [/user/username/projects/myproject/app/bld/program/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../../../a/lib/lib.d.ts","../../../shared/bld/library/index.d.ts","../../src/program/bar.ts","../../src/program/index.ts"],"fileIdsList":[[2]],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},"-5677608893-export declare function foo(): void;\n","-9677035610-import {foo} from \"shared\";",{"version":"193491849-foo","affectsGlobalScope":true}],"root":[3,4],"options":{"composite":true,"outDir":"./"},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[4,[{"start":0,"length":3,"messageText":"Cannot find name 'foo'.","category":1,"code":2304}]]],"affectedFilesPendingEmit":[3,4],"emitSignatures":[3,4],"version":"FakeTSVersion"} +{"fileNames":["../../../../../../../a/lib/lib.d.ts","../../../shared/bld/library/index.d.ts","../../src/program/bar.ts","../../src/program/index.ts"],"fileIdsList":[[2]],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},"-5677608893-export declare function foo(): void;\n",{"version":"-9677035610-import {foo} from \"shared\";","signature":"-3531856636-export {};\n"},{"version":"193491849-foo","signature":"5381-","affectsGlobalScope":true}],"root":[3,4],"options":{"composite":true,"outDir":"./"},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[4,[{"start":0,"length":3,"messageText":"Cannot find name 'foo'.","category":1,"code":2304}]]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/myproject/app/bld/program/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -152,16 +168,21 @@ export declare function foo(): void; "signature": "-5677608893-export declare function foo(): void;\n" }, "../../src/program/bar.ts": { + "original": { + "version": "-9677035610-import {foo} from \"shared\";", + "signature": "-3531856636-export {};\n" + }, "version": "-9677035610-import {foo} from \"shared\";", - "signature": "-9677035610-import {foo} from \"shared\";" + "signature": "-3531856636-export {};\n" }, "../../src/program/index.ts": { "original": { "version": "193491849-foo", + "signature": "5381-", "affectsGlobalScope": true }, "version": "193491849-foo", - "signature": "193491849-foo", + "signature": "5381-", "affectsGlobalScope": true } }, @@ -198,22 +219,9 @@ export declare function foo(): void; ] ] ], - "affectedFilesPendingEmit": [ - [ - "../../src/program/bar.ts", - "Js | Dts" - ], - [ - "../../src/program/index.ts", - "Js | Dts" - ] - ], - "emitSignatures": [ - "../../src/program/bar.ts", - "../../src/program/index.ts" - ], + "latestChangedDtsFile": "./index.d.ts", "version": "FakeTSVersion", - "size": 1021 + "size": 1074 } diff --git a/tests/baselines/reference/tsserver/projectReferences/auto-import-with-referenced-project-when-built.js b/tests/baselines/reference/tsserver/projectReferences/auto-import-with-referenced-project-when-built.js index 124ea647d8a94..436c21ec2671e 100644 --- a/tests/baselines/reference/tsserver/projectReferences/auto-import-with-referenced-project-when-built.js +++ b/tests/baselines/reference/tsserver/projectReferences/auto-import-with-referenced-project-when-built.js @@ -120,8 +120,24 @@ export declare function foo(): void; "size": 728 } +//// [/user/username/projects/myproject/app/bld/program/bar.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/user/username/projects/myproject/app/bld/program/bar.d.ts] +export {}; + + +//// [/user/username/projects/myproject/app/bld/program/index.js] +foo; + + +//// [/user/username/projects/myproject/app/bld/program/index.d.ts] + + //// [/user/username/projects/myproject/app/bld/program/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../../../a/lib/lib.d.ts","../../../shared/bld/library/index.d.ts","../../src/program/bar.ts","../../src/program/index.ts"],"fileIdsList":[[2]],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},"-5677608893-export declare function foo(): void;\n","-9677035610-import {foo} from \"shared\";",{"version":"193491849-foo","affectsGlobalScope":true}],"root":[3,4],"options":{"composite":true,"outDir":"./"},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[4,[{"start":0,"length":3,"messageText":"Cannot find name 'foo'.","category":1,"code":2304}]]],"affectedFilesPendingEmit":[3,4],"emitSignatures":[3,4],"version":"FakeTSVersion"} +{"fileNames":["../../../../../../../a/lib/lib.d.ts","../../../shared/bld/library/index.d.ts","../../src/program/bar.ts","../../src/program/index.ts"],"fileIdsList":[[2]],"fileInfos":[{"version":"-7698705165-/// \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; }","affectsGlobalScope":true},"-5677608893-export declare function foo(): void;\n",{"version":"-9677035610-import {foo} from \"shared\";","signature":"-3531856636-export {};\n"},{"version":"193491849-foo","signature":"5381-","affectsGlobalScope":true}],"root":[3,4],"options":{"composite":true,"outDir":"./"},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[4,[{"start":0,"length":3,"messageText":"Cannot find name 'foo'.","category":1,"code":2304}]]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/myproject/app/bld/program/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -151,16 +167,21 @@ export declare function foo(): void; "signature": "-5677608893-export declare function foo(): void;\n" }, "../../src/program/bar.ts": { + "original": { + "version": "-9677035610-import {foo} from \"shared\";", + "signature": "-3531856636-export {};\n" + }, "version": "-9677035610-import {foo} from \"shared\";", - "signature": "-9677035610-import {foo} from \"shared\";" + "signature": "-3531856636-export {};\n" }, "../../src/program/index.ts": { "original": { "version": "193491849-foo", + "signature": "5381-", "affectsGlobalScope": true }, "version": "193491849-foo", - "signature": "193491849-foo", + "signature": "5381-", "affectsGlobalScope": true } }, @@ -197,22 +218,9 @@ export declare function foo(): void; ] ] ], - "affectedFilesPendingEmit": [ - [ - "../../src/program/bar.ts", - "Js | Dts" - ], - [ - "../../src/program/index.ts", - "Js | Dts" - ] - ], - "emitSignatures": [ - "../../src/program/bar.ts", - "../../src/program/index.ts" - ], + "latestChangedDtsFile": "./index.d.ts", "version": "FakeTSVersion", - "size": 1021 + "size": 1074 } diff --git a/tests/baselines/reference/tsserver/projectReferences/can-successfully-find-references-with-out-option.js b/tests/baselines/reference/tsserver/projectReferences/can-successfully-find-references-with-out-option.js index 0880fda2384d9..fc5590c3d9067 100644 --- a/tests/baselines/reference/tsserver/projectReferences/can-successfully-find-references-with-out-option.js +++ b/tests/baselines/reference/tsserver/projectReferences/can-successfully-find-references-with-out-option.js @@ -152,12 +152,15 @@ var container; //// [/user/username/projects/container/built/local/exec.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../../exec/index.ts"],"version":"FakeTSVersion"} //// [/user/username/projects/container/built/local/exec.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../../exec/index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 58 } //// [/user/username/projects/container/built/local/compositeExec.js] diff --git a/tests/baselines/reference/tsserver/projectReferences/does-not-error-on-container-only-project.js b/tests/baselines/reference/tsserver/projectReferences/does-not-error-on-container-only-project.js index ca864e2082013..e62782ca5d821 100644 --- a/tests/baselines/reference/tsserver/projectReferences/does-not-error-on-container-only-project.js +++ b/tests/baselines/reference/tsserver/projectReferences/does-not-error-on-container-only-project.js @@ -152,12 +152,15 @@ var container; //// [/user/username/projects/container/built/local/exec.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["../../exec/index.ts"],"version":"FakeTSVersion"} //// [/user/username/projects/container/built/local/exec.tsbuildinfo.readable.baseline.txt] { + "root": [ + "../../exec/index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 58 } //// [/user/username/projects/container/built/local/compositeExec.js] diff --git a/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-Linux.js b/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-Linux.js index a04e43afd131d..7ce7233cfc505 100644 --- a/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-Linux.js +++ b/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-Linux.js @@ -508,12 +508,15 @@ export type BarType = "bar"; //// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] Inode:: 24 -{"version":"FakeTSVersion"} +{"root":["./src/index.ts"],"version":"FakeTSVersion"} //// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 25 { + "root": [ + "./src/index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 53 } diff --git a/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-package1-built-Linux.js b/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-package1-built-Linux.js index 82934cb58a299..465c700d16ac6 100644 --- a/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-package1-built-Linux.js +++ b/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-package1-built-Linux.js @@ -93,12 +93,15 @@ export type BarType = "bar"; //// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] Inode:: 24 -{"version":"FakeTSVersion"} +{"root":["./src/index.ts"],"version":"FakeTSVersion"} //// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 25 { + "root": [ + "./src/index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 53 } diff --git a/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-package1-built.js b/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-package1-built.js index f3a94037a6506..fbaeea2f3dea0 100644 --- a/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-package1-built.js +++ b/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked-package1-built.js @@ -93,12 +93,15 @@ export type BarType = "bar"; //// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./src/index.ts"],"version":"FakeTSVersion"} //// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./src/index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 53 } diff --git a/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked.js b/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked.js index 21b421827c082..115e04863c579 100644 --- a/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked.js +++ b/tests/baselines/reference/tsserver/symLinks/monorepo-style-sibling-packages-symlinked.js @@ -521,12 +521,15 @@ export type BarType = "bar"; //// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] -{"version":"FakeTSVersion"} +{"root":["./src/index.ts"],"version":"FakeTSVersion"} //// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] { + "root": [ + "./src/index.ts" + ], "version": "FakeTSVersion", - "size": 27 + "size": 53 }