diff --git a/src/compiler/_namespaces/ts.ts b/src/compiler/_namespaces/ts.ts index 94fb16857d38e..cd755a0baed2f 100644 --- a/src/compiler/_namespaces/ts.ts +++ b/src/compiler/_namespaces/ts.ts @@ -54,7 +54,7 @@ export * from "../transformers/generators.js"; export * from "../transformers/module/module.js"; export * from "../transformers/module/system.js"; export * from "../transformers/module/esnextAnd2015.js"; -export * from "../transformers/module/impliedNodeFormatDependent.js"; +export * from "../transformers/module/node.js"; export * from "../transformers/declarations/diagnostics.js"; export * from "../transformers/declarations.js"; export * from "../transformer.js"; diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 3030b4aeeca33..d94f769f82e66 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -60,7 +60,6 @@ import { canHaveJSDoc, canHaveLocals, canHaveModifiers, - canHaveModuleSpecifier, canHaveSymbol, canIncludeBindAndCheckDiagnostics, canUsePropertyAccess, @@ -3655,36 +3654,27 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { || isNamespaceExport(node)); } - function getEmitSyntaxForModuleSpecifierExpression(usage: Expression) { - return isStringLiteralLike(usage) ? host.getEmitSyntaxForUsageLocation(getSourceFileOfNode(usage), usage) : undefined; + function getUsageModeForExpression(usage: Expression) { + return isStringLiteralLike(usage) ? host.getModeForUsageLocation(getSourceFileOfNode(usage), usage) : undefined; } function isESMFormatImportImportingCommonjsFormatFile(usageMode: ResolutionMode, targetMode: ResolutionMode) { return usageMode === ModuleKind.ESNext && targetMode === ModuleKind.CommonJS; } - function isOnlyImportableAsDefault(usage: Expression) { - // In Node.js, JSON modules don't get named exports - if (ModuleKind.Node16 <= moduleKind && moduleKind <= ModuleKind.NodeNext) { - const usageMode = getEmitSyntaxForModuleSpecifierExpression(usage); - return usageMode === ModuleKind.ESNext && endsWith((usage as StringLiteralLike).text, Extension.Json); - } - return false; + function isOnlyImportedAsDefault(usage: Expression) { + const usageMode = getUsageModeForExpression(usage); + return usageMode === ModuleKind.ESNext && endsWith((usage as StringLiteralLike).text, Extension.Json); } function canHaveSyntheticDefault(file: SourceFile | undefined, moduleSymbol: Symbol, dontResolveAlias: boolean, usage: Expression) { - const usageMode = file && getEmitSyntaxForModuleSpecifierExpression(usage); - if (file && usageMode !== undefined) { - const targetMode = host.getImpliedNodeFormatForEmit(file); - if (usageMode === ModuleKind.ESNext && targetMode === ModuleKind.CommonJS && ModuleKind.Node16 <= moduleKind && moduleKind <= ModuleKind.NodeNext) { - // In Node.js, CommonJS modules always have a synthetic default when imported into ESM - return true; - } - if (usageMode === ModuleKind.ESNext && targetMode === ModuleKind.ESNext) { - // No matter what the `module` setting is, if we're confident that both files - // are ESM, there cannot be a synthetic default. - return false; + const usageMode = file && getUsageModeForExpression(usage); + if (file && usageMode !== undefined && ModuleKind.Node16 <= moduleKind && moduleKind <= ModuleKind.NodeNext) { + const result = isESMFormatImportImportingCommonjsFormatFile(usageMode, file.impliedNodeFormat); + if (usageMode === ModuleKind.ESNext || result) { + return result; } + // fallthrough on cjs usages so we imply defaults for interop'd imports, too } if (!allowSyntheticDefaultImports) { return false; @@ -3737,7 +3727,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (!specifier) { return exportDefaultSymbol; } - const hasDefaultOnly = isOnlyImportableAsDefault(specifier); + const hasDefaultOnly = isOnlyImportedAsDefault(specifier); const hasSyntheticDefault = canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias, specifier); if (!exportDefaultSymbol && !hasSyntheticDefault && !hasDefaultOnly) { if (hasExportAssignmentSymbol(moduleSymbol) && !allowSyntheticDefaultImports) { @@ -3922,7 +3912,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { let symbolFromModule = getExportOfModule(targetSymbol, nameText, specifier, dontResolveAlias); if (symbolFromModule === undefined && nameText === InternalSymbolName.Default) { const file = moduleSymbol.declarations?.find(isSourceFile); - if (isOnlyImportableAsDefault(moduleSpecifier) || canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias, moduleSpecifier)) { + if (isOnlyImportedAsDefault(moduleSpecifier) || canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias, moduleSpecifier)) { symbolFromModule = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias); } } @@ -4586,9 +4576,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { findAncestor(location, isImportDeclaration)?.moduleSpecifier || findAncestor(location, isExternalModuleImportEqualsDeclaration)?.moduleReference.expression || findAncestor(location, isExportDeclaration)?.moduleSpecifier; - const mode = contextSpecifier && isStringLiteralLike(contextSpecifier) - ? host.getModeForUsageLocation(currentSourceFile, contextSpecifier) - : host.getDefaultResolutionModeForFile(currentSourceFile); + const mode = contextSpecifier && isStringLiteralLike(contextSpecifier) ? host.getModeForUsageLocation(currentSourceFile, contextSpecifier) : currentSourceFile.impliedNodeFormat; const moduleResolutionKind = getEmitModuleResolutionKind(compilerOptions); const resolvedModule = host.getResolvedModule(currentSourceFile, moduleReference, mode)?.resolvedModule; const resolutionDiagnostic = resolvedModule && getResolutionDiagnostic(compilerOptions, resolvedModule, currentSourceFile); @@ -4875,7 +4863,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } const targetFile = moduleSymbol?.declarations?.find(isSourceFile); - const isEsmCjsRef = targetFile && isESMFormatImportImportingCommonjsFormatFile(getEmitSyntaxForModuleSpecifierExpression(reference), host.getImpliedNodeFormatForEmit(targetFile)); + const isEsmCjsRef = targetFile && isESMFormatImportImportingCommonjsFormatFile(getUsageModeForExpression(reference), targetFile.impliedNodeFormat); if (getESModuleInterop(compilerOptions) || isEsmCjsRef) { let sigs = getSignaturesOfStructuredType(type, SignatureKind.Call); if (!sigs || !sigs.length) { @@ -7809,12 +7797,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } return getSourceFileOfNode(getNonAugmentationDeclaration(symbol)!).fileName; // A resolver may not be provided for baselines and errors - in those cases we use the fileName in full } - const enclosingDeclaration = getOriginalNode(context.enclosingDeclaration); - const originalModuleSpecifier = canHaveModuleSpecifier(enclosingDeclaration) ? tryGetModuleSpecifierFromDeclaration(enclosingDeclaration) : undefined; const contextFile = context.enclosingFile; - const resolutionMode = overrideImportMode - || originalModuleSpecifier && host.getModeForUsageLocation(contextFile, originalModuleSpecifier) - || contextFile && host.getDefaultResolutionModeForFile(contextFile); + const resolutionMode = overrideImportMode || contextFile?.impliedNodeFormat; const cacheKey = createModeAwareCacheKey(contextFile.path, resolutionMode); const links = getSymbolLinks(symbol); let specifier = links.specifierCache && links.specifierCache.get(cacheKey); @@ -36940,7 +36924,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function getTypeWithSyntheticDefaultOnly(type: Type, symbol: Symbol, originalSymbol: Symbol, moduleSpecifier: Expression) { - const hasDefaultOnly = isOnlyImportableAsDefault(moduleSpecifier); + const hasDefaultOnly = isOnlyImportedAsDefault(moduleSpecifier); if (hasDefaultOnly && type && !isErrorType(type)) { const synthType = type as SyntheticDefaultModuleType; if (!synthType.defaultOnlyType) { @@ -43486,7 +43470,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function checkCollisionWithRequireExportsInGeneratedCode(node: Node, name: Identifier | undefined) { // No need to check for require or exports for ES6 modules and later - if (host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) >= ModuleKind.ES2015) { + if (moduleKind >= ModuleKind.ES2015 && !(moduleKind >= ModuleKind.Node16 && getSourceFileOfNode(node).impliedNodeFormat === ModuleKind.CommonJS)) { return; } @@ -45375,7 +45359,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function checkClassNameCollisionWithObject(name: Identifier): void { if ( languageVersion >= ScriptTarget.ES5 && name.escapedText === "Object" - && host.getEmitModuleFormatOfFile(getSourceFileOfNode(name)) < ModuleKind.ES2015 + && (moduleKind < ModuleKind.ES2015 || getSourceFileOfNode(name).impliedNodeFormat === ModuleKind.CommonJS) ) { error(name, Diagnostics.Class_name_cannot_be_Object_when_targeting_ES5_with_module_0, ModuleKind[moduleKind]); // https://github.com/Microsoft/TypeScript/issues/17494 } @@ -46714,7 +46698,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if ( compilerOptions.verbatimModuleSyntax && node.parent.kind === SyntaxKind.SourceFile && - host.getEmitModuleFormatOfFile(node.parent) === ModuleKind.CommonJS + (moduleKind === ModuleKind.CommonJS || node.parent.impliedNodeFormat === ModuleKind.CommonJS) ) { const exportModifier = node.modifiers?.find(m => m.kind === SyntaxKind.ExportKeyword); if (exportModifier) { @@ -47006,22 +46990,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { compilerOptions.verbatimModuleSyntax && node.kind !== SyntaxKind.ImportEqualsDeclaration && !isInJSFile(node) && - host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) === ModuleKind.CommonJS + (moduleKind === ModuleKind.CommonJS || getSourceFileOfNode(node).impliedNodeFormat === ModuleKind.CommonJS) ) { error(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } - else if ( - moduleKind === ModuleKind.Preserve && - node.kind !== SyntaxKind.ImportEqualsDeclaration && - node.kind !== SyntaxKind.VariableDeclaration && - host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) === ModuleKind.CommonJS - ) { - // In `--module preserve`, ESM input syntax emits ESM output syntax, but there will be times - // when we look at the `impliedNodeFormat` of this file and decide it's CommonJS. To avoid - // that inconsistency, we disallow ESM syntax in files that are unambiguously CommonJS in - // this mode. - error(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve); - } } if (isImportSpecifier(node)) { @@ -47071,7 +47043,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if ( moduleExportNameIsDefault(node.propertyName || node.name) && getESModuleInterop(compilerOptions) && - host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) < ModuleKind.System + moduleKind !== ModuleKind.System && (moduleKind < ModuleKind.ES2015 || getSourceFileOfNode(node).impliedNodeFormat === ModuleKind.CommonJS) ) { checkExternalEmitHelpers(node, ExternalEmitHelpers.ImportDefault); } @@ -47093,7 +47065,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return; // Other grammar checks do not apply to type-only imports with resolution mode assertions } - const mode = (moduleKind === ModuleKind.NodeNext) && declaration.moduleSpecifier && getEmitSyntaxForModuleSpecifierExpression(declaration.moduleSpecifier); + const mode = (moduleKind === ModuleKind.NodeNext) && declaration.moduleSpecifier && getUsageModeForExpression(declaration.moduleSpecifier); if (mode !== ModuleKind.ESNext && moduleKind !== ModuleKind.ESNext && moduleKind !== ModuleKind.Preserve) { const message = isImportAttributes ? moduleKind === ModuleKind.NodeNext @@ -47137,7 +47109,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (importClause.namedBindings) { if (importClause.namedBindings.kind === SyntaxKind.NamespaceImport) { checkImportBinding(importClause.namedBindings); - if (host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) < ModuleKind.System && getESModuleInterop(compilerOptions)) { + if (moduleKind !== ModuleKind.System && (moduleKind < ModuleKind.ES2015 || getSourceFileOfNode(node).impliedNodeFormat === ModuleKind.CommonJS) && getESModuleInterop(compilerOptions)) { // import * as ns from "foo"; checkExternalEmitHelpers(node, ExternalEmitHelpers.ImportStar); } @@ -47184,8 +47156,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } else { - if (ModuleKind.ES2015 <= moduleKind && moduleKind <= ModuleKind.ESNext && !node.isTypeOnly && !(node.flags & NodeFlags.Ambient)) { - // Import equals declaration cannot be emitted as ESM + if (moduleKind >= ModuleKind.ES2015 && moduleKind !== ModuleKind.Preserve && getSourceFileOfNode(node).impliedNodeFormat === undefined && !node.isTypeOnly && !(node.flags & NodeFlags.Ambient)) { + // Import equals declaration is deprecated in es6 or above grammarErrorOnNode(node, Diagnostics.Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead); } } @@ -47226,7 +47198,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { checkAliasSymbol(node.exportClause); checkModuleExportName(node.exportClause.name); } - if (host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) < ModuleKind.System) { + if (moduleKind !== ModuleKind.System && (moduleKind < ModuleKind.ES2015 || getSourceFileOfNode(node).impliedNodeFormat === ModuleKind.CommonJS)) { if (node.exportClause) { // export * as ns from "foo"; // For ES2015 modules, we emit it as a pair of `import * as a_1 ...; export { a_1 as ns }` and don't need the helper. @@ -47285,7 +47257,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { else { if ( getESModuleInterop(compilerOptions) && - host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) < ModuleKind.System && + moduleKind !== ModuleKind.System && + (moduleKind < ModuleKind.ES2015 || getSourceFileOfNode(node).impliedNodeFormat === ModuleKind.CommonJS) && moduleExportNameIsDefault(node.propertyName || node.name) ) { checkExternalEmitHelpers(node, ExternalEmitHelpers.ImportDefault); @@ -47326,7 +47299,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const isIllegalExportDefaultInCJS = !node.isExportEquals && !(node.flags & NodeFlags.Ambient) && compilerOptions.verbatimModuleSyntax && - host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) === ModuleKind.CommonJS; + (moduleKind === ModuleKind.CommonJS || getSourceFileOfNode(node).impliedNodeFormat === ModuleKind.CommonJS); if (node.expression.kind === SyntaxKind.Identifier) { const id = node.expression as Identifier; @@ -47424,8 +47397,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if ( moduleKind >= ModuleKind.ES2015 && moduleKind !== ModuleKind.Preserve && - ((node.flags & NodeFlags.Ambient && host.getImpliedNodeFormatForEmit(getSourceFileOfNode(node)) === ModuleKind.ESNext) || - (!(node.flags & NodeFlags.Ambient) && host.getImpliedNodeFormatForEmit(getSourceFileOfNode(node)) !== ModuleKind.CommonJS)) + ((node.flags & NodeFlags.Ambient && getSourceFileOfNode(node).impliedNodeFormat === ModuleKind.ESNext) || + (!(node.flags & NodeFlags.Ambient) && getSourceFileOfNode(node).impliedNodeFormat !== ModuleKind.CommonJS)) ) { // export assignment is not supported in es6 modules grammarErrorOnNode(node, Diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead); @@ -50308,7 +50281,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // ModuleDeclaration needs to be checked that it is uninstantiated later node.kind !== SyntaxKind.ModuleDeclaration && node.parent.kind === SyntaxKind.SourceFile && - host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) === ModuleKind.CommonJS + (moduleKind === ModuleKind.CommonJS || getSourceFileOfNode(node).impliedNodeFormat === ModuleKind.CommonJS) ) { return grammarErrorOnNode(modifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } @@ -51466,7 +51439,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } if ( - host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) < ModuleKind.System && + (moduleKind < ModuleKind.ES2015 || getSourceFileOfNode(node).impliedNodeFormat === ModuleKind.CommonJS) && moduleKind !== ModuleKind.System && !(node.parent.parent.flags & NodeFlags.Ambient) && hasSyntacticModifier(node.parent.parent, ModifierFlags.Export) ) { checkESModuleMarker(node.name); @@ -52113,8 +52086,6 @@ function createBasicNodeBuilderModuleSpecifierResolutionHost(host: TypeCheckerHo fileExists: fileName => host.fileExists(fileName), getFileIncludeReasons: () => host.getFileIncludeReasons(), readFile: host.readFile ? (fileName => host.readFile!(fileName)) : undefined, - getDefaultResolutionModeForFile: file => host.getDefaultResolutionModeForFile(file), - getModeForResolutionAtIndex: (file, index) => host.getModeForResolutionAtIndex(file, index), }; } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 9c9d579d194cd..9f08bdb35d83d 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -967,10 +967,6 @@ "category": "Error", "code": 1292 }, - "ESM syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'.": { - "category": "Error", - "code": 1293 - }, "'with' statements are not allowed in an async function block.": { "category": "Error", diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index d2b43f7250f84..52ecb1016e34f 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -131,7 +131,6 @@ import { getEmitFlags, getEmitHelpers, getEmitModuleKind, - getEmitModuleResolutionKind, getEmitScriptTarget, getExternalModuleName, getIdentifierTypeArguments, @@ -830,7 +829,6 @@ export function emitFiles( newLine: compilerOptions.newLine, noEmitHelpers: compilerOptions.noEmitHelpers, module: getEmitModuleKind(compilerOptions), - moduleResolution: getEmitModuleResolutionKind(compilerOptions), target: getEmitScriptTarget(compilerOptions), sourceMap: compilerOptions.sourceMap, inlineSourceMap: compilerOptions.inlineSourceMap, @@ -906,7 +904,6 @@ export function emitFiles( newLine: compilerOptions.newLine, noEmitHelpers: true, module: compilerOptions.module, - moduleResolution: compilerOptions.moduleResolution, target: compilerOptions.target, sourceMap: !forceDtsEmit && compilerOptions.declarationMap, inlineSourceMap: compilerOptions.inlineSourceMap, diff --git a/src/compiler/factory/utilities.ts b/src/compiler/factory/utilities.ts index a48270b6d47f5..3e1ba2bf725b1 100644 --- a/src/compiler/factory/utilities.ts +++ b/src/compiler/factory/utilities.ts @@ -53,12 +53,10 @@ import { getAllAccessorDeclarations, getEmitFlags, getEmitHelpers, - getEmitModuleFormatOfFileWorker, getEmitModuleKind, getESModuleInterop, getExternalModuleName, getExternalModuleNameFromPath, - getImpliedNodeFormatForEmitWorker, getJSDocType, getJSDocTypeTag, getModifiers, @@ -714,7 +712,7 @@ export function createExternalHelpersImportDeclarationIfNeeded(nodeFactory: Node if (compilerOptions.importHelpers && isEffectiveExternalModule(sourceFile, compilerOptions)) { let namedBindings: NamedImportBindings | undefined; const moduleKind = getEmitModuleKind(compilerOptions); - if ((moduleKind >= ModuleKind.ES2015 && moduleKind <= ModuleKind.ESNext) || getImpliedNodeFormatForEmitWorker(sourceFile, compilerOptions) === ModuleKind.ESNext) { + if ((moduleKind >= ModuleKind.ES2015 && moduleKind <= ModuleKind.ESNext) || sourceFile.impliedNodeFormat === ModuleKind.ESNext) { // use named imports const helpers = getEmitHelpers(sourceFile); if (helpers) { @@ -771,8 +769,10 @@ export function getOrCreateExternalHelpersModuleNameIfNeeded(factory: NodeFactor return externalHelpersModuleName; } + const moduleKind = getEmitModuleKind(compilerOptions); let create = (hasExportStarsToExportValues || (getESModuleInterop(compilerOptions) && hasImportStarOrImportDefault)) - && getEmitModuleFormatOfFileWorker(node, compilerOptions) < ModuleKind.System; + && moduleKind !== ModuleKind.System + && (moduleKind < ModuleKind.ES2015 || node.impliedNodeFormat === ModuleKind.CommonJS); if (!create) { const helpers = getEmitHelpers(node); if (helpers) { diff --git a/src/compiler/moduleSpecifiers.ts b/src/compiler/moduleSpecifiers.ts index 6e21b0678a9c1..2fe39cfb22c2b 100644 --- a/src/compiler/moduleSpecifiers.ts +++ b/src/compiler/moduleSpecifiers.ts @@ -37,9 +37,9 @@ import { getBaseFileName, GetCanonicalFileName, getConditions, - getDefaultResolutionModeForFileWorker, getDirectoryPath, getEmitModuleResolutionKind, + getModeForResolutionAtIndex, getModuleNameStringLiteralAt, getModuleSpecifierEndingPreference, getNodeModulePathParts, @@ -143,13 +143,12 @@ export interface ModuleSpecifierPreferences { /** * @param syntaxImpliedNodeFormat Used when the import syntax implies ESM or CJS irrespective of the mode of the file. */ - getAllowedEndingsInPreferredOrder(syntaxImpliedNodeFormat?: ResolutionMode): ModuleSpecifierEnding[]; + getAllowedEndingsInPreferredOrder(syntaxImpliedNodeFormat?: SourceFile["impliedNodeFormat"]): ModuleSpecifierEnding[]; } /** @internal */ export function getModuleSpecifierPreferences( { importModuleSpecifierPreference, importModuleSpecifierEnding }: UserPreferences, - host: Pick, compilerOptions: CompilerOptions, importingSourceFile: Pick, oldImportSpecifier?: string, @@ -164,10 +163,8 @@ export function getModuleSpecifierPreferences( importModuleSpecifierPreference === "project-relative" ? RelativePreference.ExternalNonRelative : RelativePreference.Shortest, getAllowedEndingsInPreferredOrder: syntaxImpliedNodeFormat => { - const impliedNodeFormat = getDefaultResolutionModeForFile(importingSourceFile, host, compilerOptions); - const preferredEnding = syntaxImpliedNodeFormat !== impliedNodeFormat ? getPreferredEnding(syntaxImpliedNodeFormat) : filePreferredEnding; - const moduleResolution = getEmitModuleResolutionKind(compilerOptions); - if ((syntaxImpliedNodeFormat ?? impliedNodeFormat) === ModuleKind.ESNext && ModuleResolutionKind.Node16 <= moduleResolution && moduleResolution <= ModuleResolutionKind.NodeNext) { + const preferredEnding = syntaxImpliedNodeFormat !== importingSourceFile.impliedNodeFormat ? getPreferredEnding(syntaxImpliedNodeFormat) : filePreferredEnding; + if ((syntaxImpliedNodeFormat ?? importingSourceFile.impliedNodeFormat) === ModuleKind.ESNext) { if (shouldAllowImportingTsExtension(compilerOptions, importingSourceFile.fileName)) { return [ModuleSpecifierEnding.TsExtension, ModuleSpecifierEnding.JsExtension]; } @@ -207,7 +204,7 @@ export function getModuleSpecifierPreferences( } return getModuleSpecifierEndingPreference( importModuleSpecifierEnding, - resolutionMode ?? getDefaultResolutionModeForFile(importingSourceFile, host, compilerOptions), + resolutionMode ?? importingSourceFile.impliedNodeFormat, compilerOptions, isFullSourceFile(importingSourceFile) ? importingSourceFile : undefined, ); @@ -228,7 +225,7 @@ export function updateModuleSpecifier( oldImportSpecifier: string, options: ModuleSpecifierOptions = {}, ): string | undefined { - const res = getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, getModuleSpecifierPreferences({}, host, compilerOptions, importingSourceFile, oldImportSpecifier), {}, options); + const res = getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, getModuleSpecifierPreferences({}, compilerOptions, importingSourceFile, oldImportSpecifier), {}, options); if (res === oldImportSpecifier) return undefined; return res; } @@ -248,7 +245,7 @@ export function getModuleSpecifier( host: ModuleSpecifierResolutionHost, options: ModuleSpecifierOptions = {}, ): string { - return getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, getModuleSpecifierPreferences({}, host, compilerOptions, importingSourceFile), {}, options); + return getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, getModuleSpecifierPreferences({}, compilerOptions, importingSourceFile), {}, options); } /** @internal */ @@ -278,7 +275,7 @@ function getModuleSpecifierWorker( const info = getInfo(importingSourceFileName, host); const modulePaths = getAllModulePaths(info, toFileName, host, userPreferences, compilerOptions, options); return firstDefined(modulePaths, modulePath => tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, userPreferences, /*packageNameOnly*/ undefined, options.overrideImportMode)) || - getLocalModuleSpecifier(toFileName, info, compilerOptions, host, options.overrideImportMode || getDefaultResolutionModeForFile(importingSourceFile, host, compilerOptions), preferences); + getLocalModuleSpecifier(toFileName, info, compilerOptions, host, options.overrideImportMode || importingSourceFile.impliedNodeFormat, preferences); } /** @internal */ @@ -406,7 +403,7 @@ export function getLocalModuleSpecifierBetweenFileNames( compilerOptions, host, importMode, - getModuleSpecifierPreferences({}, host, compilerOptions, importingFile), + getModuleSpecifierPreferences({}, compilerOptions, importingFile), ); } @@ -420,7 +417,7 @@ function computeModuleSpecifiers( forAutoImport: boolean, ): ModuleSpecifierResult { const info = getInfo(importingSourceFile.fileName, host); - const preferences = getModuleSpecifierPreferences(userPreferences, host, compilerOptions, importingSourceFile); + const preferences = getModuleSpecifierPreferences(userPreferences, compilerOptions, importingSourceFile); const existingSpecifier = isFullSourceFile(importingSourceFile) && forEach(modulePaths, modulePath => forEach( host.getFileIncludeReasons().get(toPath(modulePath.path, host.getCurrentDirectory(), info.getCanonicalFileName)), @@ -428,11 +425,7 @@ function computeModuleSpecifiers( if (reason.kind !== FileIncludeKind.Import || reason.file !== importingSourceFile.path) return undefined; // If the candidate import mode doesn't match the mode we're generating for, don't consider it // TODO: maybe useful to keep around as an alternative option for certain contexts where the mode is overridable - const existingMode = host.getModeForResolutionAtIndex(importingSourceFile, reason.index); - const targetMode = options.overrideImportMode ?? host.getDefaultResolutionModeForFile(importingSourceFile); - if (existingMode !== targetMode && existingMode !== undefined && targetMode !== undefined) { - return undefined; - } + if (importingSourceFile.impliedNodeFormat && importingSourceFile.impliedNodeFormat !== getModeForResolutionAtIndex(importingSourceFile, reason.index, compilerOptions)) return undefined; const specifier = getModuleNameStringLiteralAt(importingSourceFile, reason.index).text; // If the preference is for non relative and the module specifier is relative, ignore it return preferences.relativePreference !== RelativePreference.NonRelative || !pathIsRelative(specifier) ? @@ -1100,7 +1093,7 @@ function tryGetModuleNameAsNodeModule({ path, isRedirect }: ModulePath, { getCan // Simplify the full file path to something that can be resolved by Node. - const preferences = getModuleSpecifierPreferences(userPreferences, host, options, importingSourceFile); + const preferences = getModuleSpecifierPreferences(userPreferences, options, importingSourceFile); const allowedEndings = preferences.getAllowedEndingsInPreferredOrder(); let moduleSpecifier = path; let isPackageRootPath = false; @@ -1160,7 +1153,7 @@ function tryGetModuleNameAsNodeModule({ path, isRedirect }: ModulePath, { getCan const cachedPackageJson = host.getPackageJsonInfoCache?.()?.getPackageJsonInfo(packageJsonPath); if (isPackageJsonInfo(cachedPackageJson) || cachedPackageJson === undefined && host.fileExists(packageJsonPath)) { const packageJsonContent: Record | undefined = cachedPackageJson?.contents.packageJsonContent || tryParseJson(host.readFile!(packageJsonPath)!); - const importMode = overrideMode || getDefaultResolutionModeForFile(importingSourceFile, host, options); + const importMode = overrideMode || importingSourceFile.impliedNodeFormat; if (getResolvePackageJsonExports(options)) { // The package name that we found in node_modules could be different from the package // name in the package.json content via url/filepath dependency specifiers. We need to @@ -1355,7 +1348,3 @@ function getRelativePathIfInSameVolume(path: string, directoryPath: string, getC function isPathRelativeToParent(path: string): boolean { return startsWith(path, ".."); } - -function getDefaultResolutionModeForFile(file: Pick, host: Pick, compilerOptions: CompilerOptions) { - return isFullSourceFile(file) ? host.getDefaultResolutionModeForFile(file) : getDefaultResolutionModeForFileWorker(file, compilerOptions); -} diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 9005d40da8914..b938ec6fee24e 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -173,7 +173,6 @@ import { ImportClause, ImportDeclaration, ImportOrExportSpecifier, - importSyntaxAffectsModuleResolution, InternalEmitFlags, inverseJsxOptionMap, isAmbientModule, @@ -839,11 +838,9 @@ export function flattenDiagnosticMessageText(diag: string | DiagnosticMessageCha * @internal */ export interface SourceFileImportsList { - imports: SourceFile["imports"]; - moduleAugmentations: SourceFile["moduleAugmentations"]; + /** @internal */ imports: SourceFile["imports"]; + /** @internal */ moduleAugmentations: SourceFile["moduleAugmentations"]; impliedNodeFormat?: ResolutionMode; - fileName: string; - packageJsonScope?: SourceFile["packageJsonScope"]; } /** @@ -889,47 +886,22 @@ export function isExclusivelyTypeOnlyImportOrExport(decl: ImportDeclaration | Ex /** * Use `program.getModeForUsageLocation`, which retrieves the correct `compilerOptions`, instead of this function whenever possible. - * Calculates the final resolution mode for a given module reference node. This function only returns a result when module resolution - * settings allow differing resolution between ESM imports and CJS requires, or when a mode is explicitly provided via import attributes, - * which cause an `import` or `require` condition to be used during resolution regardless of module resolution settings. In absence of - * overriding attributes, and in modes that support differing resolution, the result indicates the syntax the usage would emit to JavaScript. - * Some examples: - * - * ```ts - * // tsc foo.mts --module nodenext - * import {} from "mod"; - * // Result: ESNext - the import emits as ESM due to `impliedNodeFormat` set by .mts file extension - * - * // tsc foo.cts --module nodenext - * import {} from "mod"; - * // Result: CommonJS - the import emits as CJS due to `impliedNodeFormat` set by .cts file extension - * - * // tsc foo.ts --module preserve --moduleResolution bundler - * import {} from "mod"; - * // Result: ESNext - the import emits as ESM due to `--module preserve` and `--moduleResolution bundler` - * // supports conditional imports/exports - * - * // tsc foo.ts --module preserve --moduleResolution node10 - * import {} from "mod"; - * // Result: undefined - the import emits as ESM due to `--module preserve`, but `--moduleResolution node10` - * // does not support conditional imports/exports - * - * // tsc foo.ts --module commonjs --moduleResolution node10 - * import type {} from "mod" with { "resolution-mode": "import" }; - * // Result: ESNext - conditional imports/exports always supported with "resolution-mode" attribute - * ``` - * + * Calculates the final resolution mode for a given module reference node. This is the resolution mode explicitly provided via import + * attributes, if present, or the syntax the usage would have if emitted to JavaScript. In `--module node16` or `nodenext`, this may + * depend on the file's `impliedNodeFormat`. In `--module preserve`, it depends only on the input syntax of the reference. In other + * `module` modes, when overriding import attributes are not provided, this function returns `undefined`, as the result would have no + * impact on module resolution, emit, or type checking. * @param file The file the import or import-like reference is contained within * @param usage The module reference string * @param compilerOptions The compiler options for the program that owns the file. If the file belongs to a referenced project, the compiler options * should be the options of the referenced project, not the referencing project. * @returns The final resolution mode of the import */ -export function getModeForUsageLocation(file: SourceFile, usage: StringLiteralLike, compilerOptions: CompilerOptions) { +export function getModeForUsageLocation(file: { impliedNodeFormat?: ResolutionMode; }, usage: StringLiteralLike, compilerOptions: CompilerOptions) { return getModeForUsageLocationWorker(file, usage, compilerOptions); } -function getModeForUsageLocationWorker(file: Pick, usage: StringLiteralLike, compilerOptions?: CompilerOptions) { +function getModeForUsageLocationWorker(file: { impliedNodeFormat?: ResolutionMode; }, usage: StringLiteralLike, compilerOptions?: CompilerOptions) { if ((isImportDeclaration(usage.parent) || isExportDeclaration(usage.parent))) { const isTypeOnly = isExclusivelyTypeOnlyImportOrExport(usage.parent); if (isTypeOnly) { @@ -945,36 +917,20 @@ function getModeForUsageLocationWorker(file: Pick, usage: StringLiteralLike, compilerOptions?: CompilerOptions): ResolutionMode { - if (!compilerOptions) { - // This should always be provided, but we try to fail somewhat - // gracefully to allow projects like ts-node time to update. - return undefined; + if (file.impliedNodeFormat === undefined) return undefined; + if (file.impliedNodeFormat !== ModuleKind.ESNext) { + // in cjs files, import call expressions are esm format, otherwise everything is cjs + return isImportCall(walkUpParenthesizedExpressions(usage.parent)) ? ModuleKind.ESNext : ModuleKind.CommonJS; } + // in esm files, import=require statements are cjs format, otherwise everything is esm + // imports are only parent'd up to their containing declaration/expression, so access farther parents with care const exprParentParent = walkUpParenthesizedExpressions(usage.parent)?.parent; - if (exprParentParent && isImportEqualsDeclaration(exprParentParent) || isRequireCall(usage.parent, /*requireStringLiteralLikeArgument*/ false)) { - return ModuleKind.CommonJS; - } - if (isImportCall(walkUpParenthesizedExpressions(usage.parent))) { - return shouldTransformImportCallWorker(file, compilerOptions) ? ModuleKind.CommonJS : ModuleKind.ESNext; - } - // If we're in --module preserve on an input file, we know that an import - // is an import. But if this is a declaration file, we'd prefer to use the - // impliedNodeFormat. Since we want things to be consistent between the two, - // we need to issue errors when the user writes ESM syntax in a definitely-CJS - // file, until/unless declaration emit can indicate a true ESM import. On the - // other hand, writing CJS syntax in a definitely-ESM file is fine, since declaration - // emit preserves the CJS syntax. - const fileEmitMode = getEmitModuleFormatOfFileWorker(file, compilerOptions); - return fileEmitMode === ModuleKind.CommonJS ? ModuleKind.CommonJS : - emitModuleKindIsNonNodeESM(fileEmitMode) || fileEmitMode === ModuleKind.Preserve ? ModuleKind.ESNext : - undefined; + return exprParentParent && isImportEqualsDeclaration(exprParentParent) ? ModuleKind.CommonJS : ModuleKind.ESNext; } /** @internal */ @@ -1064,7 +1020,7 @@ function getTypeReferenceResolutionName(entry: const typeReferenceResolutionNameAndModeGetter: ResolutionNameAndModeGetter = { getName: getTypeReferenceResolutionName, - getMode: (entry, file, compilerOptions) => getModeForFileReference(entry, file && getDefaultResolutionModeForFileWorker(file, compilerOptions)), + getMode: (entry, file) => getModeForFileReference(entry, file?.impliedNodeFormat), }; /** @internal */ @@ -1399,7 +1355,6 @@ export function getImpliedNodeFormatForFileWorker( default: return undefined; } - function lookupFromPackageJson(): Partial { const state = getTemporaryModuleResolutionState(packageJsonInfoCache, host, options); const packageJsonLocations: string[] = []; @@ -1971,7 +1926,6 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg isSourceFileFromExternalLibrary, isSourceFileDefaultLibrary, getModeForUsageLocation, - getEmitSyntaxForUsageLocation, getModeForResolutionAtIndex, getSourceFileFromReference, getLibFileFromReference, @@ -2000,11 +1954,6 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg forEachResolvedProjectReference, isSourceOfProjectReferenceRedirect, getRedirectReferenceForResolutionFromSourceOfProject, - getCompilerOptionsForFile, - getDefaultResolutionModeForFile, - getEmitModuleFormatOfFile, - getImpliedNodeFormatForEmit, - shouldTransformImportCall, emitBuildInfo, fileExists, readFile, @@ -2757,10 +2706,6 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg getSymlinkCache, writeFile: writeFileCallback || writeFile, isEmitBlocked, - shouldTransformImportCall, - getEmitModuleFormatOfFile, - getDefaultResolutionModeForFile, - getModeForResolutionAtIndex, readFile: f => host.readFile(f), fileExists: f => { // Use local caches @@ -4034,15 +3979,11 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg // store resolved type directive on the file const fileName = ref.fileName; resolutionsInFile.set(fileName, getModeForFileReference(ref, file.impliedNodeFormat), resolvedTypeReferenceDirective); - const mode = ref.resolutionMode || getDefaultResolutionModeForFile(file); + const mode = ref.resolutionMode || file.impliedNodeFormat; processTypeReferenceDirective(fileName, mode, resolvedTypeReferenceDirective, { kind: FileIncludeKind.TypeReferenceDirective, file: file.path, index }); } } - function getCompilerOptionsForFile(file: SourceFile): CompilerOptions { - return getRedirectReferenceForResolution(file)?.commandLine.options || options; - } - function processTypeReferenceDirective( typeReferenceDirective: string, mode: ResolutionMode, @@ -4157,7 +4098,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg const resolutions = resolvedModulesProcessing?.get(file.path) || resolveModuleNamesReusingOldState(moduleNames, file); Debug.assert(resolutions.length === moduleNames.length); - const optionsForFile = getCompilerOptionsForFile(file); + const optionsForFile = getRedirectReferenceForResolution(file)?.commandLine.options || options; const resolutionsInFile = createModeAwareCache(); (resolvedModules ??= new Map()).set(file.path, resolutionsInFile); for (let index = 0; index < moduleNames.length; index++) { @@ -4756,7 +4697,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg } else { reasons?.forEach(processReason); - redirectInfo = file && explainIfFileIsRedirectAndImpliedFormat(file, getCompilerOptionsForFile(file)); + redirectInfo = file && explainIfFileIsRedirectAndImpliedFormat(file); } if (fileProcessingReason) processReason(fileProcessingReason); @@ -5190,70 +5131,13 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg } function getModeForUsageLocation(file: SourceFile, usage: StringLiteralLike): ResolutionMode { - return getModeForUsageLocationWorker(file, usage, getCompilerOptionsForFile(file)); - } - - function getEmitSyntaxForUsageLocation(file: SourceFile, usage: StringLiteralLike): ResolutionMode { - return getEmitSyntaxForUsageLocationWorker(file, usage, getCompilerOptionsForFile(file)); + const optionsForFile = getRedirectReferenceForResolution(file)?.commandLine.options || options; + return getModeForUsageLocationWorker(file, usage, optionsForFile); } function getModeForResolutionAtIndex(file: SourceFile, index: number): ResolutionMode { return getModeForUsageLocation(file, getModuleNameStringLiteralAt(file, index)); } - - function getDefaultResolutionModeForFile(sourceFile: SourceFile): ResolutionMode { - return getDefaultResolutionModeForFileWorker(sourceFile, getCompilerOptionsForFile(sourceFile)); - } - - function getImpliedNodeFormatForEmit(sourceFile: SourceFile): ResolutionMode { - return getImpliedNodeFormatForEmitWorker(sourceFile, getCompilerOptionsForFile(sourceFile)); - } - - function getEmitModuleFormatOfFile(sourceFile: SourceFile): ModuleKind { - return getEmitModuleFormatOfFileWorker(sourceFile, getCompilerOptionsForFile(sourceFile)); - } - - function shouldTransformImportCall(sourceFile: SourceFile): boolean { - return shouldTransformImportCallWorker(sourceFile, getCompilerOptionsForFile(sourceFile)); - } -} - -function shouldTransformImportCallWorker(sourceFile: Pick, options: CompilerOptions): boolean { - const moduleKind = getEmitModuleKind(options); - if (ModuleKind.Node16 <= moduleKind && moduleKind <= ModuleKind.NodeNext || moduleKind === ModuleKind.Preserve) { - return false; - } - return getEmitModuleFormatOfFileWorker(sourceFile, options) < ModuleKind.ES2015; -} -/** @internal Prefer `program.getEmitModuleFormatOfFile` when possible. */ -export function getEmitModuleFormatOfFileWorker(sourceFile: Pick, options: CompilerOptions): ModuleKind { - return getImpliedNodeFormatForEmitWorker(sourceFile, options) ?? getEmitModuleKind(options); -} -/** @internal Prefer `program.getImpliedNodeFormatForEmit` when possible. */ -export function getImpliedNodeFormatForEmitWorker(sourceFile: Pick, options: CompilerOptions): ResolutionMode { - const moduleKind = getEmitModuleKind(options); - if (ModuleKind.Node16 <= moduleKind && moduleKind <= ModuleKind.NodeNext) { - return sourceFile.impliedNodeFormat; - } - if ( - sourceFile.impliedNodeFormat === ModuleKind.CommonJS - && (sourceFile.packageJsonScope?.contents.packageJsonContent.type === "commonjs" - || fileExtensionIsOneOf(sourceFile.fileName, [Extension.Cjs, Extension.Cts])) - ) { - return ModuleKind.CommonJS; - } - if ( - sourceFile.impliedNodeFormat === ModuleKind.ESNext - && (sourceFile.packageJsonScope?.contents.packageJsonContent.type === "module" - || fileExtensionIsOneOf(sourceFile.fileName, [Extension.Mjs, Extension.Mts])) - ) { - return ModuleKind.ESNext; - } - return undefined; -} -/** @internal Prefer `program.getDefaultResolutionModeForFile` when possible. */ -export function getDefaultResolutionModeForFileWorker(sourceFile: Pick, options: CompilerOptions): ResolutionMode { - return importSyntaxAffectsModuleResolution(options) ? getImpliedNodeFormatForEmitWorker(sourceFile, options) : undefined; } interface HostForUseSourceOfProjectReferenceRedirect { diff --git a/src/compiler/transformer.ts b/src/compiler/transformer.ts index bd181e5f3c028..1ca1657eac038 100644 --- a/src/compiler/transformer.ts +++ b/src/compiler/transformer.ts @@ -65,10 +65,10 @@ import { transformESDecorators, transformESNext, transformGenerators, - transformImpliedNodeFormatDependentModule, transformJsx, transformLegacyDecorators, transformModule, + transformNodeModule, transformSystemModule, transformTypeScript, VariableDeclaration, @@ -77,23 +77,17 @@ import * as performance from "./_namespaces/ts.performance.js"; function getModuleTransformer(moduleKind: ModuleKind): TransformerFactory { switch (moduleKind) { - case ModuleKind.Preserve: - // `transformECMAScriptModule` contains logic for preserving - // CJS input syntax in `--module preserve` - return transformECMAScriptModule; case ModuleKind.ESNext: case ModuleKind.ES2022: case ModuleKind.ES2020: case ModuleKind.ES2015: - case ModuleKind.Node16: - case ModuleKind.NodeNext: - case ModuleKind.CommonJS: - // Wraps `transformModule` and `transformECMAScriptModule` and - // selects between them based on the `impliedNodeFormat` of the - // source file. - return transformImpliedNodeFormatDependentModule; + case ModuleKind.Preserve: + return transformECMAScriptModule; case ModuleKind.System: return transformSystemModule; + case ModuleKind.Node16: + case ModuleKind.NodeNext: + return transformNodeModule; default: return transformModule; } diff --git a/src/compiler/transformers/module/module.ts b/src/compiler/transformers/module/module.ts index dc30bca2bb8d2..72028eebed49a 100644 --- a/src/compiler/transformers/module/module.ts +++ b/src/compiler/transformers/module/module.ts @@ -797,7 +797,7 @@ export function transformModule(context: TransformationContext): (x: SourceFile case SyntaxKind.PartiallyEmittedExpression: return visitPartiallyEmittedExpression(node as PartiallyEmittedExpression, valueIsDiscarded); case SyntaxKind.CallExpression: - if (isImportCall(node) && host.shouldTransformImportCall(currentSourceFile)) { + if (isImportCall(node) && currentSourceFile.impliedNodeFormat === undefined) { return visitImportCallExpression(node); } break; diff --git a/src/compiler/transformers/module/impliedNodeFormatDependent.ts b/src/compiler/transformers/module/node.ts similarity index 84% rename from src/compiler/transformers/module/impliedNodeFormatDependent.ts rename to src/compiler/transformers/module/node.ts index 7a5bf9e210fcd..20b34a3ce2a7b 100644 --- a/src/compiler/transformers/module/impliedNodeFormatDependent.ts +++ b/src/compiler/transformers/module/node.ts @@ -14,7 +14,7 @@ import { } from "../../_namespaces/ts.js"; /** @internal */ -export function transformImpliedNodeFormatDependentModule(context: TransformationContext) { +export function transformNodeModule(context: TransformationContext) { const previousOnSubstituteNode = context.onSubstituteNode; const previousOnEmitNode = context.onEmitNode; @@ -30,7 +30,6 @@ export function transformImpliedNodeFormatDependentModule(context: Transformatio const cjsOnSubstituteNode = context.onSubstituteNode; const cjsOnEmitNode = context.onEmitNode; - const getEmitModuleFormatOfFile = (file: SourceFile) => context.getEmitHost().getEmitModuleFormatOfFile(file); context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; @@ -52,7 +51,7 @@ export function transformImpliedNodeFormatDependentModule(context: Transformatio if (!currentSourceFile) { return previousOnSubstituteNode(hint, node); } - if (getEmitModuleFormatOfFile(currentSourceFile) >= ModuleKind.ES2015) { + if (currentSourceFile.impliedNodeFormat === ModuleKind.ESNext) { return esmOnSubstituteNode(hint, node); } return cjsOnSubstituteNode(hint, node); @@ -66,14 +65,14 @@ export function transformImpliedNodeFormatDependentModule(context: Transformatio if (!currentSourceFile) { return previousOnEmitNode(hint, node, emitCallback); } - if (getEmitModuleFormatOfFile(currentSourceFile) >= ModuleKind.ES2015) { + if (currentSourceFile.impliedNodeFormat === ModuleKind.ESNext) { return esmOnEmitNode(hint, node, emitCallback); } return cjsOnEmitNode(hint, node, emitCallback); } function getModuleTransformForFile(file: SourceFile): typeof esmTransform { - return getEmitModuleFormatOfFile(file) >= ModuleKind.ES2015 ? esmTransform : cjsTransform; + return file.impliedNodeFormat === ModuleKind.ESNext ? esmTransform : cjsTransform; } function transformSourceFile(node: SourceFile) { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 3d4a5e4fda89d..995f7300a5a1c 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -4747,79 +4747,21 @@ export interface Program extends ScriptReferenceHost { isSourceFileFromExternalLibrary(file: SourceFile): boolean; isSourceFileDefaultLibrary(file: SourceFile): boolean; /** - * Calculates the final resolution mode for a given module reference node. This function only returns a result when module resolution - * settings allow differing resolution between ESM imports and CJS requires, or when a mode is explicitly provided via import attributes, - * which cause an `import` or `require` condition to be used during resolution regardless of module resolution settings. In absence of - * overriding attributes, and in modes that support differing resolution, the result indicates the syntax the usage would emit to JavaScript. - * Some examples: - * - * ```ts - * // tsc foo.mts --module nodenext - * import {} from "mod"; - * // Result: ESNext - the import emits as ESM due to `impliedNodeFormat` set by .mts file extension - * - * // tsc foo.cts --module nodenext - * import {} from "mod"; - * // Result: CommonJS - the import emits as CJS due to `impliedNodeFormat` set by .cts file extension - * - * // tsc foo.ts --module preserve --moduleResolution bundler - * import {} from "mod"; - * // Result: ESNext - the import emits as ESM due to `--module preserve` and `--moduleResolution bundler` - * // supports conditional imports/exports - * - * // tsc foo.ts --module preserve --moduleResolution node10 - * import {} from "mod"; - * // Result: undefined - the import emits as ESM due to `--module preserve`, but `--moduleResolution node10` - * // does not support conditional imports/exports - * - * // tsc foo.ts --module commonjs --moduleResolution node10 - * import type {} from "mod" with { "resolution-mode": "import" }; - * // Result: ESNext - conditional imports/exports always supported with "resolution-mode" attribute - * ``` + * Calculates the final resolution mode for a given module reference node. This is the resolution mode explicitly provided via import + * attributes, if present, or the syntax the usage would have if emitted to JavaScript. In `--module node16` or `nodenext`, this may + * depend on the file's `impliedNodeFormat`. In `--module preserve`, it depends only on the input syntax of the reference. In other + * `module` modes, when overriding import attributes are not provided, this function returns `undefined`, as the result would have no + * impact on module resolution, emit, or type checking. */ getModeForUsageLocation(file: SourceFile, usage: StringLiteralLike): ResolutionMode; /** - * Calculates the final resolution mode for an import at some index within a file's `imports` list. This function only returns a result - * when module resolution settings allow differing resolution between ESM imports and CJS requires, or when a mode is explicitly provided - * via import attributes, which cause an `import` or `require` condition to be used during resolution regardless of module resolution - * settings. In absence of overriding attributes, and in modes that support differing resolution, the result indicates the syntax the - * usage would emit to JavaScript. Some examples: - * - * ```ts - * // tsc foo.mts --module nodenext - * import {} from "mod"; - * // Result: ESNext - the import emits as ESM due to `impliedNodeFormat` set by .mts file extension - * - * // tsc foo.cts --module nodenext - * import {} from "mod"; - * // Result: CommonJS - the import emits as CJS due to `impliedNodeFormat` set by .cts file extension - * - * // tsc foo.ts --module preserve --moduleResolution bundler - * import {} from "mod"; - * // Result: ESNext - the import emits as ESM due to `--module preserve` and `--moduleResolution bundler` - * // supports conditional imports/exports - * - * // tsc foo.ts --module preserve --moduleResolution node10 - * import {} from "mod"; - * // Result: undefined - the import emits as ESM due to `--module preserve`, but `--moduleResolution node10` - * // does not support conditional imports/exports - * - * // tsc foo.ts --module commonjs --moduleResolution node10 - * import type {} from "mod" with { "resolution-mode": "import" }; - * // Result: ESNext - conditional imports/exports always supported with "resolution-mode" attribute - * ``` + * Calculates the final resolution mode for an import at some index within a file's `imports` list. This is the resolution mode + * explicitly provided via import attributes, if present, or the syntax the usage would have if emitted to JavaScript. In + * `--module node16` or `nodenext`, this may depend on the file's `impliedNodeFormat`. In `--module preserve`, it depends only on the + * input syntax of the reference. In other `module` modes, when overriding import attributes are not provided, this function returns + * `undefined`, as the result would have no impact on module resolution, emit, or type checking. */ getModeForResolutionAtIndex(file: SourceFile, index: number): ResolutionMode; - /** - * @internal - * The resolution mode to use for module resolution or module specifier resolution - * outside the context of an existing module reference, where - * `program.getModeForUsageLocation` should be used instead. - */ - getDefaultResolutionModeForFile(sourceFile: SourceFile): ResolutionMode; - /** @internal */ getImpliedNodeFormatForEmit(sourceFile: SourceFile): ResolutionMode; - /** @internal */ getEmitModuleFormatOfFile(sourceFile: SourceFile): ModuleKind; - /** @internal */ shouldTransformImportCall(sourceFile: SourceFile): boolean; // For testing purposes only. // This is set on created program to let us know how the program was created using old program @@ -4874,7 +4816,6 @@ export interface Program extends ScriptReferenceHost { /** @internal */ getResolvedProjectReferenceByPath(projectReferencePath: Path): ResolvedProjectReference | undefined; /** @internal */ getRedirectReferenceForResolutionFromSourceOfProject(filePath: Path): ResolvedProjectReference | undefined; /** @internal */ isSourceOfProjectReferenceRedirect(fileName: string): boolean; - /** @internal */ getCompilerOptionsForFile(file: SourceFile): CompilerOptions; /** @internal */ getBuildInfo?(): BuildInfo; /** @internal */ emitBuildInfo(writeFile?: WriteFileCallback, cancellationToken?: CancellationToken): EmitResult; /** @@ -4990,12 +4931,8 @@ export interface TypeCheckerHost extends ModuleSpecifierResolutionHost { getSourceFile(fileName: string): SourceFile | undefined; getProjectReferenceRedirect(fileName: string): string | undefined; isSourceOfProjectReferenceRedirect(fileName: string): boolean; - getEmitSyntaxForUsageLocation(file: SourceFile, usage: StringLiteralLike): ResolutionMode; getRedirectReferenceForResolutionFromSourceOfProject(filePath: Path): ResolvedProjectReference | undefined; getModeForUsageLocation(file: SourceFile, usage: StringLiteralLike): ResolutionMode; - getDefaultResolutionModeForFile(sourceFile: SourceFile): ResolutionMode; - getImpliedNodeFormatForEmit(sourceFile: SourceFile): ResolutionMode; - getEmitModuleFormatOfFile(sourceFile: SourceFile): ModuleKind; getResolvedModule(f: SourceFile, moduleName: string, mode: ResolutionMode): ResolvedModuleWithFailedLookupLocations | undefined; @@ -5665,9 +5602,6 @@ export interface RequireVariableDeclarationList extends VariableDeclarationList readonly declarations: NodeArray>; } -/** @internal */ -export type CanHaveModuleSpecifier = AnyImportOrBareOrAccessedRequire | AliasDeclarationNode | ExportDeclaration | ImportTypeNode; - /** @internal */ export type LateVisibilityPaintedStatement = | AnyImportOrJsDocImport @@ -8425,8 +8359,6 @@ export interface EmitHost extends ScriptReferenceHost, ModuleSpecifierResolution getCanonicalFileName(fileName: string): string; isEmitBlocked(emitFileName: string): boolean; - shouldTransformImportCall(sourceFile: SourceFile): boolean; - getEmitModuleFormatOfFile(sourceFile: SourceFile): ModuleKind; writeFile: WriteFileCallback; getBuildInfo(): BuildInfo | undefined; @@ -9667,7 +9599,6 @@ export interface PrinterOptions { omitTrailingSemicolon?: boolean; noEmitHelpers?: boolean; /** @internal */ module?: CompilerOptions["module"]; - /** @internal */ moduleResolution?: CompilerOptions["moduleResolution"]; /** @internal */ target?: CompilerOptions["target"]; /** @internal */ sourceMap?: boolean; /** @internal */ inlineSourceMap?: boolean; @@ -9802,8 +9733,6 @@ export interface ModuleSpecifierResolutionHost { isSourceOfProjectReferenceRedirect(fileName: string): boolean; getFileIncludeReasons(): MultiMap; getCommonSourceDirectory(): string; - getDefaultResolutionModeForFile(sourceFile: SourceFile): ResolutionMode; - getModeForResolutionAtIndex(file: SourceFile, index: number): ResolutionMode; getModuleResolutionCache?(): ModuleResolutionCache | undefined; trace?(s: string): void; diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index b61399a687f6c..10cf0316c2bbc 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -5,6 +5,7 @@ import { addRange, affectsDeclarationPathOptionDeclarations, affectsEmitOptionDeclarations, + AliasDeclarationNode, AllAccessorDeclarations, AmbientModuleDeclaration, AmpersandAmpersandEqualsToken, @@ -40,7 +41,6 @@ import { canHaveDecorators, canHaveLocals, canHaveModifiers, - type CanHaveModuleSpecifier, CanonicalDiagnostic, CaseBlock, CaseClause, @@ -168,7 +168,6 @@ import { getCommonSourceDirectory, getContainerFlags, getDirectoryPath, - getImpliedNodeFormatForEmitWorker, getJSDocAugmentsTag, getJSDocDeprecatedTagNoCache, getJSDocImplementsTags, @@ -4080,26 +4079,7 @@ export function isFunctionSymbol(symbol: Symbol | undefined) { } /** @internal */ -export function canHaveModuleSpecifier(node: Node | undefined): node is CanHaveModuleSpecifier { - switch (node?.kind) { - case SyntaxKind.VariableDeclaration: - case SyntaxKind.BindingElement: - case SyntaxKind.ImportDeclaration: - case SyntaxKind.ExportDeclaration: - case SyntaxKind.ImportEqualsDeclaration: - case SyntaxKind.ImportClause: - case SyntaxKind.NamespaceExport: - case SyntaxKind.NamespaceImport: - case SyntaxKind.ExportSpecifier: - case SyntaxKind.ImportSpecifier: - case SyntaxKind.ImportType: - return true; - } - return false; -} - -/** @internal */ -export function tryGetModuleSpecifierFromDeclaration(node: CanHaveModuleSpecifier | JSDocImportTag): StringLiteralLike | undefined { +export function tryGetModuleSpecifierFromDeclaration(node: AnyImportOrBareOrAccessedRequire | AliasDeclarationNode | ExportDeclaration | ImportTypeNode | JSDocImportTag): StringLiteralLike | undefined { switch (node.kind) { case SyntaxKind.VariableDeclaration: case SyntaxKind.BindingElement: @@ -8770,13 +8750,11 @@ function isFileModuleFromUsingJSXTag(file: SourceFile): Node | undefined { * Note that this requires file.impliedNodeFormat be set already; meaning it must be set very early on * in SourceFile construction. */ -function isFileForcedToBeModuleByFormat(file: SourceFile, options: CompilerOptions): true | undefined { +function isFileForcedToBeModuleByFormat(file: SourceFile): true | undefined { // Excludes declaration files - they still require an explicit `export {}` or the like // for back compat purposes. The only non-declaration files _not_ forced to be a module are `.js` files // that aren't esm-mode (meaning not in a `type: module` scope). - // - // TODO: extension check never considered compilerOptions; should impliedNodeFormat? - return (getImpliedNodeFormatForEmitWorker(file, options) === ModuleKind.ESNext || (fileExtensionIsOneOf(file.fileName, [Extension.Cjs, Extension.Cts, Extension.Mjs, Extension.Mts]))) && !file.isDeclarationFile ? true : undefined; + return (file.impliedNodeFormat === ModuleKind.ESNext || (fileExtensionIsOneOf(file.fileName, [Extension.Cjs, Extension.Cts, Extension.Mjs, Extension.Mts]))) && !file.isDeclarationFile ? true : undefined; } /** @internal */ @@ -8797,29 +8775,17 @@ export function getSetExternalModuleIndicator(options: CompilerOptions): (file: // If module is nodenext or node16, all esm format files are modules // If jsx is react-jsx or react-jsxdev then jsx tags force module-ness // otherwise, the presence of import or export statments (or import.meta) implies module-ness - const checks: ((file: SourceFile, options: CompilerOptions) => Node | true | undefined)[] = [isFileProbablyExternalModule]; + const checks: ((file: SourceFile) => Node | true | undefined)[] = [isFileProbablyExternalModule]; if (options.jsx === JsxEmit.ReactJSX || options.jsx === JsxEmit.ReactJSXDev) { checks.push(isFileModuleFromUsingJSXTag); } checks.push(isFileForcedToBeModuleByFormat); const combined = or(...checks); - const callback = (file: SourceFile) => void (file.externalModuleIndicator = combined(file, options)); + const callback = (file: SourceFile) => void (file.externalModuleIndicator = combined(file)); return callback; } } -/** - * @internal - * Returns true if an `import` and a `require` of the same module specifier - * can resolve to a different file. - */ -export function importSyntaxAffectsModuleResolution(options: CompilerOptions) { - const moduleResolution = getEmitModuleResolutionKind(options); - return ModuleResolutionKind.Node16 <= moduleResolution && moduleResolution <= ModuleResolutionKind.NodeNext - || getResolvePackageJsonExports(options) - || getResolvePackageJsonImports(options); -} - type CompilerOptionKeys = keyof { [K in keyof CompilerOptions as string extends K ? never : K]: any; }; function createComputedCompilerOptions>( options: { diff --git a/src/compiler/watch.ts b/src/compiler/watch.ts index 97476117e725d..536dac142cd57 100644 --- a/src/compiler/watch.ts +++ b/src/compiler/watch.ts @@ -56,7 +56,6 @@ import { getDefaultLibFileName, getDirectoryPath, getEmitScriptTarget, - getImpliedNodeFormatForEmitWorker, getLineAndCharacterOfPosition, getNameOfScriptTarget, getNewLineCharacter, @@ -352,14 +351,13 @@ export function explainFiles(program: Program, write: (s: string) => void) { for (const file of program.getSourceFiles()) { write(`${toFileName(file, relativeFileName)}`); reasons.get(file.path)?.forEach(reason => write(` ${fileIncludeReasonToDiagnostics(program, reason, relativeFileName).messageText}`)); - explainIfFileIsRedirectAndImpliedFormat(file, program.getCompilerOptionsForFile(file), relativeFileName)?.forEach(d => write(` ${d.messageText}`)); + explainIfFileIsRedirectAndImpliedFormat(file, relativeFileName)?.forEach(d => write(` ${d.messageText}`)); } } /** @internal */ export function explainIfFileIsRedirectAndImpliedFormat( file: SourceFile, - options: CompilerOptions, fileNameConvertor?: (fileName: string) => string, ): DiagnosticMessageChain[] | undefined { let result: DiagnosticMessageChain[] | undefined; @@ -378,7 +376,7 @@ export function explainIfFileIsRedirectAndImpliedFormat( )); } if (isExternalOrCommonJsModule(file)) { - switch (getImpliedNodeFormatForEmitWorker(file, options)) { + switch (file.impliedNodeFormat) { case ModuleKind.ESNext: if (file.packageJsonScope) { (result ??= []).push(chainDiagnosticMessages( diff --git a/src/services/codefixes/importFixes.ts b/src/services/codefixes/importFixes.ts index c584de5b475af..b397f29d74e75 100644 --- a/src/services/codefixes/importFixes.ts +++ b/src/services/codefixes/importFixes.ts @@ -49,12 +49,10 @@ import { getBaseFileName, getDefaultLikeExportInfo, getDirectoryPath, - getEmitModuleFormatOfFileWorker, getEmitModuleKind, getEmitModuleResolutionKind, getEmitScriptTarget, getExportInfoMap, - getImpliedNodeFormatForEmitWorker, getMeaningFromLocation, getNameForExportedSymbol, getOutputExtension, @@ -329,7 +327,7 @@ function createImportAdderWorker(sourceFile: SourceFile | FutureSourceFile, prog compilerOptions, createModuleSpecifierResolutionHost(program, host), ); - const importKind = getImportKind(futureExportingSourceFile, exportKind, program); + const importKind = getImportKind(futureExportingSourceFile, exportKind, compilerOptions); const addAsTypeOnly = getAddAsTypeOnly( isImportUsageValidAsTypeOnly, /*isForNewImportDeclaration*/ true, @@ -693,7 +691,7 @@ export interface ImportSpecifierResolver { /** @internal */ export function createImportSpecifierResolver(importingFile: SourceFile, program: Program, host: LanguageServiceHost, preferences: UserPreferences): ImportSpecifierResolver { const packageJsonImportFilter = createPackageJsonImportFilter(importingFile, preferences, host); - const importMap = createExistingImportMap(importingFile, program); + const importMap = createExistingImportMap(program.getTypeChecker(), importingFile, program.getCompilerOptions()); return { getModuleSpecifierForBestExportInfo }; function getModuleSpecifierForBestExportInfo( @@ -898,7 +896,7 @@ function getImportFixes( sourceFile: SourceFile | FutureSourceFile, host: LanguageServiceHost, preferences: UserPreferences, - importMap = isFullSourceFile(sourceFile) ? createExistingImportMap(sourceFile, program) : undefined, + importMap = isFullSourceFile(sourceFile) ? createExistingImportMap(program.getTypeChecker(), sourceFile, program.getCompilerOptions()) : undefined, fromCacheOnly?: boolean, ): { computedWithoutCacheCount: number; fixes: readonly ImportFixWithModuleSpecifier[]; } { const checker = program.getTypeChecker(); @@ -1065,8 +1063,7 @@ function tryAddToExistingImport(existingImports: readonly FixAddToExistingImport } } -function createExistingImportMap(importingFile: SourceFile, program: Program) { - const checker = program.getTypeChecker(); +function createExistingImportMap(checker: TypeChecker, importingFile: SourceFile, compilerOptions: CompilerOptions) { let importMap: MultiMap | undefined; for (const moduleSpecifier of importingFile.imports) { const i = importFromModuleSpecifier(moduleSpecifier); @@ -1096,7 +1093,7 @@ function createExistingImportMap(importingFile: SourceFile, program: Program) { && !every(matchingDeclarations, isJSDocImportTag) ) return emptyArray; - const importKind = getImportKind(importingFile, exportKind, program); + const importKind = getImportKind(importingFile, exportKind, compilerOptions); return matchingDeclarations.map(declaration => ({ declaration, importKind, symbol, targetFlags })); }, }; @@ -1120,9 +1117,8 @@ function shouldUseRequire(sourceFile: SourceFile | FutureSourceFile, program: Pr // 4. In --module nodenext, assume we're not emitting JS -> JS, so use // whatever syntax Node expects based on the detected module kind - // TODO: consider removing `impliedNodeFormatForEmit` - if (getImpliedNodeFormatForEmit(sourceFile, program) === ModuleKind.CommonJS) return true; - if (getImpliedNodeFormatForEmit(sourceFile, program) === ModuleKind.ESNext) return false; + if (sourceFile.impliedNodeFormat === ModuleKind.CommonJS) return true; + if (sourceFile.impliedNodeFormat === ModuleKind.ESNext) return false; // 5. Match the first other JS file in the program that's unambiguously CJS or ESM for (const otherFile of program.getSourceFiles()) { @@ -1175,7 +1171,7 @@ function getNewImportFixes( // `position` should only be undefined at a missing jsx namespace, in which case we shouldn't be looking for pure types. return { kind: ImportFixKind.JsdocTypeImport, moduleSpecifierKind, moduleSpecifier, usagePosition, exportInfo, isReExport: i > 0 }; } - const importKind = getImportKind(sourceFile, exportInfo.exportKind, program); + const importKind = getImportKind(sourceFile, exportInfo.exportKind, compilerOptions); let qualification: Qualification | undefined; if (usagePosition !== undefined && importKind === ImportKind.CommonJS && exportInfo.exportKind === ExportKind.Named) { // Compiler options are restricting our import options to a require, but we need to access @@ -1406,8 +1402,8 @@ function getUmdSymbol(token: Node, checker: TypeChecker): Symbol | undefined { * * @internal */ -export function getImportKind(importingFile: SourceFile | FutureSourceFile, exportKind: ExportKind, program: Program, forceImportKeyword?: boolean): ImportKind { - if (program.getCompilerOptions().verbatimModuleSyntax && getEmitModuleFormatOfFile(importingFile, program) === ModuleKind.CommonJS) { +export function getImportKind(importingFile: SourceFile | FutureSourceFile, exportKind: ExportKind, compilerOptions: CompilerOptions, forceImportKeyword?: boolean): ImportKind { + if (compilerOptions.verbatimModuleSyntax && (getEmitModuleKind(compilerOptions) === ModuleKind.CommonJS || importingFile.impliedNodeFormat === ModuleKind.CommonJS)) { // TODO: if the exporting file is ESM under nodenext, or `forceImport` is given in a JS file, this is impossible return ImportKind.CommonJS; } @@ -1417,22 +1413,22 @@ export function getImportKind(importingFile: SourceFile | FutureSourceFile, expo case ExportKind.Default: return ImportKind.Default; case ExportKind.ExportEquals: - return getExportEqualsImportKind(importingFile, program.getCompilerOptions(), !!forceImportKeyword); + return getExportEqualsImportKind(importingFile, compilerOptions, !!forceImportKeyword); case ExportKind.UMD: - return getUmdImportKind(importingFile, program, !!forceImportKeyword); + return getUmdImportKind(importingFile, compilerOptions, !!forceImportKeyword); default: return Debug.assertNever(exportKind); } } -function getUmdImportKind(importingFile: SourceFile | FutureSourceFile, program: Program, forceImportKeyword: boolean): ImportKind { +function getUmdImportKind(importingFile: SourceFile | FutureSourceFile, compilerOptions: CompilerOptions, forceImportKeyword: boolean): ImportKind { // Import a synthetic `default` if enabled. - if (getAllowSyntheticDefaultImports(program.getCompilerOptions())) { + if (getAllowSyntheticDefaultImports(compilerOptions)) { return ImportKind.Default; } // When a synthetic `default` is unavailable, use `import..require` if the module kind supports it. - const moduleKind = getEmitModuleKind(program.getCompilerOptions()); + const moduleKind = getEmitModuleKind(compilerOptions); switch (moduleKind) { case ModuleKind.AMD: case ModuleKind.CommonJS: @@ -1452,7 +1448,7 @@ function getUmdImportKind(importingFile: SourceFile | FutureSourceFile, program: return ImportKind.Namespace; case ModuleKind.Node16: case ModuleKind.NodeNext: - return getImpliedNodeFormatForEmit(importingFile, program) === ModuleKind.ESNext ? ImportKind.Namespace : ImportKind.CommonJS; + return importingFile.impliedNodeFormat === ModuleKind.ESNext ? ImportKind.Namespace : ImportKind.CommonJS; default: return Debug.assertNever(moduleKind, `Unexpected moduleKind ${moduleKind}`); } @@ -2027,11 +2023,3 @@ function symbolFlagsHaveMeaning(flags: SymbolFlags, meaning: SemanticMeaning): b meaning & SemanticMeaning.Namespace ? !!(flags & SymbolFlags.Namespace) : false; } - -function getImpliedNodeFormatForEmit(file: SourceFile | FutureSourceFile, program: Program) { - return isFullSourceFile(file) ? program.getImpliedNodeFormatForEmit(file) : getImpliedNodeFormatForEmitWorker(file, program.getCompilerOptions()); -} - -function getEmitModuleFormatOfFile(file: SourceFile | FutureSourceFile, program: Program) { - return isFullSourceFile(file) ? program.getEmitModuleFormatOfFile(file) : getEmitModuleFormatOfFileWorker(file, program.getCompilerOptions()); -} diff --git a/src/services/completions.ts b/src/services/completions.ts index 92884a0ad1cca..a0f26987bb792 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -1161,13 +1161,11 @@ function getJSDocParamAnnotation( ? createSnippetPrinter({ removeComments: true, module: options.module, - moduleResolution: options.moduleResolution, target: options.target, }) : createPrinter({ removeComments: true, module: options.module, - moduleResolution: options.moduleResolution, target: options.target, }); setEmitFlags(typeNode, EmitFlags.SingleLine); @@ -1461,7 +1459,6 @@ function getExhaustiveCaseSnippets( const printer = createSnippetPrinter({ removeComments: true, module: options.module, - moduleResolution: options.moduleResolution, target: options.target, newLine: getNewLineKind(newLineChar), }); @@ -1723,7 +1720,7 @@ function createCompletionEntry( if (originIsResolvedExport(origin)) { sourceDisplay = [textPart(origin.moduleSpecifier)]; if (importStatementCompletion) { - ({ insertText, replacementSpan } = getInsertTextAndReplacementSpanForImportCompletion(name, importStatementCompletion, origin, useSemicolons, sourceFile, program, preferences)); + ({ insertText, replacementSpan } = getInsertTextAndReplacementSpanForImportCompletion(name, importStatementCompletion, origin, useSemicolons, sourceFile, options, preferences)); isSnippet = preferences.includeCompletionsWithSnippetText ? true : undefined; } } @@ -1981,7 +1978,6 @@ function getEntryForMemberCompletion( const printer = createSnippetPrinter({ removeComments: true, module: options.module, - moduleResolution: options.moduleResolution, target: options.target, omitTrailingSemicolon: false, newLine: getNewLineKind(getNewLineOrDefaultFromHost(host, formatContext?.options)), @@ -2208,7 +2204,6 @@ function getEntryForObjectLiteralMethodCompletion( const printer = createSnippetPrinter({ removeComments: true, module: options.module, - moduleResolution: options.moduleResolution, target: options.target, omitTrailingSemicolon: false, newLine: getNewLineKind(getNewLineOrDefaultFromHost(host, formatContext?.options)), @@ -2223,7 +2218,6 @@ function getEntryForObjectLiteralMethodCompletion( const signaturePrinter = createPrinter({ removeComments: true, module: options.module, - moduleResolution: options.moduleResolution, target: options.target, omitTrailingSemicolon: true, }); @@ -2526,14 +2520,14 @@ function completionEntryDataToSymbolOriginInfo(data: CompletionEntryData, comple return unresolvedOrigin; } -function getInsertTextAndReplacementSpanForImportCompletion(name: string, importStatementCompletion: ImportStatementCompletionInfo, origin: SymbolOriginInfoResolvedExport, useSemicolons: boolean, sourceFile: SourceFile, program: Program, preferences: UserPreferences) { +function getInsertTextAndReplacementSpanForImportCompletion(name: string, importStatementCompletion: ImportStatementCompletionInfo, origin: SymbolOriginInfoResolvedExport, useSemicolons: boolean, sourceFile: SourceFile, options: CompilerOptions, preferences: UserPreferences) { const replacementSpan = importStatementCompletion.replacementSpan; const quotedModuleSpecifier = escapeSnippetText(quote(sourceFile, preferences, origin.moduleSpecifier)); const exportKind = origin.isDefaultExport ? ExportKind.Default : origin.exportName === InternalSymbolName.ExportEquals ? ExportKind.ExportEquals : ExportKind.Named; const tabStop = preferences.includeCompletionsWithSnippetText ? "$1" : ""; - const importKind = codefix.getImportKind(sourceFile, exportKind, program, /*forceImportKeyword*/ true); + const importKind = codefix.getImportKind(sourceFile, exportKind, options, /*forceImportKeyword*/ true); const isImportSpecifierTypeOnly = importStatementCompletion.couldBeTypeOnlyImportSpecifier; const topLevelTypeOnlyText = importStatementCompletion.isTopLevelTypeOnly ? ` ${tokenToString(SyntaxKind.TypeKeyword)} ` : " "; const importSpecifierTypeOnlyText = isImportSpecifierTypeOnly ? `${tokenToString(SyntaxKind.TypeKeyword)} ` : ""; diff --git a/src/services/stringCompletions.ts b/src/services/stringCompletions.ts index b96e06138dee3..e0af6ca745cad 100644 --- a/src/services/stringCompletions.ts +++ b/src/services/stringCompletions.ts @@ -200,7 +200,7 @@ export function getStringLiteralCompletions( includeSymbol: boolean, ): CompletionInfo | undefined { if (isInReferenceComment(sourceFile, position)) { - const entries = getTripleSlashReferenceCompletion(sourceFile, position, program, host); + const entries = getTripleSlashReferenceCompletion(sourceFile, position, options, host); return entries && convertPathCompletions(entries); } if (isInString(sourceFile, position, contextToken)) { @@ -614,8 +614,8 @@ function getStringLiteralCompletionsFromModuleNamesWorker(sourceFile: SourceFile const extensionOptions = getExtensionOptions(compilerOptions, ReferenceKind.ModuleSpecifier, sourceFile, typeChecker, preferences, mode); return isPathRelativeToScript(literalValue) || !compilerOptions.baseUrl && !compilerOptions.paths && (isRootedDiskPath(literalValue) || isUrl(literalValue)) - ? getCompletionEntriesForRelativeModules(literalValue, scriptDirectory, program, host, scriptPath, extensionOptions) - : getCompletionEntriesForNonRelativeModules(literalValue, scriptDirectory, mode, program, host, extensionOptions); + ? getCompletionEntriesForRelativeModules(literalValue, scriptDirectory, compilerOptions, host, scriptPath, extensionOptions) + : getCompletionEntriesForNonRelativeModules(literalValue, scriptDirectory, mode, compilerOptions, host, extensionOptions, typeChecker); } interface ExtensionOptions { @@ -635,21 +635,20 @@ function getExtensionOptions(compilerOptions: CompilerOptions, referenceKind: Re resolutionMode, }; } -function getCompletionEntriesForRelativeModules(literalValue: string, scriptDirectory: string, program: Program, host: LanguageServiceHost, scriptPath: Path, extensionOptions: ExtensionOptions) { - const compilerOptions = program.getCompilerOptions(); +function getCompletionEntriesForRelativeModules(literalValue: string, scriptDirectory: string, compilerOptions: CompilerOptions, host: LanguageServiceHost, scriptPath: Path, extensionOptions: ExtensionOptions) { if (compilerOptions.rootDirs) { return getCompletionEntriesForDirectoryFragmentWithRootDirs( compilerOptions.rootDirs, literalValue, scriptDirectory, extensionOptions, - program, + compilerOptions, host, scriptPath, ); } else { - return arrayFrom(getCompletionEntriesForDirectoryFragment(literalValue, scriptDirectory, extensionOptions, program, host, /*moduleSpecifierIsRelative*/ true, scriptPath).values()); + return arrayFrom(getCompletionEntriesForDirectoryFragment(literalValue, scriptDirectory, extensionOptions, host, /*moduleSpecifierIsRelative*/ true, scriptPath).values()); } } @@ -687,13 +686,12 @@ function getBaseDirectoriesFromRootDirs(rootDirs: string[], basePath: string, sc ); } -function getCompletionEntriesForDirectoryFragmentWithRootDirs(rootDirs: string[], fragment: string, scriptDirectory: string, extensionOptions: ExtensionOptions, program: Program, host: LanguageServiceHost, exclude: string): readonly NameAndKind[] { - const compilerOptions = program.getCompilerOptions(); +function getCompletionEntriesForDirectoryFragmentWithRootDirs(rootDirs: string[], fragment: string, scriptDirectory: string, extensionOptions: ExtensionOptions, compilerOptions: CompilerOptions, host: LanguageServiceHost, exclude: string): readonly NameAndKind[] { const basePath = compilerOptions.project || host.getCurrentDirectory(); const ignoreCase = !(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames()); const baseDirectories = getBaseDirectoriesFromRootDirs(rootDirs, basePath, scriptDirectory, ignoreCase); return deduplicate( - flatMap(baseDirectories, baseDirectory => arrayFrom(getCompletionEntriesForDirectoryFragment(fragment, baseDirectory, extensionOptions, program, host, /*moduleSpecifierIsRelative*/ true, exclude).values())), + flatMap(baseDirectories, baseDirectory => arrayFrom(getCompletionEntriesForDirectoryFragment(fragment, baseDirectory, extensionOptions, host, /*moduleSpecifierIsRelative*/ true, exclude).values())), (itemA, itemB) => itemA.name === itemB.name && itemA.kind === itemB.kind && itemA.extension === itemB.extension, ); } @@ -709,7 +707,6 @@ function getCompletionEntriesForDirectoryFragment( fragment: string, scriptDirectory: string, extensionOptions: ExtensionOptions, - program: Program, host: LanguageServiceHost, moduleSpecifierIsRelative: boolean, exclude?: string, @@ -749,7 +746,7 @@ function getCompletionEntriesForDirectoryFragment( if (versionPaths) { const packageDirectory = getDirectoryPath(packageJsonPath); const pathInPackage = absolutePath.slice(ensureTrailingDirectorySeparator(packageDirectory).length); - if (addCompletionEntriesFromPaths(result, pathInPackage, packageDirectory, extensionOptions, program, host, versionPaths)) { + if (addCompletionEntriesFromPaths(result, pathInPackage, packageDirectory, extensionOptions, host, versionPaths)) { // A true result means one of the `versionPaths` was matched, which will block relative resolution // to files and folders from here. All reachable paths given the pattern match are already added. return result; @@ -772,7 +769,7 @@ function getCompletionEntriesForDirectoryFragment( continue; } - const { name, extension } = getFilenameWithExtensionOption(getBaseFileName(filePath), program, extensionOptions, /*isExportsWildcard*/ false); + const { name, extension } = getFilenameWithExtensionOption(getBaseFileName(filePath), host.getCompilationSettings(), extensionOptions, /*isExportsWildcard*/ false); result.add(nameAndKind(name, ScriptElementKind.scriptElement, extension)); } } @@ -792,7 +789,7 @@ function getCompletionEntriesForDirectoryFragment( return result; } -function getFilenameWithExtensionOption(name: string, program: Program, extensionOptions: ExtensionOptions, isExportsWildcard: boolean): { name: string; extension: Extension | undefined; } { +function getFilenameWithExtensionOption(name: string, compilerOptions: CompilerOptions, extensionOptions: ExtensionOptions, isExportsWildcard: boolean): { name: string; extension: Extension | undefined; } { const nonJsResult = moduleSpecifiers.tryGetRealFileNameForNonJsDeclarationFileName(name); if (nonJsResult) { return { name: nonJsResult, extension: tryGetExtensionFromPath(nonJsResult) }; @@ -803,8 +800,7 @@ function getFilenameWithExtensionOption(name: string, program: Program, extensio let allowedEndings = getModuleSpecifierPreferences( { importModuleSpecifierEnding: extensionOptions.endingPreference }, - program, - program.getCompilerOptions(), + compilerOptions, extensionOptions.importingSourceFile, ).getAllowedEndingsInPreferredOrder(extensionOptions.resolutionMode); @@ -818,7 +814,7 @@ function getFilenameWithExtensionOption(name: string, program: Program, extensio if (fileExtensionIsOneOf(name, supportedTSImplementationExtensions)) { return { name, extension: tryGetExtensionFromPath(name) }; } - const outputExtension = moduleSpecifiers.tryGetJSExtensionForFile(name, program.getCompilerOptions()); + const outputExtension = moduleSpecifiers.tryGetJSExtensionForFile(name, compilerOptions); return outputExtension ? { name: changeExtension(name, outputExtension), extension: outputExtension } : { name, extension: tryGetExtensionFromPath(name) }; @@ -832,7 +828,7 @@ function getFilenameWithExtensionOption(name: string, program: Program, extensio return { name: removeFileExtension(name), extension: tryGetExtensionFromPath(name) }; } - const outputExtension = moduleSpecifiers.tryGetJSExtensionForFile(name, program.getCompilerOptions()); + const outputExtension = moduleSpecifiers.tryGetJSExtensionForFile(name, compilerOptions); return outputExtension ? { name: changeExtension(name, outputExtension), extension: outputExtension } : { name, extension: tryGetExtensionFromPath(name) }; @@ -844,7 +840,6 @@ function addCompletionEntriesFromPaths( fragment: string, baseDirectory: string, extensionOptions: ExtensionOptions, - program: Program, host: LanguageServiceHost, paths: MapLike, ) { @@ -856,7 +851,7 @@ function addCompletionEntriesFromPaths( const lengthB = typeof patternB === "object" ? patternB.prefix.length : b.length; return compareValues(lengthB, lengthA); }; - return addCompletionEntriesFromPathsOrExports(result, /*isExports*/ false, fragment, baseDirectory, extensionOptions, program, host, getOwnKeys(paths), getPatternsForKey, comparePaths); + return addCompletionEntriesFromPathsOrExports(result, /*isExports*/ false, fragment, baseDirectory, extensionOptions, host, getOwnKeys(paths), getPatternsForKey, comparePaths); } /** @returns whether `fragment` was a match for any `paths` (which should indicate whether any other path completions should be offered) */ @@ -866,7 +861,6 @@ function addCompletionEntriesFromPathsOrExports( fragment: string, baseDirectory: string, extensionOptions: ExtensionOptions, - program: Program, host: LanguageServiceHost, keys: readonly string[], getPatternsForKey: (key: string) => string[] | undefined, @@ -901,7 +895,7 @@ function addCompletionEntriesFromPathsOrExports( if (typeof pathPattern === "string" || matchedPath === undefined || comparePaths(key, matchedPath) !== Comparison.GreaterThan) { pathResults.push({ matchedPattern: isMatch, - results: getCompletionsForPathMapping(keyWithoutLeadingDotSlash, patterns, fragment, baseDirectory, extensionOptions, isExports && isMatch, program, host) + results: getCompletionsForPathMapping(keyWithoutLeadingDotSlash, patterns, fragment, baseDirectory, extensionOptions, isExports && isMatch, host) .map(({ name, kind, extension }) => nameAndKind(name, kind, extension)), }); } @@ -923,12 +917,11 @@ function getCompletionEntriesForNonRelativeModules( fragment: string, scriptPath: string, mode: ResolutionMode, - program: Program, + compilerOptions: CompilerOptions, host: LanguageServiceHost, extensionOptions: ExtensionOptions, + typeChecker: TypeChecker, ): readonly NameAndKind[] { - const typeChecker = program.getTypeChecker(); - const compilerOptions = program.getCompilerOptions(); const { baseUrl, paths } = compilerOptions; const result = createNameAndKindSet(); @@ -936,12 +929,12 @@ function getCompletionEntriesForNonRelativeModules( if (baseUrl) { const absolute = normalizePath(combinePaths(host.getCurrentDirectory(), baseUrl)); - getCompletionEntriesForDirectoryFragment(fragment, absolute, extensionOptions, program, host, /*moduleSpecifierIsRelative*/ false, /*exclude*/ undefined, result); + getCompletionEntriesForDirectoryFragment(fragment, absolute, extensionOptions, host, /*moduleSpecifierIsRelative*/ false, /*exclude*/ undefined, result); } if (paths) { const absolute = getPathsBasePath(compilerOptions, host)!; - addCompletionEntriesFromPaths(result, fragment, absolute, extensionOptions, program, host, paths); + addCompletionEntriesFromPaths(result, fragment, absolute, extensionOptions, host, paths); } const fragmentDirectory = getFragmentDirectory(fragment); @@ -949,7 +942,7 @@ function getCompletionEntriesForNonRelativeModules( result.add(nameAndKind(ambientName, ScriptElementKind.externalModuleName, /*extension*/ undefined)); } - getCompletionEntriesFromTypings(host, program, scriptPath, fragmentDirectory, extensionOptions, result); + getCompletionEntriesFromTypings(host, compilerOptions, scriptPath, fragmentDirectory, extensionOptions, result); if (moduleResolutionUsesNodeModules(moduleResolution)) { // If looking for a global package name, don't just include everything in `node_modules` because that includes dependencies' own dependencies. @@ -968,7 +961,7 @@ function getCompletionEntriesForNonRelativeModules( let ancestorLookup: (directory: string) => void | undefined = ancestor => { const nodeModules = combinePaths(ancestor, "node_modules"); if (tryDirectoryExists(host, nodeModules)) { - getCompletionEntriesForDirectoryFragment(fragment, nodeModules, extensionOptions, program, host, /*moduleSpecifierIsRelative*/ false, /*exclude*/ undefined, result); + getCompletionEntriesForDirectoryFragment(fragment, nodeModules, extensionOptions, host, /*moduleSpecifierIsRelative*/ false, /*exclude*/ undefined, result); } }; if (fragmentDirectory && getResolvePackageJsonExports(compilerOptions)) { @@ -1005,7 +998,6 @@ function getCompletionEntriesForNonRelativeModules( fragmentSubpath, packageDirectory, extensionOptions, - program, host, keys, key => singleElementArray(getPatternFromFirstMatchingCondition(exports[key], conditions)), @@ -1049,7 +1041,6 @@ function getCompletionsForPathMapping( packageDirectory: string, extensionOptions: ExtensionOptions, isExportsWildcard: boolean, - program: Program, host: LanguageServiceHost, ): readonly NameAndKind[] { if (!endsWith(path, "*")) { @@ -1061,9 +1052,9 @@ function getCompletionsForPathMapping( const remainingFragment = tryRemovePrefix(fragment, pathPrefix); if (remainingFragment === undefined) { const starIsFullPathComponent = path[path.length - 2] === "/"; - return starIsFullPathComponent ? justPathMappingName(pathPrefix, ScriptElementKind.directory) : flatMap(patterns, pattern => getModulesForPathsPattern("", packageDirectory, pattern, extensionOptions, isExportsWildcard, program, host)?.map(({ name, ...rest }) => ({ name: pathPrefix + name, ...rest }))); + return starIsFullPathComponent ? justPathMappingName(pathPrefix, ScriptElementKind.directory) : flatMap(patterns, pattern => getModulesForPathsPattern("", packageDirectory, pattern, extensionOptions, isExportsWildcard, host)?.map(({ name, ...rest }) => ({ name: pathPrefix + name, ...rest }))); } - return flatMap(patterns, pattern => getModulesForPathsPattern(remainingFragment, packageDirectory, pattern, extensionOptions, isExportsWildcard, program, host)); + return flatMap(patterns, pattern => getModulesForPathsPattern(remainingFragment, packageDirectory, pattern, extensionOptions, isExportsWildcard, host)); function justPathMappingName(name: string, kind: ScriptElementKind.directory | ScriptElementKind.scriptElement): readonly NameAndKind[] { return startsWith(name, fragment) ? [{ name: removeTrailingDirectorySeparator(name), kind, extension: undefined }] : emptyArray; @@ -1076,7 +1067,6 @@ function getModulesForPathsPattern( pattern: string, extensionOptions: ExtensionOptions, isExportsWildcard: boolean, - program: Program, host: LanguageServiceHost, ): readonly NameAndKind[] | undefined { if (!host.readDirectory) { @@ -1125,7 +1115,7 @@ function getModulesForPathsPattern( if (containsSlash(trimmedWithPattern)) { return directoryResult(getPathComponents(removeLeadingDirectorySeparator(trimmedWithPattern))[1]); } - const { name, extension } = getFilenameWithExtensionOption(trimmedWithPattern, program, extensionOptions, isExportsWildcard); + const { name, extension } = getFilenameWithExtensionOption(trimmedWithPattern, host.getCompilationSettings(), extensionOptions, isExportsWildcard); return nameAndKind(name, ScriptElementKind.scriptElement, extension); } }); @@ -1169,8 +1159,7 @@ function getAmbientModuleCompletions(fragment: string, fragmentDirectory: string return nonRelativeModuleNames; } -function getTripleSlashReferenceCompletion(sourceFile: SourceFile, position: number, program: Program, host: LanguageServiceHost): readonly PathCompletion[] | undefined { - const compilerOptions = program.getCompilerOptions(); +function getTripleSlashReferenceCompletion(sourceFile: SourceFile, position: number, compilerOptions: CompilerOptions, host: LanguageServiceHost): readonly PathCompletion[] | undefined { const token = getTokenAtPosition(sourceFile, position); const commentRanges = getLeadingCommentRanges(sourceFile.text, token.pos); const range = commentRanges && find(commentRanges, commentRange => position >= commentRange.pos && position <= commentRange.end); @@ -1185,14 +1174,13 @@ function getTripleSlashReferenceCompletion(sourceFile: SourceFile, position: num const [, prefix, kind, toComplete] = match; const scriptPath = getDirectoryPath(sourceFile.path); - const names = kind === "path" ? getCompletionEntriesForDirectoryFragment(toComplete, scriptPath, getExtensionOptions(compilerOptions, ReferenceKind.Filename, sourceFile), program, host, /*moduleSpecifierIsRelative*/ true, sourceFile.path) - : kind === "types" ? getCompletionEntriesFromTypings(host, program, scriptPath, getFragmentDirectory(toComplete), getExtensionOptions(compilerOptions, ReferenceKind.ModuleSpecifier, sourceFile)) + const names = kind === "path" ? getCompletionEntriesForDirectoryFragment(toComplete, scriptPath, getExtensionOptions(compilerOptions, ReferenceKind.Filename, sourceFile), host, /*moduleSpecifierIsRelative*/ true, sourceFile.path) + : kind === "types" ? getCompletionEntriesFromTypings(host, compilerOptions, scriptPath, getFragmentDirectory(toComplete), getExtensionOptions(compilerOptions, ReferenceKind.ModuleSpecifier, sourceFile)) : Debug.fail(); return addReplacementSpans(toComplete, range.pos + prefix.length, arrayFrom(names.values())); } -function getCompletionEntriesFromTypings(host: LanguageServiceHost, program: Program, scriptPath: string, fragmentDirectory: string | undefined, extensionOptions: ExtensionOptions, result = createNameAndKindSet()): NameAndKindSet { - const options = program.getCompilerOptions(); +function getCompletionEntriesFromTypings(host: LanguageServiceHost, options: CompilerOptions, scriptPath: string, fragmentDirectory: string | undefined, extensionOptions: ExtensionOptions, result = createNameAndKindSet()): NameAndKindSet { // Check for typings specified in compiler options const seen = new Map(); @@ -1227,7 +1215,7 @@ function getCompletionEntriesFromTypings(host: LanguageServiceHost, program: Pro const baseDirectory = combinePaths(directory, typeDirectoryName); const remainingFragment = tryRemoveDirectoryPrefix(fragmentDirectory, packageName, hostGetCanonicalFileName(host)); if (remainingFragment !== undefined) { - getCompletionEntriesForDirectoryFragment(remainingFragment, baseDirectory, extensionOptions, program, host, /*moduleSpecifierIsRelative*/ false, /*exclude*/ undefined, result); + getCompletionEntriesForDirectoryFragment(remainingFragment, baseDirectory, extensionOptions, host, /*moduleSpecifierIsRelative*/ false, /*exclude*/ undefined, result); } } } diff --git a/src/services/suggestionDiagnostics.ts b/src/services/suggestionDiagnostics.ts index a5daf3e6666f2..b5daa7052b844 100644 --- a/src/services/suggestionDiagnostics.ts +++ b/src/services/suggestionDiagnostics.ts @@ -66,7 +66,7 @@ export function computeSuggestionDiagnostics(sourceFile: SourceFile, program: Pr program.getSemanticDiagnostics(sourceFile, cancellationToken); const diags: DiagnosticWithLocation[] = []; const checker = program.getTypeChecker(); - const isCommonJSFile = program.getImpliedNodeFormatForEmit(sourceFile) === ModuleKind.CommonJS || fileExtensionIsOneOf(sourceFile.fileName, [Extension.Cts, Extension.Cjs]); + const isCommonJSFile = sourceFile.impliedNodeFormat === ModuleKind.CommonJS || fileExtensionIsOneOf(sourceFile.fileName, [Extension.Cts, Extension.Cjs]); if ( !isCommonJSFile && diff --git a/src/services/utilities.ts b/src/services/utilities.ts index 8bbe992fa7f9a..abfe9f908fcba 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -97,7 +97,6 @@ import { getEmitModuleKind, getEmitScriptTarget, getExternalModuleImportEqualsDeclarationExpression, - getImpliedNodeFormatForEmitWorker, getImpliedNodeFormatForFile, getImpliedNodeFormatForFileWorker, getIndentString, @@ -2493,8 +2492,6 @@ export function createModuleSpecifierResolutionHost(program: Program, host: Lang getNearestAncestorDirectoryWithPackageJson: maybeBind(host, host.getNearestAncestorDirectoryWithPackageJson), getFileIncludeReasons: () => program.getFileIncludeReasons(), getCommonSourceDirectory: () => program.getCommonSourceDirectory(), - getDefaultResolutionModeForFile: file => program.getDefaultResolutionModeForFile(file), - getModeForResolutionAtIndex: (file, index) => program.getModeForResolutionAtIndex(file, index), }; } @@ -4304,13 +4301,11 @@ export function fileShouldUseJavaScriptRequire(file: SourceFile | string, progra if (!hasJSFileExtension(fileName)) { return false; } - const compilerOptions = typeof file === "string" ? program.getCompilerOptions() : program.getCompilerOptionsForFile(file); + const compilerOptions = program.getCompilerOptions(); const moduleKind = getEmitModuleKind(compilerOptions); - const sourceFileLike = typeof file === "string" ? { - fileName: file, - impliedNodeFormat: getImpliedNodeFormatForFile(toPath(file, host.getCurrentDirectory(), hostGetCanonicalFileName(host)), program.getPackageJsonInfoCache?.(), host, compilerOptions), - } : file; - const impliedNodeFormat = getImpliedNodeFormatForEmitWorker(sourceFileLike, compilerOptions); + const impliedNodeFormat = typeof file === "string" + ? getImpliedNodeFormatForFile(toPath(file, host.getCurrentDirectory(), hostGetCanonicalFileName(host)), program.getPackageJsonInfoCache?.(), host, compilerOptions) + : file.impliedNodeFormat; if (impliedNodeFormat === ModuleKind.ESNext) { return false; diff --git a/src/testRunner/unittests/tsc/projectReferences.ts b/src/testRunner/unittests/tsc/projectReferences.ts index d1dda68e0784c..1b446a995747c 100644 --- a/src/testRunner/unittests/tsc/projectReferences.ts +++ b/src/testRunner/unittests/tsc/projectReferences.ts @@ -44,51 +44,6 @@ describe("unittests:: tsc:: projectReferences::", () => { commandLineArgs: ["--p", "src/project"], }); - verifyTsc({ - scenario: "projectReferences", - subScenario: "default import interop uses referenced project settings", - fs: () => - loadProjectFromFiles({ - "/node_modules/ambiguous-package/package.json": `{ "name": "ambiguous-package" }`, - "/node_modules/ambiguous-package/index.d.ts": "export declare const ambiguous: number;", - "/node_modules/esm-package/package.json": `{ "name": "esm-package", "type": "module" }`, - "/node_modules/esm-package/index.d.ts": "export declare const esm: number;", - "/lib/tsconfig.json": jsonToReadableText({ - compilerOptions: { - composite: true, - declaration: true, - rootDir: "src", - outDir: "dist", - module: "esnext", - moduleResolution: "bundler", - }, - include: ["src"], - }), - "/lib/src/a.ts": "export const a = 0;", - "/lib/dist/a.d.ts": "export declare const a = 0;", - "/app/tsconfig.json": jsonToReadableText({ - compilerOptions: { - module: "esnext", - moduleResolution: "bundler", - rootDir: "src", - outDir: "dist", - }, - include: ["src"], - references: [ - { path: "../lib" }, - ], - }), - "/app/src/local.ts": "export const local = 0;", - "/app/src/index.ts": ` - import local from "./local"; // Error - import esm from "esm-package"; // Error - import referencedSource from "../../lib/src/a"; // Error - import referencedDeclaration from "../../lib/dist/a"; // Error - import ambiguous from "ambiguous-package"; // Ok`, - }), - commandLineArgs: ["--p", "app", "--pretty", "false"], - }); - verifyTsc({ scenario: "projectReferences", subScenario: "referencing ambient const enum from referenced project with preserveConstEnums", diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 1752b0ef02e32..f12886f10b696 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -6015,67 +6015,19 @@ declare namespace ts { isSourceFileFromExternalLibrary(file: SourceFile): boolean; isSourceFileDefaultLibrary(file: SourceFile): boolean; /** - * Calculates the final resolution mode for a given module reference node. This function only returns a result when module resolution - * settings allow differing resolution between ESM imports and CJS requires, or when a mode is explicitly provided via import attributes, - * which cause an `import` or `require` condition to be used during resolution regardless of module resolution settings. In absence of - * overriding attributes, and in modes that support differing resolution, the result indicates the syntax the usage would emit to JavaScript. - * Some examples: - * - * ```ts - * // tsc foo.mts --module nodenext - * import {} from "mod"; - * // Result: ESNext - the import emits as ESM due to `impliedNodeFormat` set by .mts file extension - * - * // tsc foo.cts --module nodenext - * import {} from "mod"; - * // Result: CommonJS - the import emits as CJS due to `impliedNodeFormat` set by .cts file extension - * - * // tsc foo.ts --module preserve --moduleResolution bundler - * import {} from "mod"; - * // Result: ESNext - the import emits as ESM due to `--module preserve` and `--moduleResolution bundler` - * // supports conditional imports/exports - * - * // tsc foo.ts --module preserve --moduleResolution node10 - * import {} from "mod"; - * // Result: undefined - the import emits as ESM due to `--module preserve`, but `--moduleResolution node10` - * // does not support conditional imports/exports - * - * // tsc foo.ts --module commonjs --moduleResolution node10 - * import type {} from "mod" with { "resolution-mode": "import" }; - * // Result: ESNext - conditional imports/exports always supported with "resolution-mode" attribute - * ``` + * Calculates the final resolution mode for a given module reference node. This is the resolution mode explicitly provided via import + * attributes, if present, or the syntax the usage would have if emitted to JavaScript. In `--module node16` or `nodenext`, this may + * depend on the file's `impliedNodeFormat`. In `--module preserve`, it depends only on the input syntax of the reference. In other + * `module` modes, when overriding import attributes are not provided, this function returns `undefined`, as the result would have no + * impact on module resolution, emit, or type checking. */ getModeForUsageLocation(file: SourceFile, usage: StringLiteralLike): ResolutionMode; /** - * Calculates the final resolution mode for an import at some index within a file's `imports` list. This function only returns a result - * when module resolution settings allow differing resolution between ESM imports and CJS requires, or when a mode is explicitly provided - * via import attributes, which cause an `import` or `require` condition to be used during resolution regardless of module resolution - * settings. In absence of overriding attributes, and in modes that support differing resolution, the result indicates the syntax the - * usage would emit to JavaScript. Some examples: - * - * ```ts - * // tsc foo.mts --module nodenext - * import {} from "mod"; - * // Result: ESNext - the import emits as ESM due to `impliedNodeFormat` set by .mts file extension - * - * // tsc foo.cts --module nodenext - * import {} from "mod"; - * // Result: CommonJS - the import emits as CJS due to `impliedNodeFormat` set by .cts file extension - * - * // tsc foo.ts --module preserve --moduleResolution bundler - * import {} from "mod"; - * // Result: ESNext - the import emits as ESM due to `--module preserve` and `--moduleResolution bundler` - * // supports conditional imports/exports - * - * // tsc foo.ts --module preserve --moduleResolution node10 - * import {} from "mod"; - * // Result: undefined - the import emits as ESM due to `--module preserve`, but `--moduleResolution node10` - * // does not support conditional imports/exports - * - * // tsc foo.ts --module commonjs --moduleResolution node10 - * import type {} from "mod" with { "resolution-mode": "import" }; - * // Result: ESNext - conditional imports/exports always supported with "resolution-mode" attribute - * ``` + * Calculates the final resolution mode for an import at some index within a file's `imports` list. This is the resolution mode + * explicitly provided via import attributes, if present, or the syntax the usage would have if emitted to JavaScript. In + * `--module node16` or `nodenext`, this may depend on the file's `impliedNodeFormat`. In `--module preserve`, it depends only on the + * input syntax of the reference. In other `module` modes, when overriding import attributes are not provided, this function returns + * `undefined`, as the result would have no impact on module resolution, emit, or type checking. */ getModeForResolutionAtIndex(file: SourceFile, index: number): ResolutionMode; getProjectReferences(): readonly ProjectReference[] | undefined; @@ -9429,43 +9381,24 @@ declare namespace ts { function getModeForResolutionAtIndex(file: SourceFile, index: number, compilerOptions: CompilerOptions): ResolutionMode; /** * Use `program.getModeForUsageLocation`, which retrieves the correct `compilerOptions`, instead of this function whenever possible. - * Calculates the final resolution mode for a given module reference node. This function only returns a result when module resolution - * settings allow differing resolution between ESM imports and CJS requires, or when a mode is explicitly provided via import attributes, - * which cause an `import` or `require` condition to be used during resolution regardless of module resolution settings. In absence of - * overriding attributes, and in modes that support differing resolution, the result indicates the syntax the usage would emit to JavaScript. - * Some examples: - * - * ```ts - * // tsc foo.mts --module nodenext - * import {} from "mod"; - * // Result: ESNext - the import emits as ESM due to `impliedNodeFormat` set by .mts file extension - * - * // tsc foo.cts --module nodenext - * import {} from "mod"; - * // Result: CommonJS - the import emits as CJS due to `impliedNodeFormat` set by .cts file extension - * - * // tsc foo.ts --module preserve --moduleResolution bundler - * import {} from "mod"; - * // Result: ESNext - the import emits as ESM due to `--module preserve` and `--moduleResolution bundler` - * // supports conditional imports/exports - * - * // tsc foo.ts --module preserve --moduleResolution node10 - * import {} from "mod"; - * // Result: undefined - the import emits as ESM due to `--module preserve`, but `--moduleResolution node10` - * // does not support conditional imports/exports - * - * // tsc foo.ts --module commonjs --moduleResolution node10 - * import type {} from "mod" with { "resolution-mode": "import" }; - * // Result: ESNext - conditional imports/exports always supported with "resolution-mode" attribute - * ``` - * + * Calculates the final resolution mode for a given module reference node. This is the resolution mode explicitly provided via import + * attributes, if present, or the syntax the usage would have if emitted to JavaScript. In `--module node16` or `nodenext`, this may + * depend on the file's `impliedNodeFormat`. In `--module preserve`, it depends only on the input syntax of the reference. In other + * `module` modes, when overriding import attributes are not provided, this function returns `undefined`, as the result would have no + * impact on module resolution, emit, or type checking. * @param file The file the import or import-like reference is contained within * @param usage The module reference string * @param compilerOptions The compiler options for the program that owns the file. If the file belongs to a referenced project, the compiler options * should be the options of the referenced project, not the referencing project. * @returns The final resolution mode of the import */ - function getModeForUsageLocation(file: SourceFile, usage: StringLiteralLike, compilerOptions: CompilerOptions): ResolutionMode; + function getModeForUsageLocation( + file: { + impliedNodeFormat?: ResolutionMode; + }, + usage: StringLiteralLike, + compilerOptions: CompilerOptions, + ): ModuleKind.CommonJS | ModuleKind.ESNext | undefined; function getConfigFileParsingDiagnostics(configFileParseResult: ParsedCommandLine): readonly Diagnostic[]; /** * A function for determining if a given file is esm or cjs format, assuming modern node module resolution rules, as configured by the diff --git a/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=bundler).errors.txt b/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=bundler).errors.txt new file mode 100644 index 0000000000000..e66a5c3ddddfc --- /dev/null +++ b/tests/baselines/reference/conditionalExportsResolutionFallback(moduleresolution=bundler).errors.txt @@ -0,0 +1,29 @@ +error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. + + +!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. +==== /node_modules/dep/package.json (0 errors) ==== + { + "name": "dep", + "version": "1.0.0", + "exports": { + ".": { + "import": "./dist/index.mjs", + "require": "./dist/index.js", + "types": "./dist/index.d.ts", + } + } + } + +==== /node_modules/dep/dist/index.d.ts (0 errors) ==== + export {}; + +==== /node_modules/dep/dist/index.mjs (0 errors) ==== + export {}; + +==== /index.mts (0 errors) ==== + import {} from "dep"; + // Should be an untyped resolution to dep/dist/index.mjs, + // but the first search is only for TS files, and when + // there's no dist/index.d.mts, it continues looking for + // matching conditions and resolves via `types`. \ No newline at end of file diff --git a/tests/baselines/reference/customConditions(resolvepackagejsonexports=false).errors.txt b/tests/baselines/reference/customConditions(resolvepackagejsonexports=false).errors.txt new file mode 100644 index 0000000000000..9e462a35eaf70 --- /dev/null +++ b/tests/baselines/reference/customConditions(resolvepackagejsonexports=false).errors.txt @@ -0,0 +1,31 @@ +error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. + + +!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. +==== /node_modules/lodash/package.json (0 errors) ==== + { + "name": "lodash", + "version": "1.0.0", + "main": "index.js", + "exports": { + "browser": "./browser.js", + "webpack": "./webpack.js", + "default": "./index.js" + } + } + +==== /node_modules/lodash/index.d.ts (0 errors) ==== + declare const _: "index"; + export = _; + +==== /node_modules/lodash/browser.d.ts (0 errors) ==== + declare const _: "browser"; + export default _; + +==== /node_modules/lodash/webpack.d.ts (0 errors) ==== + declare const _: "webpack"; + export = _; + +==== /index.ts (0 errors) ==== + import _ from "lodash"; + \ No newline at end of file diff --git a/tests/baselines/reference/customConditions(resolvepackagejsonexports=false).js b/tests/baselines/reference/customConditions(resolvepackagejsonexports=false).js index 2d484ff74b5d3..1ac29a4a032d3 100644 --- a/tests/baselines/reference/customConditions(resolvepackagejsonexports=false).js +++ b/tests/baselines/reference/customConditions(resolvepackagejsonexports=false).js @@ -29,3 +29,5 @@ import _ from "lodash"; //// [index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/customConditions(resolvepackagejsonexports=true).errors.txt b/tests/baselines/reference/customConditions(resolvepackagejsonexports=true).errors.txt new file mode 100644 index 0000000000000..9e462a35eaf70 --- /dev/null +++ b/tests/baselines/reference/customConditions(resolvepackagejsonexports=true).errors.txt @@ -0,0 +1,31 @@ +error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. + + +!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. +==== /node_modules/lodash/package.json (0 errors) ==== + { + "name": "lodash", + "version": "1.0.0", + "main": "index.js", + "exports": { + "browser": "./browser.js", + "webpack": "./webpack.js", + "default": "./index.js" + } + } + +==== /node_modules/lodash/index.d.ts (0 errors) ==== + declare const _: "index"; + export = _; + +==== /node_modules/lodash/browser.d.ts (0 errors) ==== + declare const _: "browser"; + export default _; + +==== /node_modules/lodash/webpack.d.ts (0 errors) ==== + declare const _: "webpack"; + export = _; + +==== /index.ts (0 errors) ==== + import _ from "lodash"; + \ No newline at end of file diff --git a/tests/baselines/reference/customConditions(resolvepackagejsonexports=true).js b/tests/baselines/reference/customConditions(resolvepackagejsonexports=true).js index 2d484ff74b5d3..1ac29a4a032d3 100644 --- a/tests/baselines/reference/customConditions(resolvepackagejsonexports=true).js +++ b/tests/baselines/reference/customConditions(resolvepackagejsonexports=true).js @@ -29,3 +29,5 @@ import _ from "lodash"; //// [index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/emitHelpersWithLocalCollisions(module=node16).js b/tests/baselines/reference/emitHelpersWithLocalCollisions(module=node16).js index 47204b7a76f30..2bf5641f43b50 100644 --- a/tests/baselines/reference/emitHelpersWithLocalCollisions(module=node16).js +++ b/tests/baselines/reference/emitHelpersWithLocalCollisions(module=node16).js @@ -10,17 +10,20 @@ const y = { ...o }; //// [a.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.A = void 0; let A = class A { }; -A = __decorate([ +exports.A = A; +exports.A = A = __decorate([ dec ], A); -export { A }; const o = { a: 1 }; const y = Object.assign({}, o); diff --git a/tests/baselines/reference/emitHelpersWithLocalCollisions(module=nodenext).js b/tests/baselines/reference/emitHelpersWithLocalCollisions(module=nodenext).js index 47204b7a76f30..2bf5641f43b50 100644 --- a/tests/baselines/reference/emitHelpersWithLocalCollisions(module=nodenext).js +++ b/tests/baselines/reference/emitHelpersWithLocalCollisions(module=nodenext).js @@ -10,17 +10,20 @@ const y = { ...o }; //// [a.js] +"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.A = void 0; let A = class A { }; -A = __decorate([ +exports.A = A; +exports.A = A = __decorate([ dec ], A); -export { A }; const o = { a: 1 }; const y = Object.assign({}, o); diff --git a/tests/baselines/reference/esmNoSynthesizedDefault(module=esnext).js b/tests/baselines/reference/esmNoSynthesizedDefault(module=esnext).js deleted file mode 100644 index 0c1812fa06439..0000000000000 --- a/tests/baselines/reference/esmNoSynthesizedDefault(module=esnext).js +++ /dev/null @@ -1,25 +0,0 @@ -//// [tests/cases/compiler/esmNoSynthesizedDefault.ts] //// - -//// [package.json] -{ "type": "module" } - -//// [index.d.ts] -export function toString(): string; - -//// [index.ts] -import mdast, { toString } from 'mdast-util-to-string'; -mdast; -mdast.toString(); - -const mdast2 = await import('mdast-util-to-string'); -mdast2.toString(); -mdast2.default; - - -//// [index.js] -import mdast from 'mdast-util-to-string'; -mdast; -mdast.toString(); -const mdast2 = await import('mdast-util-to-string'); -mdast2.toString(); -mdast2.default; diff --git a/tests/baselines/reference/esmNoSynthesizedDefault(module=preserve).js b/tests/baselines/reference/esmNoSynthesizedDefault(module=preserve).js deleted file mode 100644 index 0c1812fa06439..0000000000000 --- a/tests/baselines/reference/esmNoSynthesizedDefault(module=preserve).js +++ /dev/null @@ -1,25 +0,0 @@ -//// [tests/cases/compiler/esmNoSynthesizedDefault.ts] //// - -//// [package.json] -{ "type": "module" } - -//// [index.d.ts] -export function toString(): string; - -//// [index.ts] -import mdast, { toString } from 'mdast-util-to-string'; -mdast; -mdast.toString(); - -const mdast2 = await import('mdast-util-to-string'); -mdast2.toString(); -mdast2.default; - - -//// [index.js] -import mdast from 'mdast-util-to-string'; -mdast; -mdast.toString(); -const mdast2 = await import('mdast-util-to-string'); -mdast2.toString(); -mdast2.default; diff --git a/tests/baselines/reference/impliedNodeFormatEmit1(module=amd).errors.txt b/tests/baselines/reference/impliedNodeFormatEmit1(module=amd).errors.txt deleted file mode 100644 index b837dc175ce01..0000000000000 --- a/tests/baselines/reference/impliedNodeFormatEmit1(module=amd).errors.txt +++ /dev/null @@ -1,37 +0,0 @@ -error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. - - -!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. -==== /a.ts (0 errors) ==== - export const _ = 0; - -==== /b.mts (0 errors) ==== - export const _ = 0; - -==== /c.cts (0 errors) ==== - export const _ = 0; - -==== /d.js (0 errors) ==== - export const _ = 0; - -==== /e.mjs (0 errors) ==== - export const _ = 0; - -==== /f.mjs (0 errors) ==== - export const _ = 0; - -==== /g.ts (0 errors) ==== - import {} from "./a"; - import a = require("./a"); - -==== /h.mts (0 errors) ==== - import {} from "./a"; - import a = require("./a"); - -==== /i.cts (0 errors) ==== - import {} from "./a"; - import a = require("./a"); - -==== /dummy.ts (0 errors) ==== - export {}; - \ No newline at end of file diff --git a/tests/baselines/reference/impliedNodeFormatEmit1(module=amd).js b/tests/baselines/reference/impliedNodeFormatEmit1(module=amd).js deleted file mode 100644 index 8cdc5ac2b5358..0000000000000 --- a/tests/baselines/reference/impliedNodeFormatEmit1(module=amd).js +++ /dev/null @@ -1,98 +0,0 @@ -//// [tests/cases/compiler/impliedNodeFormatEmit1.ts] //// - -//// [a.ts] -export const _ = 0; - -//// [b.mts] -export const _ = 0; - -//// [c.cts] -export const _ = 0; - -//// [d.js] -export const _ = 0; - -//// [e.mjs] -export const _ = 0; - -//// [f.mjs] -export const _ = 0; - -//// [g.ts] -import {} from "./a"; -import a = require("./a"); - -//// [h.mts] -import {} from "./a"; -import a = require("./a"); - -//// [i.cts] -import {} from "./a"; -import a = require("./a"); - -//// [dummy.ts] -export {}; - - -//// [a.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports._ = void 0; - exports._ = 0; -}); -//// [b.mjs] -define(["require", "exports"], function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports._ = void 0; - exports._ = 0; -}); -//// [c.cjs] -define(["require", "exports"], function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports._ = void 0; - exports._ = 0; -}); -//// [d.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports._ = void 0; - exports._ = 0; -}); -//// [e.mjs] -define(["require", "exports"], function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports._ = void 0; - exports._ = 0; -}); -//// [f.mjs] -define(["require", "exports"], function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports._ = void 0; - exports._ = 0; -}); -//// [g.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); -}); -//// [h.mjs] -define(["require", "exports"], function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); -}); -//// [i.cjs] -define(["require", "exports"], function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); -}); -//// [dummy.js] -define(["require", "exports"], function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); -}); diff --git a/tests/baselines/reference/impliedNodeFormatEmit1(module=commonjs).errors.txt b/tests/baselines/reference/impliedNodeFormatEmit1(module=commonjs).errors.txt deleted file mode 100644 index b837dc175ce01..0000000000000 --- a/tests/baselines/reference/impliedNodeFormatEmit1(module=commonjs).errors.txt +++ /dev/null @@ -1,37 +0,0 @@ -error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. - - -!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. -==== /a.ts (0 errors) ==== - export const _ = 0; - -==== /b.mts (0 errors) ==== - export const _ = 0; - -==== /c.cts (0 errors) ==== - export const _ = 0; - -==== /d.js (0 errors) ==== - export const _ = 0; - -==== /e.mjs (0 errors) ==== - export const _ = 0; - -==== /f.mjs (0 errors) ==== - export const _ = 0; - -==== /g.ts (0 errors) ==== - import {} from "./a"; - import a = require("./a"); - -==== /h.mts (0 errors) ==== - import {} from "./a"; - import a = require("./a"); - -==== /i.cts (0 errors) ==== - import {} from "./a"; - import a = require("./a"); - -==== /dummy.ts (0 errors) ==== - export {}; - \ No newline at end of file diff --git a/tests/baselines/reference/impliedNodeFormatEmit1(module=esnext).errors.txt b/tests/baselines/reference/impliedNodeFormatEmit1(module=esnext).errors.txt deleted file mode 100644 index 08c39ac0e9b36..0000000000000 --- a/tests/baselines/reference/impliedNodeFormatEmit1(module=esnext).errors.txt +++ /dev/null @@ -1,44 +0,0 @@ -/g.ts(2,1): error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. -/h.mts(2,1): error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. -/i.cts(2,1): error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. - - -==== /a.ts (0 errors) ==== - export const _ = 0; - -==== /b.mts (0 errors) ==== - export const _ = 0; - -==== /c.cts (0 errors) ==== - export const _ = 0; - -==== /d.js (0 errors) ==== - export const _ = 0; - -==== /e.mjs (0 errors) ==== - export const _ = 0; - -==== /f.mjs (0 errors) ==== - export const _ = 0; - -==== /g.ts (1 errors) ==== - import {} from "./a"; - import a = require("./a"); - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. - -==== /h.mts (1 errors) ==== - import {} from "./a"; - import a = require("./a"); - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. - -==== /i.cts (1 errors) ==== - import {} from "./a"; - import a = require("./a"); - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. - -==== /dummy.ts (0 errors) ==== - export {}; - \ No newline at end of file diff --git a/tests/baselines/reference/impliedNodeFormatEmit1(module=preserve).js b/tests/baselines/reference/impliedNodeFormatEmit1(module=preserve).js deleted file mode 100644 index 067de7888d3e7..0000000000000 --- a/tests/baselines/reference/impliedNodeFormatEmit1(module=preserve).js +++ /dev/null @@ -1,52 +0,0 @@ -//// [tests/cases/compiler/impliedNodeFormatEmit1.ts] //// - -//// [a.ts] -export const _ = 0; - -//// [b.mts] -export const _ = 0; - -//// [c.cts] -export const _ = 0; - -//// [d.js] -export const _ = 0; - -//// [e.mjs] -export const _ = 0; - -//// [f.mjs] -export const _ = 0; - -//// [g.ts] -import {} from "./a"; -import a = require("./a"); - -//// [h.mts] -import {} from "./a"; -import a = require("./a"); - -//// [i.cts] -import {} from "./a"; -import a = require("./a"); - -//// [dummy.ts] -export {}; - - -//// [a.js] -export var _ = 0; -//// [b.mjs] -export var _ = 0; -//// [c.cjs] -export var _ = 0; -//// [d.js] -export var _ = 0; -//// [e.mjs] -export var _ = 0; -//// [f.mjs] -export var _ = 0; -//// [g.js] -//// [h.mjs] -//// [i.cjs] -//// [dummy.js] diff --git a/tests/baselines/reference/impliedNodeFormatEmit1(module=system).errors.txt b/tests/baselines/reference/impliedNodeFormatEmit1(module=system).errors.txt deleted file mode 100644 index 0482da58d7b5d..0000000000000 --- a/tests/baselines/reference/impliedNodeFormatEmit1(module=system).errors.txt +++ /dev/null @@ -1,39 +0,0 @@ -error TS5071: Option '--resolveJsonModule' cannot be specified when 'module' is set to 'none', 'system', or 'umd'. -error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. - - -!!! error TS5071: Option '--resolveJsonModule' cannot be specified when 'module' is set to 'none', 'system', or 'umd'. -!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. -==== /a.ts (0 errors) ==== - export const _ = 0; - -==== /b.mts (0 errors) ==== - export const _ = 0; - -==== /c.cts (0 errors) ==== - export const _ = 0; - -==== /d.js (0 errors) ==== - export const _ = 0; - -==== /e.mjs (0 errors) ==== - export const _ = 0; - -==== /f.mjs (0 errors) ==== - export const _ = 0; - -==== /g.ts (0 errors) ==== - import {} from "./a"; - import a = require("./a"); - -==== /h.mts (0 errors) ==== - import {} from "./a"; - import a = require("./a"); - -==== /i.cts (0 errors) ==== - import {} from "./a"; - import a = require("./a"); - -==== /dummy.ts (0 errors) ==== - export {}; - \ No newline at end of file diff --git a/tests/baselines/reference/impliedNodeFormatEmit1(module=system).js b/tests/baselines/reference/impliedNodeFormatEmit1(module=system).js deleted file mode 100644 index f991a4eac017d..0000000000000 --- a/tests/baselines/reference/impliedNodeFormatEmit1(module=system).js +++ /dev/null @@ -1,148 +0,0 @@ -//// [tests/cases/compiler/impliedNodeFormatEmit1.ts] //// - -//// [a.ts] -export const _ = 0; - -//// [b.mts] -export const _ = 0; - -//// [c.cts] -export const _ = 0; - -//// [d.js] -export const _ = 0; - -//// [e.mjs] -export const _ = 0; - -//// [f.mjs] -export const _ = 0; - -//// [g.ts] -import {} from "./a"; -import a = require("./a"); - -//// [h.mts] -import {} from "./a"; -import a = require("./a"); - -//// [i.cts] -import {} from "./a"; -import a = require("./a"); - -//// [dummy.ts] -export {}; - - -//// [a.js] -System.register([], function (exports_1, context_1) { - "use strict"; - var _; - var __moduleName = context_1 && context_1.id; - return { - setters: [], - execute: function () { - exports_1("_", _ = 0); - } - }; -}); -//// [b.mjs] -System.register([], function (exports_1, context_1) { - "use strict"; - var _; - var __moduleName = context_1 && context_1.id; - return { - setters: [], - execute: function () { - exports_1("_", _ = 0); - } - }; -}); -//// [c.cjs] -System.register([], function (exports_1, context_1) { - "use strict"; - var _; - var __moduleName = context_1 && context_1.id; - return { - setters: [], - execute: function () { - exports_1("_", _ = 0); - } - }; -}); -//// [d.js] -System.register([], function (exports_1, context_1) { - "use strict"; - var _; - var __moduleName = context_1 && context_1.id; - return { - setters: [], - execute: function () { - exports_1("_", _ = 0); - } - }; -}); -//// [e.mjs] -System.register([], function (exports_1, context_1) { - "use strict"; - var _; - var __moduleName = context_1 && context_1.id; - return { - setters: [], - execute: function () { - exports_1("_", _ = 0); - } - }; -}); -//// [f.mjs] -System.register([], function (exports_1, context_1) { - "use strict"; - var _; - var __moduleName = context_1 && context_1.id; - return { - setters: [], - execute: function () { - exports_1("_", _ = 0); - } - }; -}); -//// [g.js] -System.register([], function (exports_1, context_1) { - "use strict"; - var __moduleName = context_1 && context_1.id; - return { - setters: [], - execute: function () { - } - }; -}); -//// [h.mjs] -System.register([], function (exports_1, context_1) { - "use strict"; - var __moduleName = context_1 && context_1.id; - return { - setters: [], - execute: function () { - } - }; -}); -//// [i.cjs] -System.register([], function (exports_1, context_1) { - "use strict"; - var __moduleName = context_1 && context_1.id; - return { - setters: [], - execute: function () { - } - }; -}); -//// [dummy.js] -System.register([], function (exports_1, context_1) { - "use strict"; - var __moduleName = context_1 && context_1.id; - return { - setters: [], - execute: function () { - } - }; -}); diff --git a/tests/baselines/reference/impliedNodeFormatEmit1(module=umd).errors.txt b/tests/baselines/reference/impliedNodeFormatEmit1(module=umd).errors.txt deleted file mode 100644 index 0482da58d7b5d..0000000000000 --- a/tests/baselines/reference/impliedNodeFormatEmit1(module=umd).errors.txt +++ /dev/null @@ -1,39 +0,0 @@ -error TS5071: Option '--resolveJsonModule' cannot be specified when 'module' is set to 'none', 'system', or 'umd'. -error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. - - -!!! error TS5071: Option '--resolveJsonModule' cannot be specified when 'module' is set to 'none', 'system', or 'umd'. -!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. -==== /a.ts (0 errors) ==== - export const _ = 0; - -==== /b.mts (0 errors) ==== - export const _ = 0; - -==== /c.cts (0 errors) ==== - export const _ = 0; - -==== /d.js (0 errors) ==== - export const _ = 0; - -==== /e.mjs (0 errors) ==== - export const _ = 0; - -==== /f.mjs (0 errors) ==== - export const _ = 0; - -==== /g.ts (0 errors) ==== - import {} from "./a"; - import a = require("./a"); - -==== /h.mts (0 errors) ==== - import {} from "./a"; - import a = require("./a"); - -==== /i.cts (0 errors) ==== - import {} from "./a"; - import a = require("./a"); - -==== /dummy.ts (0 errors) ==== - export {}; - \ No newline at end of file diff --git a/tests/baselines/reference/impliedNodeFormatEmit1(module=umd).js b/tests/baselines/reference/impliedNodeFormatEmit1(module=umd).js deleted file mode 100644 index 9fff0d4cd16d4..0000000000000 --- a/tests/baselines/reference/impliedNodeFormatEmit1(module=umd).js +++ /dev/null @@ -1,178 +0,0 @@ -//// [tests/cases/compiler/impliedNodeFormatEmit1.ts] //// - -//// [a.ts] -export const _ = 0; - -//// [b.mts] -export const _ = 0; - -//// [c.cts] -export const _ = 0; - -//// [d.js] -export const _ = 0; - -//// [e.mjs] -export const _ = 0; - -//// [f.mjs] -export const _ = 0; - -//// [g.ts] -import {} from "./a"; -import a = require("./a"); - -//// [h.mts] -import {} from "./a"; -import a = require("./a"); - -//// [i.cts] -import {} from "./a"; -import a = require("./a"); - -//// [dummy.ts] -export {}; - - -//// [a.js] -(function (factory) { - if (typeof module === "object" && typeof module.exports === "object") { - var v = factory(require, exports); - if (v !== undefined) module.exports = v; - } - else if (typeof define === "function" && define.amd) { - define(["require", "exports"], factory); - } -})(function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports._ = void 0; - exports._ = 0; -}); -//// [b.mjs] -(function (factory) { - if (typeof module === "object" && typeof module.exports === "object") { - var v = factory(require, exports); - if (v !== undefined) module.exports = v; - } - else if (typeof define === "function" && define.amd) { - define(["require", "exports"], factory); - } -})(function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports._ = void 0; - exports._ = 0; -}); -//// [c.cjs] -(function (factory) { - if (typeof module === "object" && typeof module.exports === "object") { - var v = factory(require, exports); - if (v !== undefined) module.exports = v; - } - else if (typeof define === "function" && define.amd) { - define(["require", "exports"], factory); - } -})(function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports._ = void 0; - exports._ = 0; -}); -//// [d.js] -(function (factory) { - if (typeof module === "object" && typeof module.exports === "object") { - var v = factory(require, exports); - if (v !== undefined) module.exports = v; - } - else if (typeof define === "function" && define.amd) { - define(["require", "exports"], factory); - } -})(function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports._ = void 0; - exports._ = 0; -}); -//// [e.mjs] -(function (factory) { - if (typeof module === "object" && typeof module.exports === "object") { - var v = factory(require, exports); - if (v !== undefined) module.exports = v; - } - else if (typeof define === "function" && define.amd) { - define(["require", "exports"], factory); - } -})(function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports._ = void 0; - exports._ = 0; -}); -//// [f.mjs] -(function (factory) { - if (typeof module === "object" && typeof module.exports === "object") { - var v = factory(require, exports); - if (v !== undefined) module.exports = v; - } - else if (typeof define === "function" && define.amd) { - define(["require", "exports"], factory); - } -})(function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports._ = void 0; - exports._ = 0; -}); -//// [g.js] -(function (factory) { - if (typeof module === "object" && typeof module.exports === "object") { - var v = factory(require, exports); - if (v !== undefined) module.exports = v; - } - else if (typeof define === "function" && define.amd) { - define(["require", "exports"], factory); - } -})(function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); -}); -//// [h.mjs] -(function (factory) { - if (typeof module === "object" && typeof module.exports === "object") { - var v = factory(require, exports); - if (v !== undefined) module.exports = v; - } - else if (typeof define === "function" && define.amd) { - define(["require", "exports"], factory); - } -})(function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); -}); -//// [i.cjs] -(function (factory) { - if (typeof module === "object" && typeof module.exports === "object") { - var v = factory(require, exports); - if (v !== undefined) module.exports = v; - } - else if (typeof define === "function" && define.amd) { - define(["require", "exports"], factory); - } -})(function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); -}); -//// [dummy.js] -(function (factory) { - if (typeof module === "object" && typeof module.exports === "object") { - var v = factory(require, exports); - if (v !== undefined) module.exports = v; - } - else if (typeof define === "function" && define.amd) { - define(["require", "exports"], factory); - } -})(function (require, exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); -}); diff --git a/tests/baselines/reference/impliedNodeFormatEmit2(module=commonjs).errors.txt b/tests/baselines/reference/impliedNodeFormatEmit2(module=commonjs).errors.txt deleted file mode 100644 index b783a3b97e8cd..0000000000000 --- a/tests/baselines/reference/impliedNodeFormatEmit2(module=commonjs).errors.txt +++ /dev/null @@ -1,40 +0,0 @@ -error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. - - -!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. -==== /package.json (0 errors) ==== - {} - -==== /a.ts (0 errors) ==== - export const _ = 0; - -==== /b.mts (0 errors) ==== - export const _ = 0; - -==== /c.cts (0 errors) ==== - export const _ = 0; - -==== /d.js (0 errors) ==== - export const _ = 0; - -==== /e.mjs (0 errors) ==== - export const _ = 0; - -==== /f.mjs (0 errors) ==== - export const _ = 0; - -==== /g.ts (0 errors) ==== - import {} from "./a"; - import a = require("./a"); - -==== /h.mts (0 errors) ==== - import {} from "./a"; - import a = require("./a"); - -==== /i.cts (0 errors) ==== - import {} from "./a"; - import a = require("./a"); - -==== /dummy.ts (0 errors) ==== - export {}; - \ No newline at end of file diff --git a/tests/baselines/reference/impliedNodeFormatEmit2(module=esnext).errors.txt b/tests/baselines/reference/impliedNodeFormatEmit2(module=esnext).errors.txt deleted file mode 100644 index a74bc098343a7..0000000000000 --- a/tests/baselines/reference/impliedNodeFormatEmit2(module=esnext).errors.txt +++ /dev/null @@ -1,47 +0,0 @@ -/g.ts(2,1): error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. -/h.mts(2,1): error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. -/i.cts(2,1): error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. - - -==== /package.json (0 errors) ==== - {} - -==== /a.ts (0 errors) ==== - export const _ = 0; - -==== /b.mts (0 errors) ==== - export const _ = 0; - -==== /c.cts (0 errors) ==== - export const _ = 0; - -==== /d.js (0 errors) ==== - export const _ = 0; - -==== /e.mjs (0 errors) ==== - export const _ = 0; - -==== /f.mjs (0 errors) ==== - export const _ = 0; - -==== /g.ts (1 errors) ==== - import {} from "./a"; - import a = require("./a"); - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. - -==== /h.mts (1 errors) ==== - import {} from "./a"; - import a = require("./a"); - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. - -==== /i.cts (1 errors) ==== - import {} from "./a"; - import a = require("./a"); - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. - -==== /dummy.ts (0 errors) ==== - export {}; - \ No newline at end of file diff --git a/tests/baselines/reference/impliedNodeFormatEmit2(module=preserve).js b/tests/baselines/reference/impliedNodeFormatEmit2(module=preserve).js deleted file mode 100644 index ca5229e56031b..0000000000000 --- a/tests/baselines/reference/impliedNodeFormatEmit2(module=preserve).js +++ /dev/null @@ -1,55 +0,0 @@ -//// [tests/cases/compiler/impliedNodeFormatEmit2.ts] //// - -//// [package.json] -{} - -//// [a.ts] -export const _ = 0; - -//// [b.mts] -export const _ = 0; - -//// [c.cts] -export const _ = 0; - -//// [d.js] -export const _ = 0; - -//// [e.mjs] -export const _ = 0; - -//// [f.mjs] -export const _ = 0; - -//// [g.ts] -import {} from "./a"; -import a = require("./a"); - -//// [h.mts] -import {} from "./a"; -import a = require("./a"); - -//// [i.cts] -import {} from "./a"; -import a = require("./a"); - -//// [dummy.ts] -export {}; - - -//// [a.js] -export var _ = 0; -//// [b.mjs] -export var _ = 0; -//// [c.cjs] -export var _ = 0; -//// [d.js] -export var _ = 0; -//// [e.mjs] -export var _ = 0; -//// [f.mjs] -export var _ = 0; -//// [g.js] -//// [h.mjs] -//// [i.cjs] -//// [dummy.js] diff --git a/tests/baselines/reference/impliedNodeFormatEmit3(module=commonjs).errors.txt b/tests/baselines/reference/impliedNodeFormatEmit3(module=commonjs).errors.txt deleted file mode 100644 index bad14be6e619e..0000000000000 --- a/tests/baselines/reference/impliedNodeFormatEmit3(module=commonjs).errors.txt +++ /dev/null @@ -1,42 +0,0 @@ -error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. - - -!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. -==== /package.json (0 errors) ==== - { - "type": "module" - } - -==== /a.ts (0 errors) ==== - export const _ = 0; - -==== /b.mts (0 errors) ==== - export const _ = 0; - -==== /c.cts (0 errors) ==== - export const _ = 0; - -==== /d.js (0 errors) ==== - export const _ = 0; - -==== /e.mjs (0 errors) ==== - export const _ = 0; - -==== /f.mjs (0 errors) ==== - export const _ = 0; - -==== /g.ts (0 errors) ==== - import {} from "./a"; - import a = require("./a"); - -==== /h.mts (0 errors) ==== - import {} from "./a"; - import a = require("./a"); - -==== /i.cts (0 errors) ==== - import {} from "./a"; - import a = require("./a"); - -==== /dummy.ts (0 errors) ==== - export {}; - \ No newline at end of file diff --git a/tests/baselines/reference/impliedNodeFormatEmit3(module=esnext).errors.txt b/tests/baselines/reference/impliedNodeFormatEmit3(module=esnext).errors.txt deleted file mode 100644 index 5f8efe425b6c7..0000000000000 --- a/tests/baselines/reference/impliedNodeFormatEmit3(module=esnext).errors.txt +++ /dev/null @@ -1,49 +0,0 @@ -/g.ts(2,1): error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. -/h.mts(2,1): error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. -/i.cts(2,1): error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. - - -==== /package.json (0 errors) ==== - { - "type": "module" - } - -==== /a.ts (0 errors) ==== - export const _ = 0; - -==== /b.mts (0 errors) ==== - export const _ = 0; - -==== /c.cts (0 errors) ==== - export const _ = 0; - -==== /d.js (0 errors) ==== - export const _ = 0; - -==== /e.mjs (0 errors) ==== - export const _ = 0; - -==== /f.mjs (0 errors) ==== - export const _ = 0; - -==== /g.ts (1 errors) ==== - import {} from "./a"; - import a = require("./a"); - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. - -==== /h.mts (1 errors) ==== - import {} from "./a"; - import a = require("./a"); - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. - -==== /i.cts (1 errors) ==== - import {} from "./a"; - import a = require("./a"); - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. - -==== /dummy.ts (0 errors) ==== - export {}; - \ No newline at end of file diff --git a/tests/baselines/reference/impliedNodeFormatEmit3(module=preserve).js b/tests/baselines/reference/impliedNodeFormatEmit3(module=preserve).js deleted file mode 100644 index 91cb7ffa16e6a..0000000000000 --- a/tests/baselines/reference/impliedNodeFormatEmit3(module=preserve).js +++ /dev/null @@ -1,57 +0,0 @@ -//// [tests/cases/compiler/impliedNodeFormatEmit3.ts] //// - -//// [package.json] -{ - "type": "module" -} - -//// [a.ts] -export const _ = 0; - -//// [b.mts] -export const _ = 0; - -//// [c.cts] -export const _ = 0; - -//// [d.js] -export const _ = 0; - -//// [e.mjs] -export const _ = 0; - -//// [f.mjs] -export const _ = 0; - -//// [g.ts] -import {} from "./a"; -import a = require("./a"); - -//// [h.mts] -import {} from "./a"; -import a = require("./a"); - -//// [i.cts] -import {} from "./a"; -import a = require("./a"); - -//// [dummy.ts] -export {}; - - -//// [a.js] -export var _ = 0; -//// [b.mjs] -export var _ = 0; -//// [c.cjs] -export var _ = 0; -//// [d.js] -export var _ = 0; -//// [e.mjs] -export var _ = 0; -//// [f.mjs] -export var _ = 0; -//// [g.js] -//// [h.mjs] -//// [i.cjs] -//// [dummy.js] diff --git a/tests/baselines/reference/impliedNodeFormatEmit4(module=commonjs).errors.txt b/tests/baselines/reference/impliedNodeFormatEmit4(module=commonjs).errors.txt deleted file mode 100644 index 5229094dfa736..0000000000000 --- a/tests/baselines/reference/impliedNodeFormatEmit4(module=commonjs).errors.txt +++ /dev/null @@ -1,42 +0,0 @@ -error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. - - -!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. -==== /package.json (0 errors) ==== - { - "type": "commonjs" - } - -==== /a.ts (0 errors) ==== - export const _ = 0; - -==== /b.mts (0 errors) ==== - export const _ = 0; - -==== /c.cts (0 errors) ==== - export const _ = 0; - -==== /d.js (0 errors) ==== - export const _ = 0; - -==== /e.mjs (0 errors) ==== - export const _ = 0; - -==== /f.mjs (0 errors) ==== - export const _ = 0; - -==== /g.ts (0 errors) ==== - import {} from "./a"; - import a = require("./a"); - -==== /h.mts (0 errors) ==== - import {} from "./a"; - import a = require("./a"); - -==== /i.cts (0 errors) ==== - import {} from "./a"; - import a = require("./a"); - -==== /dummy.ts (0 errors) ==== - export {}; - \ No newline at end of file diff --git a/tests/baselines/reference/impliedNodeFormatEmit4(module=esnext).errors.txt b/tests/baselines/reference/impliedNodeFormatEmit4(module=esnext).errors.txt deleted file mode 100644 index 996c1c41bad96..0000000000000 --- a/tests/baselines/reference/impliedNodeFormatEmit4(module=esnext).errors.txt +++ /dev/null @@ -1,49 +0,0 @@ -/g.ts(2,1): error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. -/h.mts(2,1): error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. -/i.cts(2,1): error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. - - -==== /package.json (0 errors) ==== - { - "type": "commonjs" - } - -==== /a.ts (0 errors) ==== - export const _ = 0; - -==== /b.mts (0 errors) ==== - export const _ = 0; - -==== /c.cts (0 errors) ==== - export const _ = 0; - -==== /d.js (0 errors) ==== - export const _ = 0; - -==== /e.mjs (0 errors) ==== - export const _ = 0; - -==== /f.mjs (0 errors) ==== - export const _ = 0; - -==== /g.ts (1 errors) ==== - import {} from "./a"; - import a = require("./a"); - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. - -==== /h.mts (1 errors) ==== - import {} from "./a"; - import a = require("./a"); - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. - -==== /i.cts (1 errors) ==== - import {} from "./a"; - import a = require("./a"); - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. - -==== /dummy.ts (0 errors) ==== - export {}; - \ No newline at end of file diff --git a/tests/baselines/reference/impliedNodeFormatEmit4(module=preserve).js b/tests/baselines/reference/impliedNodeFormatEmit4(module=preserve).js deleted file mode 100644 index 3de162effe8f8..0000000000000 --- a/tests/baselines/reference/impliedNodeFormatEmit4(module=preserve).js +++ /dev/null @@ -1,57 +0,0 @@ -//// [tests/cases/compiler/impliedNodeFormatEmit4.ts] //// - -//// [package.json] -{ - "type": "commonjs" -} - -//// [a.ts] -export const _ = 0; - -//// [b.mts] -export const _ = 0; - -//// [c.cts] -export const _ = 0; - -//// [d.js] -export const _ = 0; - -//// [e.mjs] -export const _ = 0; - -//// [f.mjs] -export const _ = 0; - -//// [g.ts] -import {} from "./a"; -import a = require("./a"); - -//// [h.mts] -import {} from "./a"; -import a = require("./a"); - -//// [i.cts] -import {} from "./a"; -import a = require("./a"); - -//// [dummy.ts] -export {}; - - -//// [a.js] -export var _ = 0; -//// [b.mjs] -export var _ = 0; -//// [c.cjs] -export var _ = 0; -//// [d.js] -export var _ = 0; -//// [e.mjs] -export var _ = 0; -//// [f.mjs] -export var _ = 0; -//// [g.js] -//// [h.mjs] -//// [i.cjs] -//// [dummy.js] diff --git a/tests/baselines/reference/impliedNodeFormatInterop1.js b/tests/baselines/reference/impliedNodeFormatInterop1.js deleted file mode 100644 index 8f57e8dce3d80..0000000000000 --- a/tests/baselines/reference/impliedNodeFormatInterop1.js +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/compiler/impliedNodeFormatInterop1.ts] //// - -//// [package.json] -{ - "name": "highlight.js", - "type": "commonjs", - "types": "index.d.ts" -} - -//// [index.d.ts] -declare module "highlight.js" { - export interface HighlightAPI { - highlight(code: string): string; - } - const hljs: HighlightAPI; - export default hljs; -} - -//// [core.d.ts] -import hljs from "highlight.js"; -export default hljs; - -//// [index.ts] -import hljs from "highlight.js/lib/core"; -hljs.highlight("code"); - - -//// [index.js] -import hljs from "highlight.js/lib/core"; -hljs.highlight("code"); diff --git a/tests/baselines/reference/impliedNodeFormatInterop1.symbols b/tests/baselines/reference/impliedNodeFormatInterop1.symbols deleted file mode 100644 index 15b707874681b..0000000000000 --- a/tests/baselines/reference/impliedNodeFormatInterop1.symbols +++ /dev/null @@ -1,37 +0,0 @@ -//// [tests/cases/compiler/impliedNodeFormatInterop1.ts] //// - -=== /node_modules/highlight.js/index.d.ts === -declare module "highlight.js" { ->"highlight.js" : Symbol("highlight.js", Decl(index.d.ts, 0, 0)) - - export interface HighlightAPI { ->HighlightAPI : Symbol(HighlightAPI, Decl(index.d.ts, 0, 31)) - - highlight(code: string): string; ->highlight : Symbol(HighlightAPI.highlight, Decl(index.d.ts, 1, 33)) ->code : Symbol(code, Decl(index.d.ts, 2, 14)) - } - const hljs: HighlightAPI; ->hljs : Symbol(hljs, Decl(index.d.ts, 4, 7)) ->HighlightAPI : Symbol(HighlightAPI, Decl(index.d.ts, 0, 31)) - - export default hljs; ->hljs : Symbol(hljs, Decl(index.d.ts, 4, 7)) -} - -=== /node_modules/highlight.js/lib/core.d.ts === -import hljs from "highlight.js"; ->hljs : Symbol(hljs, Decl(core.d.ts, 0, 6)) - -export default hljs; ->hljs : Symbol(hljs, Decl(core.d.ts, 0, 6)) - -=== /index.ts === -import hljs from "highlight.js/lib/core"; ->hljs : Symbol(hljs, Decl(index.ts, 0, 6)) - -hljs.highlight("code"); ->hljs.highlight : Symbol(HighlightAPI.highlight, Decl(index.d.ts, 1, 33)) ->hljs : Symbol(hljs, Decl(index.ts, 0, 6)) ->highlight : Symbol(HighlightAPI.highlight, Decl(index.d.ts, 1, 33)) - diff --git a/tests/baselines/reference/modulePreserve4.errors.txt b/tests/baselines/reference/modulePreserve4.errors.txt index b94d7b89604a5..fa8baeb0c390d 100644 --- a/tests/baselines/reference/modulePreserve4.errors.txt +++ b/tests/baselines/reference/modulePreserve4.errors.txt @@ -127,9 +127,6 @@ import g1 from "./g"; // { default: 0 } const g2 = require("./g"); // { default: 0 } -==== /main4.cjs (0 errors) ==== - exports.x = require("./g"); - ==== /dummy.ts (0 errors) ==== export {}; // Silly test harness \ No newline at end of file diff --git a/tests/baselines/reference/modulePreserve4.js b/tests/baselines/reference/modulePreserve4.js index 536f52f3a4897..e5e009d628b0c 100644 --- a/tests/baselines/reference/modulePreserve4.js +++ b/tests/baselines/reference/modulePreserve4.js @@ -100,9 +100,6 @@ const f2 = require("./f.cjs"); // { default: 0 } import g1 from "./g"; // { default: 0 } const g2 = require("./g"); // { default: 0 } -//// [main4.cjs] -exports.x = require("./g"); - //// [dummy.ts] export {}; // Silly test harness @@ -188,8 +185,6 @@ import f1 from "./f.cjs"; // 0 const f2 = require("./f.cjs"); // { default: 0 } import g1 from "./g"; // { default: 0 } const g2 = require("./g"); // { default: 0 } -//// [main4.cjs] -exports.x = require("./g"); //// [dummy.js] export {}; // Silly test harness @@ -222,7 +217,5 @@ export {}; export {}; //// [main3.d.cts] export {}; -//// [main4.d.cts] -export const x: typeof import("./g"); //// [dummy.d.ts] export {}; diff --git a/tests/baselines/reference/modulePreserve4.symbols b/tests/baselines/reference/modulePreserve4.symbols index e9b29a585d546..05a7671af0235 100644 --- a/tests/baselines/reference/modulePreserve4.symbols +++ b/tests/baselines/reference/modulePreserve4.symbols @@ -256,14 +256,6 @@ const g2 = require("./g"); // { default: 0 } >require : Symbol(require) >"./g" : Symbol(g1, Decl(g.js, 0, 0)) -=== /main4.cjs === -exports.x = require("./g"); ->exports.x : Symbol(x, Decl(main4.cjs, 0, 0)) ->exports : Symbol(x, Decl(main4.cjs, 0, 0)) ->x : Symbol(x, Decl(main4.cjs, 0, 0)) ->require : Symbol(require) ->"./g" : Symbol("/g", Decl(g.js, 0, 0)) - === /dummy.ts === export {}; // Silly test harness diff --git a/tests/baselines/reference/modulePreserve4.types b/tests/baselines/reference/modulePreserve4.types index ed61a6e2d5284..6d00a2d954e7a 100644 --- a/tests/baselines/reference/modulePreserve4.types +++ b/tests/baselines/reference/modulePreserve4.types @@ -441,23 +441,6 @@ const g2 = require("./g"); // { default: 0 } >"./g" : "./g" > : ^^^^^ -=== /main4.cjs === -exports.x = require("./g"); ->exports.x = require("./g") : typeof import("/g") -> : ^^^^^^^^^^^^^^^^^^^ ->exports.x : typeof import("/g") -> : ^^^^^^^^^^^^^^^^^^^ ->exports : typeof import("/main4") -> : ^^^^^^^^^^^^^^^^^^^^^^^ ->x : typeof import("/g") -> : ^^^^^^^^^^^^^^^^^^^ ->require("./g") : typeof import("/g") -> : ^^^^^^^^^^^^^^^^^^^ ->require : any -> : ^^^ ->"./g" : "./g" -> : ^^^^^ - === /dummy.ts === export {}; // Silly test harness diff --git a/tests/baselines/reference/nestedPackageJsonRedirect(moduleresolution=bundler).trace.json b/tests/baselines/reference/nestedPackageJsonRedirect(moduleresolution=bundler).trace.json index 7fc8b8ccbdea9..a6d17c4961116 100644 --- a/tests/baselines/reference/nestedPackageJsonRedirect(moduleresolution=bundler).trace.json +++ b/tests/baselines/reference/nestedPackageJsonRedirect(moduleresolution=bundler).trace.json @@ -1,7 +1,7 @@ [ "======== Resolving module '@restart/hooks/useMergedRefs' from '/main.ts'. ========", "Explicitly specified module resolution kind: 'Bundler'.", - "Resolving in CJS mode with conditions 'require', 'types'.", + "Resolving in CJS mode with conditions 'import', 'types'.", "File '/package.json' does not exist.", "Loading module '@restart/hooks/useMergedRefs' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON.", "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", diff --git a/tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports.js b/tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports.js index 3afe5f2a3f639..e790961aa706e 100644 --- a/tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports.js +++ b/tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports.js @@ -157,8 +157,8 @@ export declare const e: typeof import("inner/mjs"); export declare const a: Promise<{ default: typeof import("./index.cjs"); }>; -export declare const b: Promise; -export declare const c: Promise; +export declare const b: Promise; +export declare const c: Promise; export declare const f: Promise<{ default: typeof import("inner"); cjsMain: true; diff --git a/tests/baselines/reference/nodeNextModuleResolution1.js b/tests/baselines/reference/nodeNextModuleResolution1.js index a006d7840c307..d76bd3acd7fb6 100644 --- a/tests/baselines/reference/nodeNextModuleResolution1.js +++ b/tests/baselines/reference/nodeNextModuleResolution1.js @@ -15,4 +15,5 @@ import {x} from "foo"; //// [app.js] -export {}; +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/nodeNextModuleResolution2.js b/tests/baselines/reference/nodeNextModuleResolution2.js index e57c0f2575603..19475675a566b 100644 --- a/tests/baselines/reference/nodeNextModuleResolution2.js +++ b/tests/baselines/reference/nodeNextModuleResolution2.js @@ -16,4 +16,5 @@ import {x} from "foo"; //// [app.mjs] -export {}; +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tests/baselines/reference/resolvesWithoutExportsDiagnostic1(moduleresolution=bundler).errors.txt b/tests/baselines/reference/resolvesWithoutExportsDiagnostic1(moduleresolution=bundler).errors.txt index fe904ca69530b..befdfb5cd9df7 100644 --- a/tests/baselines/reference/resolvesWithoutExportsDiagnostic1(moduleresolution=bundler).errors.txt +++ b/tests/baselines/reference/resolvesWithoutExportsDiagnostic1(moduleresolution=bundler).errors.txt @@ -1,3 +1,4 @@ +error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. error TS6504: File '/node_modules/bar/index.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? The file is in the program because: Root file specified for compilation @@ -16,6 +17,7 @@ error TS6504: File '/node_modules/foo/index.mjs' is a JavaScript file. Did you m There are types at '/node_modules/@types/bar/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@types/bar' library may need to update its package.json or typings. +!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later. !!! error TS6504: File '/node_modules/bar/index.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? !!! error TS6504: The file is in the program because: !!! error TS6504: Root file specified for compilation diff --git a/tests/baselines/reference/tsbuild/commandLine/different-options-discrepancies.js b/tests/baselines/reference/tsbuild/commandLine/different-options-discrepancies.js new file mode 100644 index 0000000000000..e8fd5fc136a36 --- /dev/null +++ b/tests/baselines/reference/tsbuild/commandLine/different-options-discrepancies.js @@ -0,0 +1,357 @@ +2:: with declaration should not emit anything +Clean build tsbuildinfo will have compilerOptions with composite and declaration +Incremental build will detect that it doesnt need to rebuild so tsbuild info is from before which has option composite only +TsBuild info text without affectedFilesPendingEmit:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-18487752940-export const a = 10;const aLocal = 10;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "declaration": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-18487752940-export const a = 10;const aLocal = 10;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +6:: with emitDeclarationOnly should not emit anything +Clean build tsbuildinfo will have compilerOptions with composite and emitDeclarationOnly +Incremental build will detect that it doesnt need to rebuild so tsbuild info is from before which has option composite only +TsBuild info text without affectedFilesPendingEmit:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-18487752940-export const a = 10;const aLocal = 10;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-18487752940-export const a = 10;const aLocal = 10;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +9:: with declaration should not emit anything +Clean build tsbuildinfo will have compilerOptions with composite and declaration +Incremental build will detect that it doesnt need to rebuild so tsbuild info is from before which has option composite only +TsBuild info text without affectedFilesPendingEmit:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-17390360476-export const a = 10;const aLocal = 100;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "declaration": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-17390360476-export const a = 10;const aLocal = 100;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/commandLine/different-options-with-incremental-discrepancies.js b/tests/baselines/reference/tsbuild/commandLine/different-options-with-incremental-discrepancies.js new file mode 100644 index 0000000000000..706bd7b64b101 --- /dev/null +++ b/tests/baselines/reference/tsbuild/commandLine/different-options-with-incremental-discrepancies.js @@ -0,0 +1,230 @@ +4:: no-change-run +Clean build tsbuildinfo will have compilerOptions {} +Incremental build will detect that it doesnt need to rebuild so tsbuild info is from before which has option declaration and declarationMap +TsBuild info text without affectedFilesPendingEmit:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-18487752940-export const a = 10;const aLocal = 10;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "options": {} + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-18487752940-export const a = 10;const aLocal = 10;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true, + "declarationMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion" +} +7:: no-change-run +Clean build tsbuildinfo will have compilerOptions {} +Incremental build will detect that it doesnt need to rebuild so tsbuild info is from before which has option declaration and declarationMap +TsBuild info text without affectedFilesPendingEmit:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-17390360476-export const a = 10;const aLocal = 100;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "options": {} + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-17390360476-export const a = 10;const aLocal = 100;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true, + "declarationMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/commandLine/different-options-with-incremental-with-outFile-discrepancies.js b/tests/baselines/reference/tsbuild/commandLine/different-options-with-incremental-with-outFile-discrepancies.js new file mode 100644 index 0000000000000..e39854108f896 --- /dev/null +++ b/tests/baselines/reference/tsbuild/commandLine/different-options-with-incremental-with-outFile-discrepancies.js @@ -0,0 +1,140 @@ +4:: no-change-run +Clean build tsbuildinfo will have compilerOptions {} +Incremental build will detect that it doesnt need to rebuild so tsbuild info is from before which has option declaration and declarationMap +Clean build does not have dts bundle section +Incremental build contains the dts build section from before +TsBuild info text without affectedFilesPendingEmit:: /src/outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "declarationMap": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion" +} +7:: no-change-run +Clean build tsbuildinfo will have compilerOptions {} +Incremental build will detect that it doesnt need to rebuild so tsbuild info is from before which has option declaration and declarationMap +Clean build does not have dts bundle section +Incremental build contains the dts build section from before +TsBuild info text without affectedFilesPendingEmit:: /src/outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "declarationMap": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/commandLine/different-options-with-incremental-with-outFile.js b/tests/baselines/reference/tsbuild/commandLine/different-options-with-incremental-with-outFile.js new file mode 100644 index 0000000000000..5f0b2e03fe3cd --- /dev/null +++ b/tests/baselines/reference/tsbuild/commandLine/different-options-with-incremental-with-outFile.js @@ -0,0 +1,1275 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/a.ts] +export const a = 10;const aLocal = 10; + +//// [/src/project/b.ts] +export const b = 10;const bLocal = 10; + +//// [/src/project/c.ts] +import { a } from "./a";export const c = a; + +//// [/src/project/d.ts] +import { b } from "./b";export const d = b; + +//// [/src/project/tsconfig.json] +{ + "compilerOptions": { + "incremental": true, + "outFile": "../outFile.js", + "module": "amd" + } +} + + + +Output:: +/lib/tsc --b /src/project --verbose +[12:00:12 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:13 AM] Project 'src/project/tsconfig.json' is out of date because output file 'src/outFile.tsbuildinfo' does not exist + +[12:00:14 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "outFile": "/src/outFile.js", + "module": 2, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 10; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); + + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 884 +} + + + +Change:: with sourceMap +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --sourceMap +[12:00:19 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:20 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/outFile.tsbuildinfo' indicates there is change in compilerOptions + +[12:00:21 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "outFile": "/src/outFile.js", + "module": 2, + "sourceMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 10; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); +//# sourceMappingURL=outFile.js.map + +//// [/src/outFile.js.map] +{"version":3,"file":"outFile.js","sourceRoot":"","sources":["project/a.ts","project/b.ts","project/c.ts","project/d.ts"],"names":[],"mappings":";;;;IAAa,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,IAAM,MAAM,GAAG,EAAE,CAAC;;;;;;ICAzB,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,IAAM,MAAM,GAAG,EAAE,CAAC;;;;;;ICAD,QAAA,CAAC,GAAG,KAAC,CAAC;;;;;;ICAN,QAAA,CAAC,GAAG,KAAC,CAAC"} + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"module":2,"outFile":"./outFile.js","sourceMap":true}},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "module": 2, + "outFile": "./outFile.js", + "sourceMap": true + } + }, + "version": "FakeTSVersion", + "size": 901 +} + + + +Change:: should re-emit only js so they dont contain sourcemap +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose +[12:00:27 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:28 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/outFile.tsbuildinfo' indicates there is change in compilerOptions + +[12:00:29 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "outFile": "/src/outFile.js", + "module": 2, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 10; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); + + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 884 +} + + + +Change:: with declaration, emit Dts and should not emit js +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --declaration +[12:00:34 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:35 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/outFile.tsbuildinfo' indicates there is change in compilerOptions + +[12:00:36 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "outFile": "/src/outFile.js", + "module": 2, + "declaration": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.d.ts] +declare module "a" { + export const a = 10; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c = 10; +} +declare module "d" { + export const d = 10; +} + + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 903 +} + + + +Change:: with declaration and declarationMap +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --declaration --declarationMap +[12:00:41 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:42 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/outFile.tsbuildinfo' indicates there is change in compilerOptions + +[12:00:43 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "outFile": "/src/outFile.js", + "module": 2, + "declaration": true, + "declarationMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.d.ts] +declare module "a" { + export const a = 10; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c = 10; +} +declare module "d" { + export const d = 10; +} +//# sourceMappingURL=outFile.d.ts.map + +//// [/src/outFile.d.ts.map] +{"version":3,"file":"outFile.d.ts","sourceRoot":"","sources":["project/a.ts","project/b.ts","project/c.ts","project/d.ts"],"names":[],"mappings":";IAAA,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;;ICApB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;;ICAI,MAAM,CAAC,MAAM,CAAC,KAAI,CAAC;;;ICAnB,MAAM,CAAC,MAAM,CAAC,KAAI,CAAC"} + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"declaration":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "declarationMap": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 925 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose +[12:00:49 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:50 AM] Project 'src/project/tsconfig.json' is up to date because newest input 'src/project/d.ts' is older than output 'src/outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: local change +Input:: +//// [/src/project/a.ts] +export const a = 10;const aLocal = 100; + + + +Output:: +/lib/tsc --b /src/project --verbose +[12:00:52 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:53 AM] Project 'src/project/tsconfig.json' is out of date because output 'src/outFile.tsbuildinfo' is older than input 'src/project/a.ts' + +[12:00:54 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "outFile": "/src/outFile.js", + "module": 2, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 100; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); + + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-17390360476-export const a = 10;const aLocal = 100;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 885 +} + + + +Change:: with declaration and declarationMap +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --declaration --declarationMap +[12:00:59 AM] Projects in this build: + * src/project/tsconfig.json + +[12:01:00 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/outFile.tsbuildinfo' indicates there is change in compilerOptions + +[12:01:01 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "outFile": "/src/outFile.js", + "module": 2, + "declaration": true, + "declarationMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.d.ts] file written with same contents +//// [/src/outFile.d.ts.map] file written with same contents +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-17390360476-export const a = 10;const aLocal = 100;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"declaration":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "declarationMap": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 926 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose +[12:01:07 AM] Projects in this build: + * src/project/tsconfig.json + +[12:01:08 AM] Project 'src/project/tsconfig.json' is up to date because newest input 'src/project/a.ts' is older than output 'src/outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: with inlineSourceMap +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --inlineSourceMap +[12:01:09 AM] Projects in this build: + * src/project/tsconfig.json + +[12:01:10 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/outFile.tsbuildinfo' indicates there is change in compilerOptions + +[12:01:11 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "outFile": "/src/outFile.js", + "module": 2, + "inlineSourceMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 100; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0RmlsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInByb2plY3QvYS50cyIsInByb2plY3QvYi50cyIsInByb2plY3QvYy50cyIsInByb2plY3QvZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0lBQWEsUUFBQSxDQUFDLEdBQUcsRUFBRSxDQUFDO0lBQUEsSUFBTSxNQUFNLEdBQUcsR0FBRyxDQUFDOzs7Ozs7SUNBMUIsUUFBQSxDQUFDLEdBQUcsRUFBRSxDQUFDO0lBQUEsSUFBTSxNQUFNLEdBQUcsRUFBRSxDQUFDOzs7Ozs7SUNBRCxRQUFBLENBQUMsR0FBRyxLQUFDLENBQUM7Ozs7OztJQ0FOLFFBQUEsQ0FBQyxHQUFHLEtBQUMsQ0FBQyJ9 + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-17390360476-export const a = 10;const aLocal = 100;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"inlineSourceMap":true,"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "inlineSourceMap": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 908 +} + + + +Change:: with sourceMap +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --sourceMap +[12:01:16 AM] Projects in this build: + * src/project/tsconfig.json + +[12:01:17 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/outFile.tsbuildinfo' indicates there is change in compilerOptions + +[12:01:18 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "outFile": "/src/outFile.js", + "module": 2, + "sourceMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 100; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); +//# sourceMappingURL=outFile.js.map + +//// [/src/outFile.js.map] +{"version":3,"file":"outFile.js","sourceRoot":"","sources":["project/a.ts","project/b.ts","project/c.ts","project/d.ts"],"names":[],"mappings":";;;;IAAa,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,IAAM,MAAM,GAAG,GAAG,CAAC;;;;;;ICA1B,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,IAAM,MAAM,GAAG,EAAE,CAAC;;;;;;ICAD,QAAA,CAAC,GAAG,KAAC,CAAC;;;;;;ICAN,QAAA,CAAC,GAAG,KAAC,CAAC"} + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-17390360476-export const a = 10;const aLocal = 100;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"module":2,"outFile":"./outFile.js","sourceMap":true}},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "module": 2, + "outFile": "./outFile.js", + "sourceMap": true + } + }, + "version": "FakeTSVersion", + "size": 902 +} + + + +Change:: emit js files +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose +[12:01:24 AM] Projects in this build: + * src/project/tsconfig.json + +[12:01:25 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/outFile.tsbuildinfo' indicates there is change in compilerOptions + +[12:01:26 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "outFile": "/src/outFile.js", + "module": 2, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 100; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); + + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-17390360476-export const a = 10;const aLocal = 100;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 885 +} + + + +Change:: with declaration and declarationMap +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --declaration --declarationMap +[12:01:31 AM] Projects in this build: + * src/project/tsconfig.json + +[12:01:32 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/outFile.tsbuildinfo' indicates there is change in compilerOptions + +[12:01:33 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "outFile": "/src/outFile.js", + "module": 2, + "declaration": true, + "declarationMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.d.ts] file written with same contents +//// [/src/outFile.d.ts.map] file written with same contents +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-17390360476-export const a = 10;const aLocal = 100;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"declaration":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "declarationMap": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 926 +} + + + +Change:: with declaration and declarationMap, should not re-emit +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --declaration --declarationMap +[12:01:39 AM] Projects in this build: + * src/project/tsconfig.json + +[12:01:40 AM] Project 'src/project/tsconfig.json' is up to date because newest input 'src/project/a.ts' is older than output 'src/outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + diff --git a/tests/baselines/reference/tsbuild/commandLine/different-options-with-incremental.js b/tests/baselines/reference/tsbuild/commandLine/different-options-with-incremental.js new file mode 100644 index 0000000000000..d063c8ff0c3bd --- /dev/null +++ b/tests/baselines/reference/tsbuild/commandLine/different-options-with-incremental.js @@ -0,0 +1,1866 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/a.ts] +export const a = 10;const aLocal = 10; + +//// [/src/project/b.ts] +export const b = 10;const bLocal = 10; + +//// [/src/project/c.ts] +import { a } from "./a";export const c = a; + +//// [/src/project/d.ts] +import { b } from "./b";export const d = b; + +//// [/src/project/tsconfig.json] +{ + "compilerOptions": { + "incremental": true + } +} + + + +Output:: +/lib/tsc --b /src/project --verbose +[12:00:12 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:13 AM] Project 'src/project/tsconfig.json' is out of date because output file 'src/project/tsconfig.tsbuildinfo' does not exist + +[12:00:14 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project/a.ts (used version) +/src/project/b.ts (used version) +/src/project/c.ts (used version) +/src/project/d.ts (used version) + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 10; + + +//// [/src/project/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; + + +//// [/src/project/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; + + +//// [/src/project/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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},"-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": { + "version": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-18487752940-export const a = 10;const aLocal = 10;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 940 +} + + + +Change:: with sourceMap +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --sourceMap +[12:00:22 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:23 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/project/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[12:00:24 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "sourceMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 10; +//# sourceMappingURL=a.js.map + +//// [/src/project/a.js.map] +{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":";;;AAAa,QAAA,CAAC,GAAG,EAAE,CAAC;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC"} + +//// [/src/project/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; +//# sourceMappingURL=b.js.map + +//// [/src/project/b.js.map] +{"version":3,"file":"b.js","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":";;;AAAa,QAAA,CAAC,GAAG,EAAE,CAAC;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC"} + +//// [/src/project/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; +//# sourceMappingURL=c.js.map + +//// [/src/project/c.js.map] +{"version":3,"file":"c.js","sourceRoot":"","sources":["c.ts"],"names":[],"mappings":";;;AAAA,yBAAwB;AAAa,QAAA,CAAC,GAAG,KAAC,CAAC"} + +//// [/src/project/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; +//# sourceMappingURL=d.js.map + +//// [/src/project/d.js.map] +{"version":3,"file":"d.js","sourceRoot":"","sources":["d.ts"],"names":[],"mappings":";;;AAAA,yBAAwB;AAAa,QAAA,CAAC,GAAG,KAAC,CAAC"} + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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},"-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"sourceMap":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": { + "version": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-18487752940-export const a = 10;const aLocal = 10;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "sourceMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 969 +} + + + +Change:: should re-emit only js so they dont contain sourcemap +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose +[12:00:36 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:37 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/project/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[12:00:38 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 10; + + +//// [/src/project/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; + + +//// [/src/project/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; + + +//// [/src/project/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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},"-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": { + "version": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-18487752940-export const a = 10;const aLocal = 10;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 940 +} + + + +Change:: with declaration, emit Dts and should not emit js +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --declaration +[12:00:46 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:47 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/project/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[12:00:48 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.d.ts] +export declare const a = 10; + + +//// [/src/project/b.d.ts] +export declare const b = 10; + + +//// [/src/project/c.d.ts] +export declare const c = 10; + + +//// [/src/project/d.d.ts] +export declare const d = 10; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-18487752940-export const a = 10;const aLocal = 10;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"declaration":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1247 +} + + + +Change:: with declaration and declarationMap +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --declaration --declarationMap +[12:00:56 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:57 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/project/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[12:00:58 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "declarationMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.d.ts] +export declare const a = 10; +//# sourceMappingURL=a.d.ts.map + +//// [/src/project/a.d.ts.map] +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,KAAK,CAAC"} + +//// [/src/project/b.d.ts] +export declare const b = 10; +//# sourceMappingURL=b.d.ts.map + +//// [/src/project/b.d.ts.map] +{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,KAAK,CAAC"} + +//// [/src/project/c.d.ts] +export declare const c = 10; +//# sourceMappingURL=c.d.ts.map + +//// [/src/project/c.d.ts.map] +{"version":3,"file":"c.d.ts","sourceRoot":"","sources":["c.ts"],"names":[],"mappings":"AAAwB,eAAO,MAAM,CAAC,KAAI,CAAC"} + +//// [/src/project/d.d.ts] +export declare const d = 10; +//# sourceMappingURL=d.d.ts.map + +//// [/src/project/d.d.ts.map] +{"version":3,"file":"d.d.ts","sourceRoot":"","sources":["d.ts"],"names":[],"mappings":"AAAwB,eAAO,MAAM,CAAC,KAAI,CAAC"} + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-18487752940-export const a = 10;const aLocal = 10;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"declaration":true,"declarationMap":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true, + "declarationMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1269 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose +[12:01:10 AM] Projects in this build: + * src/project/tsconfig.json + +[12:01:11 AM] Project 'src/project/tsconfig.json' is up to date because newest input 'src/project/d.ts' is older than output 'src/project/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: local change +Input:: +//// [/src/project/a.ts] +export const a = 10;const aLocal = 100; + + + +Output:: +/lib/tsc --b /src/project --verbose +[12:01:13 AM] Projects in this build: + * src/project/tsconfig.json + +[12:01:14 AM] Project 'src/project/tsconfig.json' is out of date because output 'src/project/tsconfig.tsbuildinfo' is older than input 'src/project/a.ts' + +[12:01:15 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project/a.ts + +Shape signatures in builder refreshed for:: +/src/project/a.ts (computed .d.ts) + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 100; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-17390360476-export const a = 10;const aLocal = 100;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1217 +} + + + +Change:: with declaration and declarationMap +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --declaration --declarationMap +[12:01:20 AM] Projects in this build: + * src/project/tsconfig.json + +[12:01:21 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/project/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[12:01:22 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "declarationMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.d.ts] file written with same contents +//// [/src/project/a.d.ts.map] file written with same contents +//// [/src/project/b.d.ts] file written with same contents +//// [/src/project/b.d.ts.map] file written with same contents +//// [/src/project/c.d.ts] file written with same contents +//// [/src/project/c.d.ts.map] file written with same contents +//// [/src/project/d.d.ts] file written with same contents +//// [/src/project/d.d.ts.map] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-17390360476-export const a = 10;const aLocal = 100;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"declaration":true,"declarationMap":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true, + "declarationMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1270 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose +[12:01:34 AM] Projects in this build: + * src/project/tsconfig.json + +[12:01:35 AM] Project 'src/project/tsconfig.json' is up to date because newest input 'src/project/a.ts' is older than output 'src/project/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: with inlineSourceMap +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --inlineSourceMap +[12:01:36 AM] Projects in this build: + * src/project/tsconfig.json + +[12:01:37 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/project/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[12:01:38 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "inlineSourceMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 100; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQWEsUUFBQSxDQUFDLEdBQUcsRUFBRSxDQUFDO0FBQUEsSUFBTSxNQUFNLEdBQUcsR0FBRyxDQUFDIn0= + +//// [/src/project/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQWEsUUFBQSxDQUFDLEdBQUcsRUFBRSxDQUFDO0FBQUEsSUFBTSxNQUFNLEdBQUcsRUFBRSxDQUFDIn0= + +//// [/src/project/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEseUJBQXdCO0FBQWEsUUFBQSxDQUFDLEdBQUcsS0FBQyxDQUFDIn0= + +//// [/src/project/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEseUJBQXdCO0FBQWEsUUFBQSxDQUFDLEdBQUcsS0FBQyxDQUFDIn0= + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-17390360476-export const a = 10;const aLocal = 100;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"inlineSourceMap":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "inlineSourceMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1252 +} + + + +Change:: with sourceMap +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --sourceMap +[12:01:46 AM] Projects in this build: + * src/project/tsconfig.json + +[12:01:47 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/project/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[12:01:48 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "sourceMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 100; +//# sourceMappingURL=a.js.map + +//// [/src/project/a.js.map] +{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":";;;AAAa,QAAA,CAAC,GAAG,EAAE,CAAC;AAAA,IAAM,MAAM,GAAG,GAAG,CAAC"} + +//// [/src/project/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; +//# sourceMappingURL=b.js.map + +//// [/src/project/b.js.map] file written with same contents +//// [/src/project/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; +//# sourceMappingURL=c.js.map + +//// [/src/project/c.js.map] file written with same contents +//// [/src/project/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; +//# sourceMappingURL=d.js.map + +//// [/src/project/d.js.map] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-17390360476-export const a = 10;const aLocal = 100;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"sourceMap":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "sourceMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1246 +} + + + +Change:: emit js files +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose +[12:02:00 AM] Projects in this build: + * src/project/tsconfig.json + +[12:02:01 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/project/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[12:02:02 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 100; + + +//// [/src/project/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; + + +//// [/src/project/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; + + +//// [/src/project/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-17390360476-export const a = 10;const aLocal = 100;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1217 +} + + + +Change:: with declaration and declarationMap +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --declaration --declarationMap +[12:02:10 AM] Projects in this build: + * src/project/tsconfig.json + +[12:02:11 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/project/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[12:02:12 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "declarationMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.d.ts] file written with same contents +//// [/src/project/a.d.ts.map] file written with same contents +//// [/src/project/b.d.ts] file written with same contents +//// [/src/project/b.d.ts.map] file written with same contents +//// [/src/project/c.d.ts] file written with same contents +//// [/src/project/c.d.ts.map] file written with same contents +//// [/src/project/d.d.ts] file written with same contents +//// [/src/project/d.d.ts.map] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-17390360476-export const a = 10;const aLocal = 100;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"declaration":true,"declarationMap":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true, + "declarationMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1270 +} + + + +Change:: with declaration and declarationMap, should not re-emit +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --declaration --declarationMap +[12:02:24 AM] Projects in this build: + * src/project/tsconfig.json + +[12:02:25 AM] Project 'src/project/tsconfig.json' is up to date because newest input 'src/project/a.ts' is older than output 'src/project/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + diff --git a/tests/baselines/reference/tsbuild/commandLine/different-options-with-outFile-discrepancies.js b/tests/baselines/reference/tsbuild/commandLine/different-options-with-outFile-discrepancies.js new file mode 100644 index 0000000000000..c6e40e5d0a283 --- /dev/null +++ b/tests/baselines/reference/tsbuild/commandLine/different-options-with-outFile-discrepancies.js @@ -0,0 +1,221 @@ +2:: with declaration should not emit anything +Clean build tsbuildinfo will have compilerOptions with composite and declaration +Incremental build will detect that it doesnt need to rebuild so tsbuild info is from before which has option composite only +TsBuild info text without affectedFilesPendingEmit:: /src/outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +6:: with emitDeclarationOnly should not emit anything +Clean build tsbuildinfo will have compilerOptions with composite and emitDeclarationOnly +Incremental build will detect that it doesnt need to rebuild so tsbuild info is from before which has option composite only +Clean build info does not have js section because its fresh build +Incremental build info has js section from old build +TsBuild info text without affectedFilesPendingEmit:: /src/outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +9:: with declaration should not emit anything +Clean build tsbuildinfo will have compilerOptions with composite and declaration +Incremental build will detect that it doesnt need to rebuild so tsbuild info is from before which has option composite only +TsBuild info text without affectedFilesPendingEmit:: /src/outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/commandLine/different-options-with-outFile.js b/tests/baselines/reference/tsbuild/commandLine/different-options-with-outFile.js new file mode 100644 index 0000000000000..70e1163cc7a51 --- /dev/null +++ b/tests/baselines/reference/tsbuild/commandLine/different-options-with-outFile.js @@ -0,0 +1,1051 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/a.ts] +export const a = 10;const aLocal = 10; + +//// [/src/project/b.ts] +export const b = 10;const bLocal = 10; + +//// [/src/project/c.ts] +import { a } from "./a";export const c = a; + +//// [/src/project/d.ts] +import { b } from "./b";export const d = b; + +//// [/src/project/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "outFile": "../outFile.js", + "module": "amd" + } +} + + + +Output:: +/lib/tsc --b /src/project --verbose +[12:00:12 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:13 AM] Project 'src/project/tsconfig.json' is out of date because output file 'src/outFile.tsbuildinfo' does not exist + +[12:00:14 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/outFile.js", + "module": 2, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.d.ts] +declare module "a" { + export const a = 10; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c = 10; +} +declare module "d" { + export const d = 10; +} + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 10; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); + + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1184 +} + + + +Change:: with sourceMap +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --sourceMap +[12:00:20 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:21 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/outFile.tsbuildinfo' indicates there is change in compilerOptions + +[12:00:22 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/outFile.js", + "module": 2, + "sourceMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 10; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); +//# sourceMappingURL=outFile.js.map + +//// [/src/outFile.js.map] +{"version":3,"file":"outFile.js","sourceRoot":"","sources":["project/a.ts","project/b.ts","project/c.ts","project/d.ts"],"names":[],"mappings":";;;;IAAa,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,IAAM,MAAM,GAAG,EAAE,CAAC;;;;;;ICAzB,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,IAAM,MAAM,GAAG,EAAE,CAAC;;;;;;ICAD,QAAA,CAAC,GAAG,KAAC,CAAC;;;;;;ICAN,QAAA,CAAC,GAAG,KAAC,CAAC"} + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"module":2,"outFile":"./outFile.js","sourceMap":true},"outSignature":"-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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./outFile.js", + "sourceMap": true + }, + "outSignature": "-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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1201 +} + + + +Change:: should re-emit only js so they dont contain sourcemap +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose +[12:00:28 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:29 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/outFile.tsbuildinfo' indicates there is change in compilerOptions + +[12:00:30 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/outFile.js", + "module": 2, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 10; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); + + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1184 +} + + + +Change:: with declaration should not emit anything +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --declaration +[12:00:35 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:36 AM] Project 'src/project/tsconfig.json' is up to date because newest input 'src/project/d.ts' is older than output 'src/outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose +[12:00:37 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:38 AM] Project 'src/project/tsconfig.json' is up to date because newest input 'src/project/d.ts' is older than output 'src/outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: with declaration and declarationMap +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --declaration --declarationMap +[12:00:39 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:40 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/outFile.tsbuildinfo' indicates there is change in compilerOptions + +[12:00:41 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/outFile.js", + "module": 2, + "declaration": true, + "declarationMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.d.ts] +declare module "a" { + export const a = 10; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c = 10; +} +declare module "d" { + export const d = 10; +} +//# sourceMappingURL=outFile.d.ts.map + +//// [/src/outFile.d.ts.map] +{"version":3,"file":"outFile.d.ts","sourceRoot":"","sources":["project/a.ts","project/b.ts","project/c.ts","project/d.ts"],"names":[],"mappings":";IAAA,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;;ICApB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;;ICAI,MAAM,CAAC,MAAM,CAAC,KAAI,CAAC;;;ICAnB,MAAM,CAAC,MAAM,CAAC,KAAI,CAAC"} + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"declaration":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1225 +} + + + +Change:: should re-emit only dts so they dont contain sourcemap +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose +[12:00:48 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:49 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/outFile.tsbuildinfo' indicates there is change in compilerOptions + +[12:00:50 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/outFile.js", + "module": 2, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.d.ts] +declare module "a" { + export const a = 10; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c = 10; +} +declare module "d" { + export const d = 10; +} + + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1184 +} + + + +Change:: with emitDeclarationOnly should not emit anything +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --emitDeclarationOnly +[12:00:56 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:57 AM] Project 'src/project/tsconfig.json' is up to date because newest input 'src/project/d.ts' is older than output 'src/outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose +[12:00:58 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:59 AM] Project 'src/project/tsconfig.json' is up to date because newest input 'src/project/d.ts' is older than output 'src/outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: local change +Input:: +//// [/src/project/a.ts] +export const a = 10;const aLocal = 100; + + + +Output:: +/lib/tsc --b /src/project --verbose +[12:01:01 AM] Projects in this build: + * src/project/tsconfig.json + +[12:01:02 AM] Project 'src/project/tsconfig.json' is out of date because output 'src/outFile.tsbuildinfo' is older than input 'src/project/a.ts' + +[12:01:03 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/outFile.js", + "module": 2, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 100; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); + + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-17390360476-export const a = 10;const aLocal = 100;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1185 +} + + + +Change:: with declaration should not emit anything +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --declaration +[12:01:08 AM] Projects in this build: + * src/project/tsconfig.json + +[12:01:09 AM] Project 'src/project/tsconfig.json' is up to date because newest input 'src/project/a.ts' is older than output 'src/outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: with inlineSourceMap +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --inlineSourceMap +[12:01:10 AM] Projects in this build: + * src/project/tsconfig.json + +[12:01:11 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/outFile.tsbuildinfo' indicates there is change in compilerOptions + +[12:01:12 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/outFile.js", + "module": 2, + "inlineSourceMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 100; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0RmlsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInByb2plY3QvYS50cyIsInByb2plY3QvYi50cyIsInByb2plY3QvYy50cyIsInByb2plY3QvZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0lBQWEsUUFBQSxDQUFDLEdBQUcsRUFBRSxDQUFDO0lBQUEsSUFBTSxNQUFNLEdBQUcsR0FBRyxDQUFDOzs7Ozs7SUNBMUIsUUFBQSxDQUFDLEdBQUcsRUFBRSxDQUFDO0lBQUEsSUFBTSxNQUFNLEdBQUcsRUFBRSxDQUFDOzs7Ozs7SUNBRCxRQUFBLENBQUMsR0FBRyxLQUFDLENBQUM7Ozs7OztJQ0FOLFFBQUEsQ0FBQyxHQUFHLEtBQUMsQ0FBQyJ9 + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-17390360476-export const a = 10;const aLocal = 100;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"inlineSourceMap":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "inlineSourceMap": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1208 +} + + + +Change:: with sourceMap +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --sourceMap +[12:01:17 AM] Projects in this build: + * src/project/tsconfig.json + +[12:01:18 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/outFile.tsbuildinfo' indicates there is change in compilerOptions + +[12:01:19 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/outFile.js", + "module": 2, + "sourceMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 100; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); +//# sourceMappingURL=outFile.js.map + +//// [/src/outFile.js.map] +{"version":3,"file":"outFile.js","sourceRoot":"","sources":["project/a.ts","project/b.ts","project/c.ts","project/d.ts"],"names":[],"mappings":";;;;IAAa,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,IAAM,MAAM,GAAG,GAAG,CAAC;;;;;;ICA1B,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,IAAM,MAAM,GAAG,EAAE,CAAC;;;;;;ICAD,QAAA,CAAC,GAAG,KAAC,CAAC;;;;;;ICAN,QAAA,CAAC,GAAG,KAAC,CAAC"} + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-17390360476-export const a = 10;const aLocal = 100;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"module":2,"outFile":"./outFile.js","sourceMap":true},"outSignature":"-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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./outFile.js", + "sourceMap": true + }, + "outSignature": "-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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1202 +} + diff --git a/tests/baselines/reference/tsbuild/commandLine/different-options.js b/tests/baselines/reference/tsbuild/commandLine/different-options.js new file mode 100644 index 0000000000000..c8f5eb4fa21e3 --- /dev/null +++ b/tests/baselines/reference/tsbuild/commandLine/different-options.js @@ -0,0 +1,1511 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/a.ts] +export const a = 10;const aLocal = 10; + +//// [/src/project/b.ts] +export const b = 10;const bLocal = 10; + +//// [/src/project/c.ts] +import { a } from "./a";export const c = a; + +//// [/src/project/d.ts] +import { b } from "./b";export const d = b; + +//// [/src/project/tsconfig.json] +{ + "compilerOptions": { + "composite": true + } +} + + + +Output:: +/lib/tsc --b /src/project --verbose +[12:00:12 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:13 AM] Project 'src/project/tsconfig.json' is out of date because output file 'src/project/tsconfig.tsbuildinfo' does not exist + +[12:00:14 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project/a.ts (computed .d.ts during emit) +/src/project/b.ts (computed .d.ts during emit) +/src/project/c.ts (computed .d.ts during emit) +/src/project/d.ts (computed .d.ts during emit) + + +//// [/src/project/a.d.ts] +export declare const a = 10; + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 10; + + +//// [/src/project/b.d.ts] +export declare const b = 10; + + +//// [/src/project/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; + + +//// [/src/project/c.d.ts] +export declare const c = 10; + + +//// [/src/project/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; + + +//// [/src/project/d.d.ts] +export declare const d = 10; + + +//// [/src/project/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-18487752940-export const a = 10;const aLocal = 10;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./d.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./d.d.ts" + }, + "version": "FakeTSVersion", + "size": 1279 +} + + + +Change:: with sourceMap +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --sourceMap +[12:00:26 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:27 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/project/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[12:00:28 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "sourceMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 10; +//# sourceMappingURL=a.js.map + +//// [/src/project/a.js.map] +{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":";;;AAAa,QAAA,CAAC,GAAG,EAAE,CAAC;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC"} + +//// [/src/project/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; +//# sourceMappingURL=b.js.map + +//// [/src/project/b.js.map] +{"version":3,"file":"b.js","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":";;;AAAa,QAAA,CAAC,GAAG,EAAE,CAAC;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC"} + +//// [/src/project/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; +//# sourceMappingURL=c.js.map + +//// [/src/project/c.js.map] +{"version":3,"file":"c.js","sourceRoot":"","sources":["c.ts"],"names":[],"mappings":";;;AAAA,yBAAwB;AAAa,QAAA,CAAC,GAAG,KAAC,CAAC"} + +//// [/src/project/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; +//# sourceMappingURL=d.js.map + +//// [/src/project/d.js.map] +{"version":3,"file":"d.js","sourceRoot":"","sources":["d.ts"],"names":[],"mappings":";;;AAAA,yBAAwB;AAAa,QAAA,CAAC,GAAG,KAAC,CAAC"} + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-18487752940-export const a = 10;const aLocal = 10;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true,"sourceMap":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./d.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "sourceMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./d.d.ts" + }, + "version": "FakeTSVersion", + "size": 1296 +} + + + +Change:: should re-emit only js so they dont contain sourcemap +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose +[12:00:40 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:41 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/project/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[12:00:42 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 10; + + +//// [/src/project/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; + + +//// [/src/project/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; + + +//// [/src/project/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-18487752940-export const a = 10;const aLocal = 10;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./d.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./d.d.ts" + }, + "version": "FakeTSVersion", + "size": 1279 +} + + + +Change:: with declaration should not emit anything +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --declaration +[12:00:50 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:51 AM] Project 'src/project/tsconfig.json' is up to date because newest input 'src/project/d.ts' is older than output 'src/project/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose +[12:00:52 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:53 AM] Project 'src/project/tsconfig.json' is up to date because newest input 'src/project/d.ts' is older than output 'src/project/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: with declaration and declarationMap +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --declaration --declarationMap +[12:00:54 AM] Projects in this build: + * src/project/tsconfig.json + +[12:00:55 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/project/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[12:00:56 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "declaration": true, + "declarationMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.d.ts] +export declare const a = 10; +//# sourceMappingURL=a.d.ts.map + +//// [/src/project/a.d.ts.map] +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,KAAK,CAAC"} + +//// [/src/project/b.d.ts] +export declare const b = 10; +//# sourceMappingURL=b.d.ts.map + +//// [/src/project/b.d.ts.map] +{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,KAAK,CAAC"} + +//// [/src/project/c.d.ts] +export declare const c = 10; +//# sourceMappingURL=c.d.ts.map + +//// [/src/project/c.d.ts.map] +{"version":3,"file":"c.d.ts","sourceRoot":"","sources":["c.ts"],"names":[],"mappings":"AAAwB,eAAO,MAAM,CAAC,KAAI,CAAC"} + +//// [/src/project/d.d.ts] +export declare const d = 10; +//# sourceMappingURL=d.d.ts.map + +//// [/src/project/d.d.ts.map] +{"version":3,"file":"d.d.ts","sourceRoot":"","sources":["d.ts"],"names":[],"mappings":"AAAwB,eAAO,MAAM,CAAC,KAAI,CAAC"} + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-18487752940-export const a = 10;const aLocal = 10;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true,"declaration":true,"declarationMap":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./d.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./d.d.ts" + }, + "version": "FakeTSVersion", + "size": 1320 +} + + + +Change:: should re-emit only dts so they dont contain sourcemap +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose +[12:01:12 AM] Projects in this build: + * src/project/tsconfig.json + +[12:01:13 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/project/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[12:01:14 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.d.ts] +export declare const a = 10; + + +//// [/src/project/b.d.ts] +export declare const b = 10; + + +//// [/src/project/c.d.ts] +export declare const c = 10; + + +//// [/src/project/d.d.ts] +export declare const d = 10; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-18487752940-export const a = 10;const aLocal = 10;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./d.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./d.d.ts" + }, + "version": "FakeTSVersion", + "size": 1279 +} + + + +Change:: with emitDeclarationOnly should not emit anything +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --emitDeclarationOnly +[12:01:26 AM] Projects in this build: + * src/project/tsconfig.json + +[12:01:27 AM] Project 'src/project/tsconfig.json' is up to date because newest input 'src/project/d.ts' is older than output 'src/project/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose +[12:01:28 AM] Projects in this build: + * src/project/tsconfig.json + +[12:01:29 AM] Project 'src/project/tsconfig.json' is up to date because newest input 'src/project/d.ts' is older than output 'src/project/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: local change +Input:: +//// [/src/project/a.ts] +export const a = 10;const aLocal = 100; + + + +Output:: +/lib/tsc --b /src/project --verbose +[12:01:31 AM] Projects in this build: + * src/project/tsconfig.json + +[12:01:32 AM] Project 'src/project/tsconfig.json' is out of date because output 'src/project/tsconfig.tsbuildinfo' is older than input 'src/project/a.ts' + +[12:01:33 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project/a.ts + +Shape signatures in builder refreshed for:: +/src/project/a.ts (computed .d.ts) + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 100; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-17390360476-export const a = 10;const aLocal = 100;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./d.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./d.d.ts" + }, + "version": "FakeTSVersion", + "size": 1280 +} + + + +Change:: with declaration should not emit anything +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --declaration +[12:01:38 AM] Projects in this build: + * src/project/tsconfig.json + +[12:01:39 AM] Project 'src/project/tsconfig.json' is up to date because newest input 'src/project/a.ts' is older than output 'src/project/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: with inlineSourceMap +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --inlineSourceMap +[12:01:40 AM] Projects in this build: + * src/project/tsconfig.json + +[12:01:41 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/project/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[12:01:42 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "inlineSourceMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 100; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQWEsUUFBQSxDQUFDLEdBQUcsRUFBRSxDQUFDO0FBQUEsSUFBTSxNQUFNLEdBQUcsR0FBRyxDQUFDIn0= + +//// [/src/project/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQWEsUUFBQSxDQUFDLEdBQUcsRUFBRSxDQUFDO0FBQUEsSUFBTSxNQUFNLEdBQUcsRUFBRSxDQUFDIn0= + +//// [/src/project/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEseUJBQXdCO0FBQWEsUUFBQSxDQUFDLEdBQUcsS0FBQyxDQUFDIn0= + +//// [/src/project/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEseUJBQXdCO0FBQWEsUUFBQSxDQUFDLEdBQUcsS0FBQyxDQUFDIn0= + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-17390360476-export const a = 10;const aLocal = 100;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true,"inlineSourceMap":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./d.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "inlineSourceMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./d.d.ts" + }, + "version": "FakeTSVersion", + "size": 1303 +} + + + +Change:: with sourceMap +Input:: + + +Output:: +/lib/tsc --b /src/project --verbose --sourceMap +[12:01:50 AM] Projects in this build: + * src/project/tsconfig.json + +[12:01:51 AM] Project 'src/project/tsconfig.json' is out of date because buildinfo file 'src/project/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[12:01:52 AM] Building project '/src/project/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "sourceMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 100; +//# sourceMappingURL=a.js.map + +//// [/src/project/a.js.map] +{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":";;;AAAa,QAAA,CAAC,GAAG,EAAE,CAAC;AAAA,IAAM,MAAM,GAAG,GAAG,CAAC"} + +//// [/src/project/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; +//# sourceMappingURL=b.js.map + +//// [/src/project/b.js.map] file written with same contents +//// [/src/project/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; +//# sourceMappingURL=c.js.map + +//// [/src/project/c.js.map] file written with same contents +//// [/src/project/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; +//# sourceMappingURL=d.js.map + +//// [/src/project/d.js.map] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-17390360476-export const a = 10;const aLocal = 100;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true,"sourceMap":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./d.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "sourceMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./d.d.ts" + }, + "version": "FakeTSVersion", + "size": 1297 +} + diff --git a/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-discrepancies.js b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-discrepancies.js new file mode 100644 index 0000000000000..9017a491304fc --- /dev/null +++ b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-discrepancies.js @@ -0,0 +1,245 @@ +3:: no-change-run +Clean build tsbuildinfo for both projects will have compilerOptions with composite and emitDeclarationOnly +Incremental build will detect that it doesnt need to rebuild so tsbuild info for projects is from before which has option composite as true but emitDeclrationOnly as false +TsBuild info text without affectedFilesPendingEmit:: /src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": false + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +TsBuild info text without affectedFilesPendingEmit:: /src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./e.ts": { + "version": "-13789510868-export const e = 10;" + }, + "../../project1/src/a.d.ts": { + "version": "-3497920574-export declare const a = 10;\n" + }, + "./f.ts": { + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;" + }, + "../../project1/src/b.d.ts": { + "version": "-3829150557-export declare const b = 10;\n" + }, + "./g.ts": { + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;" + } + }, + "root": [ + [ + 2, + "./e.ts" + ], + [ + 4, + "./f.ts" + ], + [ + 6, + "./g.ts" + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "../../project1/src/a.d.ts", + "../../project1/src/b.d.ts", + "./e.ts", + "./f.ts", + "./g.ts" + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./e.ts": { + "version": "-13789510868-export const e = 10;" + }, + "../../project1/src/a.d.ts": { + "version": "-3497920574-export declare const a = 10;\n" + }, + "./f.ts": { + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;" + }, + "../../project1/src/b.d.ts": { + "version": "-3829150557-export declare const b = 10;\n" + }, + "./g.ts": { + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;" + } + }, + "root": [ + [ + 2, + "./e.ts" + ], + [ + 4, + "./f.ts" + ], + [ + 6, + "./g.ts" + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": false + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "../../project1/src/a.d.ts", + "../../project1/src/b.d.ts", + "./e.ts", + "./f.ts", + "./g.ts" + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental-discrepancies.js b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental-discrepancies.js new file mode 100644 index 0000000000000..c69a05e8b1ed4 --- /dev/null +++ b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental-discrepancies.js @@ -0,0 +1,241 @@ +3:: no-change-run +Clean build tsbuildinfo for both projects will have compilerOptions with composite and emitDeclarationOnly +Incremental build will detect that it doesnt need to rebuild so tsbuild info for projects is from before which has option composite as true but emitDeclrationOnly as false +TsBuild info text without affectedFilesPendingEmit:: /src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": false + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion" +} +TsBuild info text without affectedFilesPendingEmit:: /src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./e.ts": { + "version": "-13789510868-export const e = 10;" + }, + "../../project1/src/a.d.ts": { + "version": "-3497920574-export declare const a = 10;\n" + }, + "./f.ts": { + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;" + }, + "../../project1/src/b.d.ts": { + "version": "-3829150557-export declare const b = 10;\n" + }, + "./g.ts": { + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;" + } + }, + "root": [ + [ + 2, + "./e.ts" + ], + [ + 4, + "./f.ts" + ], + [ + 6, + "./g.ts" + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../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" + ] + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./e.ts": { + "version": "-13789510868-export const e = 10;" + }, + "../../project1/src/a.d.ts": { + "version": "-3497920574-export declare const a = 10;\n" + }, + "./f.ts": { + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;" + }, + "../../project1/src/b.d.ts": { + "version": "-3829150557-export declare const b = 10;\n" + }, + "./g.ts": { + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;" + } + }, + "root": [ + [ + 2, + "./e.ts" + ], + [ + 4, + "./f.ts" + ], + [ + 6, + "./g.ts" + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": false + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../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" + ] + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental-with-outFile-discrepancies.js b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental-with-outFile-discrepancies.js new file mode 100644 index 0000000000000..42050daabce36 --- /dev/null +++ b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental-with-outFile-discrepancies.js @@ -0,0 +1,70 @@ +3:: no-change-run +Clean build tsbuildinfo for both projects will have compilerOptions with composite and emitDeclarationOnly +Incremental build will detect that it doesnt need to rebuild so tsbuild info for projects is from before which has option composite as true but emitDeclrationOnly as false +TsBuild info text without affectedFilesPendingEmit:: /src/project1/outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "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; };", + "./src/a.ts": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "./src/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "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; };", + "./src/a.ts": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "./src/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": false, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental-with-outFile.js b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental-with-outFile.js new file mode 100644 index 0000000000000..f653d343e21c7 --- /dev/null +++ b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental-with-outFile.js @@ -0,0 +1,836 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project1/src/a.ts] +export const a = 10;const aLocal = 10; + +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10; + +//// [/src/project1/src/c.ts] +import { a } from "./a";export const c = a; + +//// [/src/project1/src/d.ts] +import { b } from "./b";export const d = b; + +//// [/src/project1/src/tsconfig.json] +{ + "compilerOptions": { + "incremental": true, + "declaration": true, + "outFile": "../outFile.js", + "module": "amd", + "emitDeclarationOnly": true + } +} + +//// [/src/project2/src/e.ts] +export const e = 10; + +//// [/src/project2/src/f.ts] +import { a } from "a"; export const f = a; + +//// [/src/project2/src/g.ts] +import { b } from "b"; export const g = b; + +//// [/src/project2/src/tsconfig.json] +{ + "compilerOptions": { + "incremental": true, + "declaration": true, + "outFile": "../outFile.js", + "module": "amd", + "emitDeclarationOnly": true + }, + "references": [ + { + "path": "../../project1/src" + } + ] +} + + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:00:19 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:20 AM] Project 'src/project1/src/tsconfig.json' is out of date because output file 'src/project1/outFile.tsbuildinfo' does not exist + +[12:00:21 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:00:26 AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.tsbuildinfo' does not exist + +[12:00:27 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:10:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + +10 { +   ~ +11 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +12 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project1/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project2/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/outFile.d.ts +/src/project2/src/e.ts +/src/project2/src/f.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/outFile.d.ts] +declare module "a" { + export const a = 10; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c = 10; +} +declare module "d" { + export const d = 10; +} + + +//// [/src/project1/outFile.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts","./src/d.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; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"declaration":true,"emitDeclarationOnly":true,"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ], + "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; };", + "./src/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./src/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 917 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:00:28 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:29 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' + +[12:00:30 AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.tsbuildinfo' does not exist + +[12:00:31 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:10:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + +10 { +   ~ +11 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +12 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project2/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/outFile.d.ts +/src/project2/src/e.ts +/src/project2/src/f.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: change +Input:: +//// [/src/project1/src/a.ts] +export const a = 10;const aLocal = 10;const aa = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:00:33 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:34 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/outFile.tsbuildinfo' is older than input 'src/project1/src/a.ts' + +[12:00:35 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:00:40 AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.tsbuildinfo' does not exist + +[12:00:41 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:10:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + +10 { +   ~ +11 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +12 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project1/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project2/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/outFile.d.ts +/src/project2/src/e.ts +/src/project2/src/f.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/outFile.d.ts] file written with same contents +//// [/src/project1/outFile.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts","./src/d.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; };","-16597586570-export const a = 10;const aLocal = 10;const aa = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"declaration":true,"emitDeclarationOnly":true,"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ], + "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; };", + "./src/a.ts": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "./src/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 931 +} + + + +Change:: emit js files +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly false +[12:00:42 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:43 AM] Project 'src/project1/src/tsconfig.json' is out of date because buildinfo file 'src/project1/outFile.tsbuildinfo' indicates there is change in compilerOptions + +[12:00:44 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:00:49 AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.tsbuildinfo' does not exist + +[12:00:50 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:10:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + +10 { +   ~ +11 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +12 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project1/outFile.js", + "module": 2, + "emitDeclarationOnly": false, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project2/outFile.js", + "module": 2, + "emitDeclarationOnly": false, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/outFile.d.ts +/src/project2/src/e.ts +/src/project2/src/f.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 10; + var aa = 10; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); + + +//// [/src/project1/outFile.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts","./src/d.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; };","-16597586570-export const a = 10;const aLocal = 10;const aa = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"declaration":true,"emitDeclarationOnly":false,"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ], + "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; };", + "./src/a.ts": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "./src/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": false, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 932 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:00:51 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:52 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' + +[12:00:53 AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.tsbuildinfo' does not exist + +[12:00:54 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:10:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + +10 { +   ~ +11 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +12 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project2/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/outFile.d.ts +/src/project2/src/e.ts +/src/project2/src/f.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: no change run with js emit +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly false +[12:00:55 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:56 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' + +[12:00:57 AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.tsbuildinfo' does not exist + +[12:00:58 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:10:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + +10 { +   ~ +11 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +12 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project2/outFile.js", + "module": 2, + "emitDeclarationOnly": false, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/outFile.d.ts +/src/project2/src/e.ts +/src/project2/src/f.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: js emit with change +Input:: +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10;const blocal = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly false +[12:01:00 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:01 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/outFile.tsbuildinfo' is older than input 'src/project1/src/b.ts' + +[12:01:02 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:01:08 AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.tsbuildinfo' does not exist + +[12:01:09 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:10:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + +10 { +   ~ +11 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +12 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project1/outFile.js", + "module": 2, + "emitDeclarationOnly": false, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project2/outFile.js", + "module": 2, + "emitDeclarationOnly": false, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/outFile.d.ts +/src/project2/src/e.ts +/src/project2/src/f.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/outFile.d.ts] file written with same contents +//// [/src/project1/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 10; + var aa = 10; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; + var blocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); + + +//// [/src/project1/outFile.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts","./src/d.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; };","-16597586570-export const a = 10;const aLocal = 10;const aa = 10;","2355059555-export const b = 10;const bLocal = 10;const blocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"declaration":true,"emitDeclarationOnly":false,"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ], + "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; };", + "./src/a.ts": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "./src/b.ts": "2355059555-export const b = 10;const bLocal = 10;const blocal = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": false, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 949 +} + diff --git a/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental.js b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental.js new file mode 100644 index 0000000000000..c4de7d9de9d1a --- /dev/null +++ b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-declaration-and-incremental.js @@ -0,0 +1,1255 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project1/src/a.ts] +export const a = 10;const aLocal = 10; + +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10; + +//// [/src/project1/src/c.ts] +import { a } from "./a";export const c = a; + +//// [/src/project1/src/d.ts] +import { b } from "./b";export const d = b; + +//// [/src/project1/src/tsconfig.json] +{ + "compilerOptions": { + "incremental": true, + "declaration": true, + "emitDeclarationOnly": true + } +} + +//// [/src/project2/src/e.ts] +export const e = 10; + +//// [/src/project2/src/f.ts] +import { a } from "../../project1/src/a"; export const f = a; + +//// [/src/project2/src/g.ts] +import { b } from "../../project1/src/b"; export const g = b; + +//// [/src/project2/src/tsconfig.json] +{ + "compilerOptions": { + "incremental": true, + "declaration": true, + "emitDeclarationOnly": true + }, + "references": [ + { + "path": "../../project1/src" + } + ] +} + + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:00:19 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:20 AM] Project 'src/project1/src/tsconfig.json' is out of date because output file 'src/project1/src/tsconfig.tsbuildinfo' does not exist + +[12:00:21 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:00:29 AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/src/tsconfig.tsbuildinfo' does not exist + +[12:00:30 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:8:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + + 8 { +   ~ + 9 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +10 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project1/src/a.ts (computed .d.ts during emit) +/src/project1/src/b.ts (computed .d.ts during emit) +/src/project1/src/c.ts (computed .d.ts during emit) +/src/project1/src/d.ts (computed .d.ts during emit) + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project2/src/e.ts +/src/project1/src/a.d.ts +/src/project2/src/f.ts +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/src/a.d.ts] +export declare const a = 10; + + +//// [/src/project1/src/b.d.ts] +export declare const b = 10; + + +//// [/src/project1/src/c.d.ts] +export declare const c = 10; + + +//// [/src/project1/src/d.d.ts] +export declare const d = 10; + + +//// [/src/project1/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-18487752940-export const a = 10;const aLocal = 10;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"declaration":true,"emitDeclarationOnly":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1277 +} + +//// [/src/project2/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"-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},"fileIdsList":[[3],[5]],"referencedMap":[[4,1],[6,2]],"changeFileSet":[1,3,5,2,4,6]},"version":"FakeTSVersion"} + +//// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileNamesList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.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; };", + "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; };", + "affectsGlobalScope": true + }, + "./e.ts": { + "original": { + "version": "-13789510868-export const e = 10;", + "signature": false + }, + "version": "-13789510868-export const e = 10;" + }, + "../../project1/src/a.d.ts": { + "original": { + "version": "-3497920574-export declare const a = 10;\n", + "signature": false + }, + "version": "-3497920574-export declare const a = 10;\n" + }, + "./f.ts": { + "original": { + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": false + }, + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;" + }, + "../../project1/src/b.d.ts": { + "original": { + "version": "-3829150557-export declare const b = 10;\n", + "signature": false + }, + "version": "-3829150557-export declare const b = 10;\n" + }, + "./g.ts": { + "original": { + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": false + }, + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;" + } + }, + "root": [ + [ + 2, + "./e.ts" + ], + [ + 4, + "./f.ts" + ], + [ + 6, + "./g.ts" + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../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" + ] + }, + "version": "FakeTSVersion", + "size": 1260 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:00:34 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:35 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' + +[12:00:36 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 + +[12:00:37 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:8:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + + 8 { +   ~ + 9 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +10 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project2/src/e.ts +/src/project1/src/a.d.ts +/src/project2/src/f.ts +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: change +Input:: +//// [/src/project1/src/a.ts] +export const a = 10;const aLocal = 10;const aa = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:00:39 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:40 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/src/tsconfig.tsbuildinfo' is older than input 'src/project1/src/a.ts' + +[12:00:41 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:00:46 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 + +[12:00:47 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:8:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + + 8 { +   ~ + 9 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +10 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project1/src/a.ts + +Shape signatures in builder refreshed for:: +/src/project1/src/a.ts (computed .d.ts) + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project2/src/e.ts +/src/project1/src/a.d.ts +/src/project2/src/f.ts +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/src/a.d.ts] file written with same contents +//// [/src/project1/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-16597586570-export const a = 10;const aLocal = 10;const aa = 10;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"declaration":true,"emitDeclarationOnly":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1291 +} + + + +Change:: emit js files +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly false +[12:00:48 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:49 AM] Project 'src/project1/src/tsconfig.json' is out of date because buildinfo file 'src/project1/src/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[12:00:50 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:00:58 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 + +[12:00:59 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:8:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + + 8 { +   ~ + 9 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +10 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "emitDeclarationOnly": false, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "emitDeclarationOnly": false, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project2/src/e.ts +/src/project1/src/a.d.ts +/src/project2/src/f.ts +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 10; +var aa = 10; + + +//// [/src/project1/src/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; + + +//// [/src/project1/src/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; + + +//// [/src/project1/src/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; + + +//// [/src/project1/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-16597586570-export const a = 10;const aLocal = 10;const aa = 10;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"declaration":true,"emitDeclarationOnly":false},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": false + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1292 +} + +//// [/src/project2/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"-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},"fileIdsList":[[3],[5]],"referencedMap":[[4,1],[6,2]],"changeFileSet":[1,3,5,2,4,6]},"version":"FakeTSVersion"} + +//// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileNamesList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.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; };", + "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; };", + "affectsGlobalScope": true + }, + "./e.ts": { + "original": { + "version": "-13789510868-export const e = 10;", + "signature": false + }, + "version": "-13789510868-export const e = 10;" + }, + "../../project1/src/a.d.ts": { + "original": { + "version": "-3497920574-export declare const a = 10;\n", + "signature": false + }, + "version": "-3497920574-export declare const a = 10;\n" + }, + "./f.ts": { + "original": { + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": false + }, + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;" + }, + "../../project1/src/b.d.ts": { + "original": { + "version": "-3829150557-export declare const b = 10;\n", + "signature": false + }, + "version": "-3829150557-export declare const b = 10;\n" + }, + "./g.ts": { + "original": { + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": false + }, + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;" + } + }, + "root": [ + [ + 2, + "./e.ts" + ], + [ + 4, + "./f.ts" + ], + [ + 6, + "./g.ts" + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": false + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../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" + ] + }, + "version": "FakeTSVersion", + "size": 1261 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:01:03 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:04 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' + +[12:01:05 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 + +[12:01:06 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:8:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + + 8 { +   ~ + 9 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +10 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project2/src/e.ts +/src/project1/src/a.d.ts +/src/project2/src/f.ts +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: no change run with js emit +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly false +[12:01:07 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:08 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' + +[12:01:09 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 + +[12:01:10 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:8:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + + 8 { +   ~ + 9 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +10 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "emitDeclarationOnly": false, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project2/src/e.ts +/src/project1/src/a.d.ts +/src/project2/src/f.ts +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: js emit with change +Input:: +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10;const blocal = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly false +[12:01:12 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:13 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/src/tsconfig.tsbuildinfo' is older than input 'src/project1/src/b.ts' + +[12:01:14 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:01:20 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 + +[12:01:21 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:8:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + + 8 { +   ~ + 9 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +10 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "emitDeclarationOnly": false, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project1/src/b.ts + +Shape signatures in builder refreshed for:: +/src/project1/src/b.ts (computed .d.ts) + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "emitDeclarationOnly": false, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project2/src/e.ts +/src/project1/src/a.d.ts +/src/project2/src/f.ts +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/src/b.d.ts] file written with same contents +//// [/src/project1/src/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; +var blocal = 10; + + +//// [/src/project1/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-16597586570-export const a = 10;const aLocal = 10;const aa = 10;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"2355059555-export const b = 10;const bLocal = 10;const blocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"declaration":true,"emitDeclarationOnly":false},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "2355059555-export const b = 10;const bLocal = 10;const blocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "2355059555-export const b = 10;const bLocal = 10;const blocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": false + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1309 +} + diff --git a/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-outFile-discrepancies.js b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-outFile-discrepancies.js new file mode 100644 index 0000000000000..b70cecc60e1c4 --- /dev/null +++ b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-outFile-discrepancies.js @@ -0,0 +1,143 @@ +3:: no-change-run +Clean build tsbuildinfo for both projects will have compilerOptions with composite and emitDeclarationOnly +Incremental build will detect that it doesnt need to rebuild so tsbuild info for projects is from before which has option composite as true but emitDeclrationOnly as false +TsBuild info text without affectedFilesPendingEmit:: /src/project1/outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "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; };", + "./src/a.ts": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "./src/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "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; };", + "./src/a.ts": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "./src/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": false, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +TsBuild info text without affectedFilesPendingEmit:: /src/project2/outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "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; };", + "../project1/outfile.d.ts": "-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", + "./src/e.ts": "-13789510868-export const e = 10;", + "./src/f.ts": "-4849089835-import { a } from \"a\"; export const f = a;", + "./src/g.ts": "-18341999015-import { b } from \"b\"; export const g = b;" + }, + "root": [ + [ + [ + 3, + 5 + ], + [ + "./src/e.ts", + "./src/f.ts", + "./src/g.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-12964815745-declare module \"e\" {\n export const e = 10;\n}\ndeclare module \"f\" {\n export const f = 10;\n}\ndeclare module \"g\" {\n export const g = 10;\n}\n", + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "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; };", + "../project1/outfile.d.ts": "-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", + "./src/e.ts": "-13789510868-export const e = 10;", + "./src/f.ts": "-4849089835-import { a } from \"a\"; export const f = a;", + "./src/g.ts": "-18341999015-import { b } from \"b\"; export const g = b;" + }, + "root": [ + [ + [ + 3, + 5 + ], + [ + "./src/e.ts", + "./src/f.ts", + "./src/g.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": false, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-12964815745-declare module \"e\" {\n export const e = 10;\n}\ndeclare module \"f\" {\n export const f = 10;\n}\ndeclare module \"g\" {\n export const g = 10;\n}\n", + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-outFile.js b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-outFile.js new file mode 100644 index 0000000000000..e803a0fc3e06f --- /dev/null +++ b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline-with-outFile.js @@ -0,0 +1,749 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project1/src/a.ts] +export const a = 10;const aLocal = 10; + +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10; + +//// [/src/project1/src/c.ts] +import { a } from "./a";export const c = a; + +//// [/src/project1/src/d.ts] +import { b } from "./b";export const d = b; + +//// [/src/project1/src/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "outFile": "../outFile.js", + "module": "amd", + "emitDeclarationOnly": true + } +} + +//// [/src/project2/src/e.ts] +export const e = 10; + +//// [/src/project2/src/f.ts] +import { a } from "a"; export const f = a; + +//// [/src/project2/src/g.ts] +import { b } from "b"; export const g = b; + +//// [/src/project2/src/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "outFile": "../outFile.js", + "module": "amd", + "emitDeclarationOnly": true + }, + "references": [ + { + "path": "../../project1/src" + } + ] +} + + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:00:19 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:20 AM] Project 'src/project1/src/tsconfig.json' is out of date because output file 'src/project1/outFile.tsbuildinfo' does not exist + +[12:00:21 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:00:26 AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.tsbuildinfo' does not exist + +[12:00:27 AM] Building project '/src/project2/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/project1/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "composite": true, + "outFile": "/src/project2/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/outFile.d.ts +/src/project2/src/e.ts +/src/project2/src/f.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/outFile.d.ts] +declare module "a" { + export const a = 10; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c = 10; +} +declare module "d" { + export const d = 10; +} + + +//// [/src/project1/outFile.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts","./src/d.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; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"emitDeclarationOnly":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ], + "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; };", + "./src/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./src/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1198 +} + +//// [/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] +{"program":{"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":{"composite":true,"emitDeclarationOnly":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-12964815745-declare module \"e\" {\n export const e = 10;\n}\ndeclare module \"f\" {\n export const f = 10;\n}\ndeclare module \"g\" {\n export const g = 10;\n}\n","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../project1/outfile.d.ts", + "./src/e.ts", + "./src/f.ts", + "./src/g.ts" + ], + "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; };", + "../project1/outfile.d.ts": "-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", + "./src/e.ts": "-13789510868-export const e = 10;", + "./src/f.ts": "-4849089835-import { a } from \"a\"; export const f = a;", + "./src/g.ts": "-18341999015-import { b } from \"b\"; export const g = b;" + }, + "root": [ + [ + [ + 3, + 5 + ], + [ + "./src/e.ts", + "./src/f.ts", + "./src/g.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-12964815745-declare module \"e\" {\n export const e = 10;\n}\ndeclare module \"f\" {\n export const f = 10;\n}\ndeclare module \"g\" {\n export const g = 10;\n}\n", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1315 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:00:32 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:33 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' + +[12:00:34 AM] Project 'src/project2/src/tsconfig.json' is up to date because newest input 'src/project2/src/g.ts' is older than output 'src/project2/outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: change +Input:: +//// [/src/project1/src/a.ts] +export const a = 10;const aLocal = 10;const aa = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:00:36 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:37 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/outFile.tsbuildinfo' is older than input 'src/project1/src/a.ts' + +[12:00:38 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:00:42 AM] Project 'src/project2/src/tsconfig.json' is up to date with .d.ts files from its dependencies + +[12:00:43 AM] Updating output timestamps of project '/src/project2/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/project1/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/outFile.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts","./src/d.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; };","-16597586570-export const a = 10;const aLocal = 10;const aa = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"emitDeclarationOnly":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ], + "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; };", + "./src/a.ts": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "./src/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1212 +} + +//// [/src/project2/outFile.tsbuildinfo] file changed its modified time + + +Change:: emit js files +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly false +[12:00:46 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:47 AM] Project 'src/project1/src/tsconfig.json' is out of date because buildinfo file 'src/project1/outFile.tsbuildinfo' indicates there is change in compilerOptions + +[12:00:48 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:00:53 AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates there is change in compilerOptions + +[12:00:54 AM] Building project '/src/project2/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/project1/outFile.js", + "module": 2, + "emitDeclarationOnly": false, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "composite": true, + "outFile": "/src/project2/outFile.js", + "module": 2, + "emitDeclarationOnly": false, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/outFile.d.ts +/src/project2/src/e.ts +/src/project2/src/f.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 10; + var aa = 10; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); + + +//// [/src/project1/outFile.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts","./src/d.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; };","-16597586570-export const a = 10;const aLocal = 10;const aa = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"emitDeclarationOnly":false,"module":2,"outFile":"./outFile.js"},"outSignature":"-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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ], + "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; };", + "./src/a.ts": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "./src/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": false, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1213 +} + +//// [/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] +{"program":{"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":{"composite":true,"emitDeclarationOnly":false,"module":2,"outFile":"./outFile.js"},"outSignature":"-12964815745-declare module \"e\" {\n export const e = 10;\n}\ndeclare module \"f\" {\n export const f = 10;\n}\ndeclare module \"g\" {\n export const g = 10;\n}\n","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../project1/outfile.d.ts", + "./src/e.ts", + "./src/f.ts", + "./src/g.ts" + ], + "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; };", + "../project1/outfile.d.ts": "-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", + "./src/e.ts": "-13789510868-export const e = 10;", + "./src/f.ts": "-4849089835-import { a } from \"a\"; export const f = a;", + "./src/g.ts": "-18341999015-import { b } from \"b\"; export const g = b;" + }, + "root": [ + [ + [ + 3, + 5 + ], + [ + "./src/e.ts", + "./src/f.ts", + "./src/g.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": false, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-12964815745-declare module \"e\" {\n export const e = 10;\n}\ndeclare module \"f\" {\n export const f = 10;\n}\ndeclare module \"g\" {\n export const g = 10;\n}\n", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1316 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:00:59 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:00 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' + +[12:01:01 AM] Project 'src/project2/src/tsconfig.json' is up to date because newest input 'src/project2/src/g.ts' is older than output 'src/project2/outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: no change run with js emit +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly false +[12:01:02 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:03 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' + +[12:01:04 AM] Project 'src/project2/src/tsconfig.json' is up to date because newest input 'src/project2/src/g.ts' is older than output 'src/project2/outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: js emit with change +Input:: +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10;const blocal = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly false +[12:01:06 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:07 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/outFile.tsbuildinfo' is older than input 'src/project1/src/b.ts' + +[12:01:08 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:01:13 AM] Project 'src/project2/src/tsconfig.json' is up to date with .d.ts files from its dependencies + +[12:01:14 AM] Updating output timestamps of project '/src/project2/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/project1/outFile.js", + "module": 2, + "emitDeclarationOnly": false, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 10; + var aa = 10; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; + var blocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); + + +//// [/src/project1/outFile.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts","./src/d.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; };","-16597586570-export const a = 10;const aLocal = 10;const aa = 10;","2355059555-export const b = 10;const bLocal = 10;const blocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"emitDeclarationOnly":false,"module":2,"outFile":"./outFile.js"},"outSignature":"-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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ], + "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; };", + "./src/a.ts": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "./src/b.ts": "2355059555-export const b = 10;const bLocal = 10;const blocal = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": false, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1230 +} + +//// [/src/project2/outFile.tsbuildinfo] file changed its modified time diff --git a/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline.js b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline.js new file mode 100644 index 0000000000000..c2470a62d5c51 --- /dev/null +++ b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-false-on-commandline.js @@ -0,0 +1,1087 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project1/src/a.ts] +export const a = 10;const aLocal = 10; + +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10; + +//// [/src/project1/src/c.ts] +import { a } from "./a";export const c = a; + +//// [/src/project1/src/d.ts] +import { b } from "./b";export const d = b; + +//// [/src/project1/src/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "emitDeclarationOnly": true + } +} + +//// [/src/project2/src/e.ts] +export const e = 10; + +//// [/src/project2/src/f.ts] +import { a } from "../../project1/src/a"; export const f = a; + +//// [/src/project2/src/g.ts] +import { b } from "../../project1/src/b"; export const g = b; + +//// [/src/project2/src/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "emitDeclarationOnly": true + }, + "references": [ + { + "path": "../../project1/src" + } + ] +} + + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:00:19 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:20 AM] Project 'src/project1/src/tsconfig.json' is out of date because output file 'src/project1/src/tsconfig.tsbuildinfo' does not exist + +[12:00:21 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:00:29 AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/src/tsconfig.tsbuildinfo' does not exist + +[12:00:30 AM] Building project '/src/project2/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "composite": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project1/src/a.ts (computed .d.ts during emit) +/src/project1/src/b.ts (computed .d.ts during emit) +/src/project1/src/c.ts (computed .d.ts during emit) +/src/project1/src/d.ts (computed .d.ts during emit) + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "composite": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project2/src/e.ts +/src/project1/src/a.d.ts +/src/project2/src/f.ts +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/project2/src/e.ts +/src/project1/src/a.d.ts +/src/project2/src/f.ts +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +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] +export declare const a = 10; + + +//// [/src/project1/src/b.d.ts] +export declare const b = 10; + + +//// [/src/project1/src/c.d.ts] +export declare const c = 10; + + +//// [/src/project1/src/d.d.ts] +export declare const d = 10; + + +//// [/src/project1/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-18487752940-export const a = 10;const aLocal = 10;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true,"emitDeclarationOnly":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./d.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./d.d.ts" + }, + "version": "FakeTSVersion", + "size": 1309 +} + +//// [/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] +{"program":{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"-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":{"composite":true,"emitDeclarationOnly":true},"fileIdsList":[[3],[5]],"referencedMap":[[4,1],[6,2]],"semanticDiagnosticsPerFile":[1,3,5,2,4,6],"latestChangedDtsFile":"./g.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileNamesList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.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 + }, + "./e.ts": { + "original": { + "version": "-13789510868-export const e = 10;", + "signature": "-4822840506-export declare const e = 10;\n" + }, + "version": "-13789510868-export const e = 10;", + "signature": "-4822840506-export declare const e = 10;\n" + }, + "../../project1/src/a.d.ts": { + "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": "-5154070489-export declare const f = 10;\n" + }, + "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": { + "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": "-5485300472-export declare const g = 10;\n" + }, + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "-5485300472-export declare const g = 10;\n" + } + }, + "root": [ + [ + 2, + "./e.ts" + ], + [ + 4, + "./f.ts" + ], + [ + 6, + "./g.ts" + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "../../project1/src/a.d.ts", + "../../project1/src/b.d.ts", + "./e.ts", + "./f.ts", + "./g.ts" + ], + "latestChangedDtsFile": "./g.d.ts" + }, + "version": "FakeTSVersion", + "size": 1344 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:00:37 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:38 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' + +[12:00:39 AM] Project 'src/project2/src/tsconfig.json' is up to date because newest input 'src/project2/src/g.ts' is older than output 'src/project2/src/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: change +Input:: +//// [/src/project1/src/a.ts] +export const a = 10;const aLocal = 10;const aa = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:00:41 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:42 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/src/tsconfig.tsbuildinfo' is older than input 'src/project1/src/a.ts' + +[12:00:43 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:00:47 AM] Project 'src/project2/src/tsconfig.json' is up to date with .d.ts files from its dependencies + +[12:00:48 AM] Updating output timestamps of project '/src/project2/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "composite": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project1/src/a.ts + +Shape signatures in builder refreshed for:: +/src/project1/src/a.ts (computed .d.ts) + + +//// [/src/project1/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-16597586570-export const a = 10;const aLocal = 10;const aa = 10;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true,"emitDeclarationOnly":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./d.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./d.d.ts" + }, + "version": "FakeTSVersion", + "size": 1323 +} + +//// [/src/project2/src/tsconfig.tsbuildinfo] file changed its modified time + + +Change:: emit js files +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly false +[12:00:51 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:52 AM] Project 'src/project1/src/tsconfig.json' is out of date because buildinfo file 'src/project1/src/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[12:00:53 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:01:01 AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[12:01:02 AM] Building project '/src/project2/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "composite": true, + "emitDeclarationOnly": false, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "composite": true, + "emitDeclarationOnly": false, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project2/src/e.ts +/src/project1/src/a.d.ts +/src/project2/src/f.ts +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project1/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 10; +var aa = 10; + + +//// [/src/project1/src/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; + + +//// [/src/project1/src/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; + + +//// [/src/project1/src/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; + + +//// [/src/project1/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-16597586570-export const a = 10;const aLocal = 10;const aa = 10;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true,"emitDeclarationOnly":false},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./d.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": false + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./d.d.ts" + }, + "version": "FakeTSVersion", + "size": 1324 +} + +//// [/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] +{"program":{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"-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":{"composite":true,"emitDeclarationOnly":false},"fileIdsList":[[3],[5]],"referencedMap":[[4,1],[6,2]],"semanticDiagnosticsPerFile":[1,3,5,2,4,6],"latestChangedDtsFile":"./g.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileNamesList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.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 + }, + "./e.ts": { + "original": { + "version": "-13789510868-export const e = 10;", + "signature": "-4822840506-export declare const e = 10;\n" + }, + "version": "-13789510868-export const e = 10;", + "signature": "-4822840506-export declare const e = 10;\n" + }, + "../../project1/src/a.d.ts": { + "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": "-5154070489-export declare const f = 10;\n" + }, + "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": { + "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": "-5485300472-export declare const g = 10;\n" + }, + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "-5485300472-export declare const g = 10;\n" + } + }, + "root": [ + [ + 2, + "./e.ts" + ], + [ + 4, + "./f.ts" + ], + [ + 6, + "./g.ts" + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": false + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "../../project1/src/a.d.ts", + "../../project1/src/b.d.ts", + "./e.ts", + "./f.ts", + "./g.ts" + ], + "latestChangedDtsFile": "./g.d.ts" + }, + "version": "FakeTSVersion", + "size": 1345 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:01:09 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:10 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' + +[12:01:11 AM] Project 'src/project2/src/tsconfig.json' is up to date because newest input 'src/project2/src/g.ts' is older than output 'src/project2/src/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: no change run with js emit +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly false +[12:01:12 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:13 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' + +[12:01:14 AM] Project 'src/project2/src/tsconfig.json' is up to date because newest input 'src/project2/src/g.ts' is older than output 'src/project2/src/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: js emit with change +Input:: +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10;const blocal = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly false +[12:01:16 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:17 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/src/tsconfig.tsbuildinfo' is older than input 'src/project1/src/b.ts' + +[12:01:18 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:01:23 AM] Project 'src/project2/src/tsconfig.json' is up to date with .d.ts files from its dependencies + +[12:01:24 AM] Updating output timestamps of project '/src/project2/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "composite": true, + "emitDeclarationOnly": false, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project1/src/b.ts + +Shape signatures in builder refreshed for:: +/src/project1/src/b.ts (computed .d.ts) + + +//// [/src/project1/src/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; +var blocal = 10; + + +//// [/src/project1/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-16597586570-export const a = 10;const aLocal = 10;const aa = 10;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"2355059555-export const b = 10;const bLocal = 10;const blocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true,"emitDeclarationOnly":false},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./d.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "2355059555-export const b = 10;const bLocal = 10;const blocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "2355059555-export const b = 10;const bLocal = 10;const blocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": false + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./d.d.ts" + }, + "version": "FakeTSVersion", + "size": 1341 +} + +//// [/src/project2/src/tsconfig.tsbuildinfo] file changed its modified time diff --git a/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-discrepancies.js b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-discrepancies.js new file mode 100644 index 0000000000000..2db23759dbebb --- /dev/null +++ b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-discrepancies.js @@ -0,0 +1,370 @@ +4:: no-change-run +Clean build tsbuildinfo for both projects will have compilerOptions with composite and emitDeclarationOnly +Incremental build will detect that it doesnt need to rebuild so tsbuild info for projects is from before which has option composite only +TsBuild info text without affectedFilesPendingEmit:: /src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +TsBuild info text without affectedFilesPendingEmit:: /src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./e.ts": { + "version": "-13789510868-export const e = 10;" + }, + "../../project1/src/a.d.ts": { + "version": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "./f.ts": { + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;" + }, + "../../project1/src/b.d.ts": { + "version": "-3829150557-export declare const b = 10;\n" + }, + "./g.ts": { + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;" + } + }, + "root": [ + [ + 2, + "./e.ts" + ], + [ + 4, + "./f.ts" + ], + [ + 6, + "./g.ts" + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "../../project1/src/a.d.ts", + "../../project1/src/b.d.ts", + "./e.ts", + "./f.ts", + "./g.ts" + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./e.ts": { + "version": "-13789510868-export const e = 10;" + }, + "../../project1/src/a.d.ts": { + "version": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "./f.ts": { + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;" + }, + "../../project1/src/b.d.ts": { + "version": "-3829150557-export declare const b = 10;\n" + }, + "./g.ts": { + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;" + } + }, + "root": [ + [ + 2, + "./e.ts" + ], + [ + 4, + "./f.ts" + ], + [ + 6, + "./g.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "../../project1/src/a.d.ts", + "../../project1/src/b.d.ts", + "./e.ts", + "./f.ts", + "./g.ts" + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +6:: local change +Clean build tsbuildinfo for project2 will have compilerOptions with composite and emitDeclarationOnly +Incremental build will detect that it doesnt need to rebuild project2 so tsbuildinfo for it is from before which has option composite only +TsBuild info text without affectedFilesPendingEmit:: /src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./e.ts": { + "version": "-13789510868-export const e = 10;" + }, + "../../project1/src/a.d.ts": { + "version": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "./f.ts": { + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;" + }, + "../../project1/src/b.d.ts": { + "version": "-3829150557-export declare const b = 10;\n" + }, + "./g.ts": { + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;" + } + }, + "root": [ + [ + 2, + "./e.ts" + ], + [ + 4, + "./f.ts" + ], + [ + 6, + "./g.ts" + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "../../project1/src/a.d.ts", + "../../project1/src/b.d.ts", + "./e.ts", + "./f.ts", + "./g.ts" + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./e.ts": { + "version": "-13789510868-export const e = 10;" + }, + "../../project1/src/a.d.ts": { + "version": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "./f.ts": { + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;" + }, + "../../project1/src/b.d.ts": { + "version": "-3829150557-export declare const b = 10;\n" + }, + "./g.ts": { + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;" + } + }, + "root": [ + [ + 2, + "./e.ts" + ], + [ + 4, + "./f.ts" + ], + [ + 6, + "./g.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "../../project1/src/a.d.ts", + "../../project1/src/b.d.ts", + "./e.ts", + "./f.ts", + "./g.ts" + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-declaration-and-incremental-discrepancies.js b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-declaration-and-incremental-discrepancies.js new file mode 100644 index 0000000000000..30b1333bed8d7 --- /dev/null +++ b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-declaration-and-incremental-discrepancies.js @@ -0,0 +1,364 @@ +4:: no-change-run +Clean build tsbuildinfo for both projects will have compilerOptions with composite and emitDeclarationOnly +Incremental build will detect that it doesnt need to rebuild so tsbuild info for projects is from before which has option composite only +TsBuild info text without affectedFilesPendingEmit:: /src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion" +} +TsBuild info text without affectedFilesPendingEmit:: /src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./e.ts": { + "version": "-13789510868-export const e = 10;" + }, + "../../project1/src/a.d.ts": { + "version": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "./f.ts": { + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;" + }, + "../../project1/src/b.d.ts": { + "version": "-3829150557-export declare const b = 10;\n" + }, + "./g.ts": { + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;" + } + }, + "root": [ + [ + 2, + "./e.ts" + ], + [ + 4, + "./f.ts" + ], + [ + 6, + "./g.ts" + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../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" + ] + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./e.ts": { + "version": "-13789510868-export const e = 10;" + }, + "../../project1/src/a.d.ts": { + "version": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "./f.ts": { + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;" + }, + "../../project1/src/b.d.ts": { + "version": "-3829150557-export declare const b = 10;\n" + }, + "./g.ts": { + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;" + } + }, + "root": [ + [ + 2, + "./e.ts" + ], + [ + 4, + "./f.ts" + ], + [ + 6, + "./g.ts" + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../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" + ] + }, + "version": "FakeTSVersion" +} +6:: local change +Clean build tsbuildinfo for project2 will have compilerOptions with composite and emitDeclarationOnly +Incremental build will detect that it doesnt need to rebuild project2 so tsbuildinfo for it is from before which has option composite only +TsBuild info text without affectedFilesPendingEmit:: /src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./e.ts": { + "version": "-13789510868-export const e = 10;" + }, + "../../project1/src/a.d.ts": { + "version": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "./f.ts": { + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;" + }, + "../../project1/src/b.d.ts": { + "version": "-3829150557-export declare const b = 10;\n" + }, + "./g.ts": { + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;" + } + }, + "root": [ + [ + 2, + "./e.ts" + ], + [ + 4, + "./f.ts" + ], + [ + 6, + "./g.ts" + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../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" + ] + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./e.ts": { + "version": "-13789510868-export const e = 10;" + }, + "../../project1/src/a.d.ts": { + "version": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "./f.ts": { + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;" + }, + "../../project1/src/b.d.ts": { + "version": "-3829150557-export declare const b = 10;\n" + }, + "./g.ts": { + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;" + } + }, + "root": [ + [ + 2, + "./e.ts" + ], + [ + 4, + "./f.ts" + ], + [ + 6, + "./g.ts" + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../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" + ] + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-declaration-and-incremental-with-outFile-discrepancies.js b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-declaration-and-incremental-with-outFile-discrepancies.js new file mode 100644 index 0000000000000..dd6ccad41597c --- /dev/null +++ b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-declaration-and-incremental-with-outFile-discrepancies.js @@ -0,0 +1,69 @@ +4:: no-change-run +Clean build tsbuildinfo for both projects will have compilerOptions with composite and emitDeclarationOnly +Incremental build will detect that it doesnt need to rebuild so tsbuild info for projects is from before which has option composite only +TsBuild info text without affectedFilesPendingEmit:: /src/project1/outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "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; };", + "./src/a.ts": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "./src/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "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; };", + "./src/a.ts": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "./src/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-declaration-and-incremental-with-outFile.js b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-declaration-and-incremental-with-outFile.js new file mode 100644 index 0000000000000..0e004c1873b11 --- /dev/null +++ b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-declaration-and-incremental-with-outFile.js @@ -0,0 +1,1389 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project1/src/a.ts] +export const a = 10;const aLocal = 10; + +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10; + +//// [/src/project1/src/c.ts] +import { a } from "./a";export const c = a; + +//// [/src/project1/src/d.ts] +import { b } from "./b";export const d = b; + +//// [/src/project1/src/tsconfig.json] +{ + "compilerOptions": { + "incremental": true, + "declaration": true, + "outFile": "../outFile.js", + "module": "amd" + } +} + +//// [/src/project2/src/e.ts] +export const e = 10; + +//// [/src/project2/src/f.ts] +import { a } from "a"; export const f = a; + +//// [/src/project2/src/g.ts] +import { b } from "b"; export const g = b; + +//// [/src/project2/src/tsconfig.json] +{ + "compilerOptions": { + "incremental": true, + "declaration": true, + "outFile": "../outFile.js", + "module": "amd" + }, + "references": [ + { + "path": "../../project1/src" + } + ] +} + + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:00:19 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:20 AM] Project 'src/project1/src/tsconfig.json' is out of date because output file 'src/project1/outFile.tsbuildinfo' does not exist + +[12:00:21 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:00:26 AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.tsbuildinfo' does not exist + +[12:00:27 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:9:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + + 9 { +   ~ +10 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +11 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project1/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project2/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/outFile.d.ts +/src/project2/src/e.ts +/src/project2/src/f.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/outFile.d.ts] +declare module "a" { + export const a = 10; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c = 10; +} +declare module "d" { + export const d = 10; +} + + +//// [/src/project1/outFile.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts","./src/d.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; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"declaration":true,"emitDeclarationOnly":true,"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ], + "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; };", + "./src/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./src/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 917 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:00:28 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:29 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' + +[12:00:30 AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.tsbuildinfo' does not exist + +[12:00:31 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:9:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + + 9 { +   ~ +10 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +11 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project2/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/outFile.d.ts +/src/project2/src/e.ts +/src/project2/src/f.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: local change +Input:: +//// [/src/project1/src/a.ts] +export const a = 10;const aLocal = 10;const aa = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:00:33 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:34 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/outFile.tsbuildinfo' is older than input 'src/project1/src/a.ts' + +[12:00:35 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:00:40 AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.tsbuildinfo' does not exist + +[12:00:41 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:9:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + + 9 { +   ~ +10 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +11 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project1/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project2/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/outFile.d.ts +/src/project2/src/e.ts +/src/project2/src/f.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/outFile.d.ts] file written with same contents +//// [/src/project1/outFile.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts","./src/d.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; };","-16597586570-export const a = 10;const aLocal = 10;const aa = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"declaration":true,"emitDeclarationOnly":true,"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ], + "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; };", + "./src/a.ts": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "./src/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 931 +} + + + +Change:: non local change +Input:: +//// [/src/project1/src/a.ts] +export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:00:43 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:44 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/outFile.tsbuildinfo' is older than input 'src/project1/src/a.ts' + +[12:00:45 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:00:50 AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.tsbuildinfo' does not exist + +[12:00:51 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:9:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + + 9 { +   ~ +10 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +11 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project1/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project2/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/outFile.d.ts +/src/project2/src/e.ts +/src/project2/src/f.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/outFile.d.ts] +declare module "a" { + export const a = 10; + export const aaa = 10; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c = 10; +} +declare module "d" { + export const d = 10; +} + + +//// [/src/project1/outFile.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts","./src/d.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; };","-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"declaration":true,"emitDeclarationOnly":true,"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ], + "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; };", + "./src/a.ts": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "./src/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 952 +} + + + +Change:: emit js files +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:00:52 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:53 AM] Project 'src/project1/src/tsconfig.json' is out of date because buildinfo file 'src/project1/outFile.tsbuildinfo' indicates there is change in compilerOptions + +[12:00:54 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:00:59 AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.tsbuildinfo' does not exist + +[12:01:00 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:9:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + + 9 { +   ~ +10 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +11 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project1/outFile.js", + "module": 2, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project2/outFile.js", + "module": 2, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/outFile.d.ts +/src/project2/src/e.ts +/src/project2/src/f.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.aaa = exports.a = void 0; + exports.a = 10; + var aLocal = 10; + var aa = 10; + exports.aaa = 10; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); + + +//// [/src/project1/outFile.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts","./src/d.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; };","-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ], + "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; };", + "./src/a.ts": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "./src/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 925 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:01:01 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:02 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' + +[12:01:03 AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.tsbuildinfo' does not exist + +[12:01:04 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:9:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + + 9 { +   ~ +10 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +11 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project2/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/outFile.d.ts +/src/project2/src/e.ts +/src/project2/src/f.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: js emit with change without emitDeclarationOnly +Input:: +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10;const alocal = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:01:06 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:07 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/outFile.tsbuildinfo' is older than input 'src/project1/src/b.ts' + +[12:01:08 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:01:14 AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.tsbuildinfo' does not exist + +[12:01:15 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:9:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + + 9 { +   ~ +10 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +11 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project1/outFile.js", + "module": 2, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project2/outFile.js", + "module": 2, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/outFile.d.ts +/src/project2/src/e.ts +/src/project2/src/f.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/outFile.d.ts] file written with same contents +//// [/src/project1/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.aaa = exports.a = void 0; + exports.a = 10; + var aLocal = 10; + var aa = 10; + exports.aaa = 10; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; + var alocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); + + +//// [/src/project1/outFile.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts","./src/d.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; };","-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","-2761163262-export const b = 10;const bLocal = 10;const alocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ], + "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; };", + "./src/a.ts": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "./src/b.ts": "-2761163262-export const b = 10;const bLocal = 10;const alocal = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 943 +} + + + +Change:: local change +Input:: +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:01:17 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:18 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/outFile.tsbuildinfo' is older than input 'src/project1/src/b.ts' + +[12:01:19 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:01:24 AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.tsbuildinfo' does not exist + +[12:01:25 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:9:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + + 9 { +   ~ +10 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +11 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project1/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project2/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/outFile.d.ts +/src/project2/src/e.ts +/src/project2/src/f.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/outFile.d.ts] file written with same contents +//// [/src/project1/outFile.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts","./src/d.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; };","-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","-3037017594-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"declaration":true,"emitDeclarationOnly":true,"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ], + "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; };", + "./src/a.ts": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "./src/b.ts": "-3037017594-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 986 +} + + + +Change:: non local change +Input:: +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:01:27 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:28 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/outFile.tsbuildinfo' is older than input 'src/project1/src/b.ts' + +[12:01:29 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:01:34 AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.tsbuildinfo' does not exist + +[12:01:35 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:9:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + + 9 { +   ~ +10 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +11 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project1/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project2/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/outFile.d.ts +/src/project2/src/e.ts +/src/project2/src/f.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/outFile.d.ts] +declare module "a" { + export const a = 10; + export const aaa = 10; +} +declare module "b" { + export const b = 10; + export const aaaaa = 10; +} +declare module "c" { + export const c = 10; +} +declare module "d" { + export const d = 10; +} + + +//// [/src/project1/outFile.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts","./src/d.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; };","-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","-7233149715-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"declaration":true,"emitDeclarationOnly":true,"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ], + "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; };", + "./src/a.ts": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "./src/b.ts": "-7233149715-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 1010 +} + + + +Change:: js emit with change without emitDeclarationOnly +Input:: +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;export const a2 = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:01:37 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:38 AM] Project 'src/project1/src/tsconfig.json' is out of date because buildinfo file 'src/project1/outFile.tsbuildinfo' indicates there is change in compilerOptions + +[12:01:39 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:01:45 AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.tsbuildinfo' does not exist + +[12:01:46 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:9:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + + 9 { +   ~ +10 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +11 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project1/outFile.js", + "module": 2, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "outFile": "/src/project2/outFile.js", + "module": 2, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/outFile.d.ts +/src/project2/src/e.ts +/src/project2/src/f.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/outFile.d.ts] +declare module "a" { + export const a = 10; + export const aaa = 10; +} +declare module "b" { + export const b = 10; + export const aaaaa = 10; + export const a2 = 10; +} +declare module "c" { + export const c = 10; +} +declare module "d" { + export const d = 10; +} + + +//// [/src/project1/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.aaa = exports.a = void 0; + exports.a = 10; + var aLocal = 10; + var aa = 10; + exports.aaa = 10; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a2 = exports.aaaaa = exports.b = void 0; + exports.b = 10; + var bLocal = 10; + var alocal = 10; + var aaaa = 10; + exports.aaaaa = 10; + exports.a2 = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); + + +//// [/src/project1/outFile.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts","./src/d.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; };","-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","-18124257118-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;export const a2 = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ], + "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; };", + "./src/a.ts": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "./src/b.ts": "-18124257118-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;export const a2 = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 1005 +} + diff --git a/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-declaration-and-incremental.js b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-declaration-and-incremental.js new file mode 100644 index 0000000000000..f940f4cfd561d --- /dev/null +++ b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-declaration-and-incremental.js @@ -0,0 +1,2305 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project1/src/a.ts] +export const a = 10;const aLocal = 10; + +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10; + +//// [/src/project1/src/c.ts] +import { a } from "./a";export const c = a; + +//// [/src/project1/src/d.ts] +import { b } from "./b";export const d = b; + +//// [/src/project1/src/tsconfig.json] +{ + "compilerOptions": { + "incremental": true, + "declaration": true + } +} + +//// [/src/project2/src/e.ts] +export const e = 10; + +//// [/src/project2/src/f.ts] +import { a } from "../../project1/src/a"; export const f = a; + +//// [/src/project2/src/g.ts] +import { b } from "../../project1/src/b"; export const g = b; + +//// [/src/project2/src/tsconfig.json] +{ + "compilerOptions": { + "incremental": true, + "declaration": true + }, + "references": [ + { + "path": "../../project1/src" + } + ] +} + + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:00:19 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:20 AM] Project 'src/project1/src/tsconfig.json' is out of date because output file 'src/project1/src/tsconfig.tsbuildinfo' does not exist + +[12:00:21 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:00:29 AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/src/tsconfig.tsbuildinfo' does not exist + +[12:00:30 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:7:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + +7 { +   ~ +8 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +9 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project1/src/a.ts (computed .d.ts during emit) +/src/project1/src/b.ts (computed .d.ts during emit) +/src/project1/src/c.ts (computed .d.ts during emit) +/src/project1/src/d.ts (computed .d.ts during emit) + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project2/src/e.ts +/src/project1/src/a.d.ts +/src/project2/src/f.ts +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/src/a.d.ts] +export declare const a = 10; + + +//// [/src/project1/src/b.d.ts] +export declare const b = 10; + + +//// [/src/project1/src/c.d.ts] +export declare const c = 10; + + +//// [/src/project1/src/d.d.ts] +export declare const d = 10; + + +//// [/src/project1/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-18487752940-export const a = 10;const aLocal = 10;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"declaration":true,"emitDeclarationOnly":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1277 +} + +//// [/src/project2/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"-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},"fileIdsList":[[3],[5]],"referencedMap":[[4,1],[6,2]],"changeFileSet":[1,3,5,2,4,6]},"version":"FakeTSVersion"} + +//// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileNamesList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.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; };", + "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; };", + "affectsGlobalScope": true + }, + "./e.ts": { + "original": { + "version": "-13789510868-export const e = 10;", + "signature": false + }, + "version": "-13789510868-export const e = 10;" + }, + "../../project1/src/a.d.ts": { + "original": { + "version": "-3497920574-export declare const a = 10;\n", + "signature": false + }, + "version": "-3497920574-export declare const a = 10;\n" + }, + "./f.ts": { + "original": { + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": false + }, + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;" + }, + "../../project1/src/b.d.ts": { + "original": { + "version": "-3829150557-export declare const b = 10;\n", + "signature": false + }, + "version": "-3829150557-export declare const b = 10;\n" + }, + "./g.ts": { + "original": { + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": false + }, + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;" + } + }, + "root": [ + [ + 2, + "./e.ts" + ], + [ + 4, + "./f.ts" + ], + [ + 6, + "./g.ts" + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../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" + ] + }, + "version": "FakeTSVersion", + "size": 1260 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:00:34 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:35 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' + +[12:00:36 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 + +[12:00:37 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:7:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + +7 { +   ~ +8 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +9 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project2/src/e.ts +/src/project1/src/a.d.ts +/src/project2/src/f.ts +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: local change +Input:: +//// [/src/project1/src/a.ts] +export const a = 10;const aLocal = 10;const aa = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:00:39 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:40 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/src/tsconfig.tsbuildinfo' is older than input 'src/project1/src/a.ts' + +[12:00:41 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:00:46 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 + +[12:00:47 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:7:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + +7 { +   ~ +8 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +9 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project1/src/a.ts + +Shape signatures in builder refreshed for:: +/src/project1/src/a.ts (computed .d.ts) + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project2/src/e.ts +/src/project1/src/a.d.ts +/src/project2/src/f.ts +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/src/a.d.ts] file written with same contents +//// [/src/project1/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-16597586570-export const a = 10;const aLocal = 10;const aa = 10;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"declaration":true,"emitDeclarationOnly":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1291 +} + + + +Change:: non local change +Input:: +//// [/src/project1/src/a.ts] +export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:00:49 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:50 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/src/tsconfig.tsbuildinfo' is older than input 'src/project1/src/a.ts' + +[12:00:51 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:00:57 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 + +[12:00:58 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:7:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + +7 { +   ~ +8 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +9 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project1/src/a.ts +/src/project1/src/c.ts + +Shape signatures in builder refreshed for:: +/src/project1/src/a.ts (computed .d.ts) +/src/project1/src/c.ts (computed .d.ts) + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project2/src/e.ts +/src/project1/src/a.d.ts +/src/project2/src/f.ts +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/src/a.d.ts] +export declare const a = 10; +export declare const aaa = 10; + + +//// [/src/project1/src/c.d.ts] file written with same contents +//// [/src/project1/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","signature":"-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"declaration":true,"emitDeclarationOnly":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "version": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1344 +} + +//// [/src/project2/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"-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},"fileIdsList":[[3],[5]],"referencedMap":[[4,1],[6,2]],"changeFileSet":[1,3,5,2,4,6]},"version":"FakeTSVersion"} + +//// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileNamesList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.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; };", + "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; };", + "affectsGlobalScope": true + }, + "./e.ts": { + "original": { + "version": "-13789510868-export const e = 10;", + "signature": false + }, + "version": "-13789510868-export const e = 10;" + }, + "../../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" + }, + "./f.ts": { + "original": { + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": false + }, + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;" + }, + "../../project1/src/b.d.ts": { + "original": { + "version": "-3829150557-export declare const b = 10;\n", + "signature": false + }, + "version": "-3829150557-export declare const b = 10;\n" + }, + "./g.ts": { + "original": { + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": false + }, + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;" + } + }, + "root": [ + [ + 2, + "./e.ts" + ], + [ + 4, + "./f.ts" + ], + [ + 6, + "./g.ts" + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../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" + ] + }, + "version": "FakeTSVersion", + "size": 1292 +} + + + +Change:: emit js files +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:01:02 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:03 AM] Project 'src/project1/src/tsconfig.json' is out of date because buildinfo file 'src/project1/src/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[12:01:04 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:01:12 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 + +[12:01:13 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:7:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + +7 { +   ~ +8 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +9 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project2/src/e.ts +/src/project1/src/a.d.ts +/src/project2/src/f.ts +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.aaa = exports.a = void 0; +exports.a = 10; +var aLocal = 10; +var aa = 10; +exports.aaa = 10; + + +//// [/src/project1/src/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; + + +//// [/src/project1/src/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; + + +//// [/src/project1/src/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; + + +//// [/src/project1/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","signature":"-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"declaration":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "version": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1317 +} + +//// [/src/project2/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"-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},"fileIdsList":[[3],[5]],"referencedMap":[[4,1],[6,2]],"changeFileSet":[1,3,5,2,4,6]},"version":"FakeTSVersion"} + +//// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileNamesList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.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; };", + "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; };", + "affectsGlobalScope": true + }, + "./e.ts": { + "original": { + "version": "-13789510868-export const e = 10;", + "signature": false + }, + "version": "-13789510868-export const e = 10;" + }, + "../../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" + }, + "./f.ts": { + "original": { + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": false + }, + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;" + }, + "../../project1/src/b.d.ts": { + "original": { + "version": "-3829150557-export declare const b = 10;\n", + "signature": false + }, + "version": "-3829150557-export declare const b = 10;\n" + }, + "./g.ts": { + "original": { + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": false + }, + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;" + } + }, + "root": [ + [ + 2, + "./e.ts" + ], + [ + 4, + "./f.ts" + ], + [ + 6, + "./g.ts" + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../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" + ] + }, + "version": "FakeTSVersion", + "size": 1265 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:01:17 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:18 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' + +[12:01:19 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 + +[12:01:20 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:7:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + +7 { +   ~ +8 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +9 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project2/src/e.ts +/src/project1/src/a.d.ts +/src/project2/src/f.ts +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: js emit with change without emitDeclarationOnly +Input:: +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10;const alocal = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:01:22 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:23 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/src/tsconfig.tsbuildinfo' is older than input 'src/project1/src/b.ts' + +[12:01:24 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:01:30 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 + +[12:01:31 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:7:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + +7 { +   ~ +8 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +9 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project1/src/b.ts + +Shape signatures in builder refreshed for:: +/src/project1/src/b.ts (computed .d.ts) + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project2/src/e.ts +/src/project1/src/a.d.ts +/src/project2/src/f.ts +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/src/b.d.ts] file written with same contents +//// [/src/project1/src/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; +var alocal = 10; + + +//// [/src/project1/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","signature":"-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n"},{"version":"-2761163262-export const b = 10;const bLocal = 10;const alocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"declaration":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "version": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-2761163262-export const b = 10;const bLocal = 10;const alocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-2761163262-export const b = 10;const bLocal = 10;const alocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1335 +} + + + +Change:: local change +Input:: +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:01:33 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:34 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/src/tsconfig.tsbuildinfo' is older than input 'src/project1/src/b.ts' + +[12:01:35 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:01:40 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 + +[12:01:41 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:7:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + +7 { +   ~ +8 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +9 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project1/src/b.ts + +Shape signatures in builder refreshed for:: +/src/project1/src/b.ts (computed .d.ts) + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project2/src/e.ts +/src/project1/src/a.d.ts +/src/project2/src/f.ts +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/src/b.d.ts] file written with same contents +//// [/src/project1/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","signature":"-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n"},{"version":"-3037017594-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"declaration":true,"emitDeclarationOnly":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "version": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-3037017594-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-3037017594-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1378 +} + + + +Change:: non local change +Input:: +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:01:43 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:44 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/src/tsconfig.tsbuildinfo' is older than input 'src/project1/src/b.ts' + +[12:01:45 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:01:51 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 + +[12:01:52 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:7:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + +7 { +   ~ +8 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +9 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project1/src/b.ts +/src/project1/src/d.ts + +Shape signatures in builder refreshed for:: +/src/project1/src/b.ts (computed .d.ts) +/src/project1/src/d.ts (computed .d.ts) + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project2/src/e.ts +/src/project1/src/a.d.ts +/src/project2/src/f.ts +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/src/b.d.ts] +export declare const b = 10; +export declare const aaaaa = 10; + + +//// [/src/project1/src/d.d.ts] file written with same contents +//// [/src/project1/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","signature":"-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n"},{"version":"-7233149715-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;","signature":"2661550180-export declare const b = 10;\nexport declare const aaaaa = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"declaration":true,"emitDeclarationOnly":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "version": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-7233149715-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;", + "signature": "2661550180-export declare const b = 10;\nexport declare const aaaaa = 10;\n" + }, + "version": "-7233149715-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;", + "signature": "2661550180-export declare const b = 10;\nexport declare const aaaaa = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1435 +} + +//// [/src/project2/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"-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},"fileIdsList":[[3],[5]],"referencedMap":[[4,1],[6,2]],"changeFileSet":[1,3,5,2,4,6]},"version":"FakeTSVersion"} + +//// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileNamesList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.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; };", + "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; };", + "affectsGlobalScope": true + }, + "./e.ts": { + "original": { + "version": "-13789510868-export const e = 10;", + "signature": false + }, + "version": "-13789510868-export const e = 10;" + }, + "../../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" + }, + "./f.ts": { + "original": { + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": false + }, + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;" + }, + "../../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" + }, + "./g.ts": { + "original": { + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": false + }, + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;" + } + }, + "root": [ + [ + 2, + "./e.ts" + ], + [ + 4, + "./f.ts" + ], + [ + 6, + "./g.ts" + ] + ], + "options": { + "declaration": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../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" + ] + }, + "version": "FakeTSVersion", + "size": 1325 +} + + + +Change:: js emit with change without emitDeclarationOnly +Input:: +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;export const a2 = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:01:57 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:58 AM] Project 'src/project1/src/tsconfig.json' is out of date because buildinfo file 'src/project1/src/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[12:01:59 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:02:09 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 + +[12:02:10 AM] Building project '/src/project2/src/tsconfig.json'... + +src/project2/src/tsconfig.json:7:5 - error TS6306: Referenced project '/src/project1/src' must have setting "composite": true. + +7 { +   ~ +8 "path": "../../project1/src" +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +9 } +  ~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project1/src/b.ts +/src/project1/src/d.ts + +Shape signatures in builder refreshed for:: +/src/project1/src/b.ts (computed .d.ts) +/src/project1/src/d.ts (computed .d.ts) + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "incremental": true, + "declaration": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project2/src/e.ts +/src/project1/src/a.d.ts +/src/project2/src/f.ts +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/src/a.js] file written with same contents +//// [/src/project1/src/b.d.ts] +export declare const b = 10; +export declare const aaaaa = 10; +export declare const a2 = 10; + + +//// [/src/project1/src/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a2 = exports.aaaaa = exports.b = void 0; +exports.b = 10; +var bLocal = 10; +var alocal = 10; +var aaaa = 10; +exports.aaaaa = 10; +exports.a2 = 10; + + +//// [/src/project1/src/c.js] file written with same contents +//// [/src/project1/src/d.d.ts] file written with same contents +//// [/src/project1/src/d.js] file written with same contents +//// [/src/project1/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","signature":"-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n"},{"version":"-18124257118-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;export const a2 = 10;","signature":"-2237944013-export declare const b = 10;\nexport declare const aaaaa = 10;\nexport declare const a2 = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"declaration":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "version": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-18124257118-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;export const a2 = 10;", + "signature": "-2237944013-export declare const b = 10;\nexport declare const aaaaa = 10;\nexport declare const a2 = 10;\n" + }, + "version": "-18124257118-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;export const a2 = 10;", + "signature": "-2237944013-export declare const b = 10;\nexport declare const aaaaa = 10;\nexport declare const a2 = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1462 +} + +//// [/src/project2/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"-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},"fileIdsList":[[3],[5]],"referencedMap":[[4,1],[6,2]],"changeFileSet":[1,3,5,2,4,6]},"version":"FakeTSVersion"} + +//// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileNamesList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.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; };", + "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; };", + "affectsGlobalScope": true + }, + "./e.ts": { + "original": { + "version": "-13789510868-export const e = 10;", + "signature": false + }, + "version": "-13789510868-export const e = 10;" + }, + "../../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" + }, + "./f.ts": { + "original": { + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;", + "signature": false + }, + "version": "-2015135303-import { a } from \"../../project1/src/a\"; export const f = a;" + }, + "../../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" + }, + "./g.ts": { + "original": { + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": false + }, + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;" + } + }, + "root": [ + [ + 2, + "./e.ts" + ], + [ + 4, + "./f.ts" + ], + [ + 6, + "./g.ts" + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../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" + ] + }, + "version": "FakeTSVersion", + "size": 1330 +} + diff --git a/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-outFile-discrepancies.js b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-outFile-discrepancies.js new file mode 100644 index 0000000000000..98ac704ddf1db --- /dev/null +++ b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-outFile-discrepancies.js @@ -0,0 +1,212 @@ +4:: no-change-run +Clean build tsbuildinfo for both projects will have compilerOptions with composite and emitDeclarationOnly +Incremental build will detect that it doesnt need to rebuild so tsbuild info for projects is from before which has option composite only +TsBuild info text without affectedFilesPendingEmit:: /src/project1/outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "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; };", + "./src/a.ts": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "./src/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "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", + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "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; };", + "./src/a.ts": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "./src/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "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", + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +TsBuild info text without affectedFilesPendingEmit:: /src/project2/outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "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; };", + "../project1/outfile.d.ts": "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", + "./src/e.ts": "-13789510868-export const e = 10;", + "./src/f.ts": "-4849089835-import { a } from \"a\"; export const f = a;", + "./src/g.ts": "-18341999015-import { b } from \"b\"; export const g = b;" + }, + "root": [ + [ + [ + 3, + 5 + ], + [ + "./src/e.ts", + "./src/f.ts", + "./src/g.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-12964815745-declare module \"e\" {\n export const e = 10;\n}\ndeclare module \"f\" {\n export const f = 10;\n}\ndeclare module \"g\" {\n export const g = 10;\n}\n", + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "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; };", + "../project1/outfile.d.ts": "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", + "./src/e.ts": "-13789510868-export const e = 10;", + "./src/f.ts": "-4849089835-import { a } from \"a\"; export const f = a;", + "./src/g.ts": "-18341999015-import { b } from \"b\"; export const g = b;" + }, + "root": [ + [ + [ + 3, + 5 + ], + [ + "./src/e.ts", + "./src/f.ts", + "./src/g.ts" + ] + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-12964815745-declare module \"e\" {\n export const e = 10;\n}\ndeclare module \"f\" {\n export const f = 10;\n}\ndeclare module \"g\" {\n export const g = 10;\n}\n", + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +6:: local change +Clean build tsbuildinfo for project2 will have compilerOptions with composite and emitDeclarationOnly +Incremental build will detect that it doesnt need to rebuild project2 so tsbuildinfo for it is from before which has option composite only +TsBuild info text without affectedFilesPendingEmit:: /src/project2/outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "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; };", + "../project1/outfile.d.ts": "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", + "./src/e.ts": "-13789510868-export const e = 10;", + "./src/f.ts": "-4849089835-import { a } from \"a\"; export const f = a;", + "./src/g.ts": "-18341999015-import { b } from \"b\"; export const g = b;" + }, + "root": [ + [ + [ + 3, + 5 + ], + [ + "./src/e.ts", + "./src/f.ts", + "./src/g.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-12964815745-declare module \"e\" {\n export const e = 10;\n}\ndeclare module \"f\" {\n export const f = 10;\n}\ndeclare module \"g\" {\n export const g = 10;\n}\n", + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "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; };", + "../project1/outfile.d.ts": "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", + "./src/e.ts": "-13789510868-export const e = 10;", + "./src/f.ts": "-4849089835-import { a } from \"a\"; export const f = a;", + "./src/g.ts": "-18341999015-import { b } from \"b\"; export const g = b;" + }, + "root": [ + [ + [ + 3, + 5 + ], + [ + "./src/e.ts", + "./src/f.ts", + "./src/g.ts" + ] + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-12964815745-declare module \"e\" {\n export const e = 10;\n}\ndeclare module \"f\" {\n export const f = 10;\n}\ndeclare module \"g\" {\n export const g = 10;\n}\n", + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-outFile.js b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-outFile.js new file mode 100644 index 0000000000000..92d792bb8137a --- /dev/null +++ b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline-with-outFile.js @@ -0,0 +1,1406 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project1/src/a.ts] +export const a = 10;const aLocal = 10; + +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10; + +//// [/src/project1/src/c.ts] +import { a } from "./a";export const c = a; + +//// [/src/project1/src/d.ts] +import { b } from "./b";export const d = b; + +//// [/src/project1/src/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "outFile": "../outFile.js", + "module": "amd" + } +} + +//// [/src/project2/src/e.ts] +export const e = 10; + +//// [/src/project2/src/f.ts] +import { a } from "a"; export const f = a; + +//// [/src/project2/src/g.ts] +import { b } from "b"; export const g = b; + +//// [/src/project2/src/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "outFile": "../outFile.js", + "module": "amd" + }, + "references": [ + { + "path": "../../project1/src" + } + ] +} + + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:00:19 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:20 AM] Project 'src/project1/src/tsconfig.json' is out of date because output file 'src/project1/outFile.tsbuildinfo' does not exist + +[12:00:21 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:00:26 AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/outFile.tsbuildinfo' does not exist + +[12:00:27 AM] Building project '/src/project2/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/project1/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "composite": true, + "outFile": "/src/project2/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/outFile.d.ts +/src/project2/src/e.ts +/src/project2/src/f.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/outFile.d.ts] +declare module "a" { + export const a = 10; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c = 10; +} +declare module "d" { + export const d = 10; +} + + +//// [/src/project1/outFile.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts","./src/d.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; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"emitDeclarationOnly":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ], + "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; };", + "./src/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./src/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1198 +} + +//// [/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] +{"program":{"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":{"composite":true,"emitDeclarationOnly":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-12964815745-declare module \"e\" {\n export const e = 10;\n}\ndeclare module \"f\" {\n export const f = 10;\n}\ndeclare module \"g\" {\n export const g = 10;\n}\n","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../project1/outfile.d.ts", + "./src/e.ts", + "./src/f.ts", + "./src/g.ts" + ], + "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; };", + "../project1/outfile.d.ts": "-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", + "./src/e.ts": "-13789510868-export const e = 10;", + "./src/f.ts": "-4849089835-import { a } from \"a\"; export const f = a;", + "./src/g.ts": "-18341999015-import { b } from \"b\"; export const g = b;" + }, + "root": [ + [ + [ + 3, + 5 + ], + [ + "./src/e.ts", + "./src/f.ts", + "./src/g.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-12964815745-declare module \"e\" {\n export const e = 10;\n}\ndeclare module \"f\" {\n export const f = 10;\n}\ndeclare module \"g\" {\n export const g = 10;\n}\n", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1315 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:00:32 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:33 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' + +[12:00:34 AM] Project 'src/project2/src/tsconfig.json' is up to date because newest input 'src/project2/src/g.ts' is older than output 'src/project2/outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: local change +Input:: +//// [/src/project1/src/a.ts] +export const a = 10;const aLocal = 10;const aa = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:00:36 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:37 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/outFile.tsbuildinfo' is older than input 'src/project1/src/a.ts' + +[12:00:38 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:00:42 AM] Project 'src/project2/src/tsconfig.json' is up to date with .d.ts files from its dependencies + +[12:00:43 AM] Updating output timestamps of project '/src/project2/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/project1/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/outFile.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts","./src/d.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; };","-16597586570-export const a = 10;const aLocal = 10;const aa = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"emitDeclarationOnly":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ], + "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; };", + "./src/a.ts": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "./src/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1212 +} + +//// [/src/project2/outFile.tsbuildinfo] file changed its modified time + + +Change:: non local change +Input:: +//// [/src/project1/src/a.ts] +export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:00:47 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:48 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/outFile.tsbuildinfo' is older than input 'src/project1/src/a.ts' + +[12:00:49 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:00:54 AM] Project 'src/project2/src/tsconfig.json' is out of date because output 'src/project2/outFile.tsbuildinfo' is older than input 'src/project1/src' + +[12:00:55 AM] Building project '/src/project2/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/project1/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "composite": true, + "outFile": "/src/project2/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/outFile.d.ts +/src/project2/src/e.ts +/src/project2/src/f.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/outFile.d.ts] +declare module "a" { + export const a = 10; + export const aaa = 10; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c = 10; +} +declare module "d" { + export const d = 10; +} + + +//// [/src/project1/outFile.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts","./src/d.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; };","-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"emitDeclarationOnly":true,"module":2,"outFile":"./outFile.js"},"outSignature":"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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ], + "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; };", + "./src/a.ts": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "./src/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1258 +} + +//// [/src/project2/outFile.tsbuildinfo] +{"program":{"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":{"composite":true,"emitDeclarationOnly":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-12964815745-declare module \"e\" {\n export const e = 10;\n}\ndeclare module \"f\" {\n export const f = 10;\n}\ndeclare module \"g\" {\n export const g = 10;\n}\n","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../project1/outfile.d.ts", + "./src/e.ts", + "./src/f.ts", + "./src/g.ts" + ], + "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; };", + "../project1/outfile.d.ts": "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", + "./src/e.ts": "-13789510868-export const e = 10;", + "./src/f.ts": "-4849089835-import { a } from \"a\"; export const f = a;", + "./src/g.ts": "-18341999015-import { b } from \"b\"; export const g = b;" + }, + "root": [ + [ + [ + 3, + 5 + ], + [ + "./src/e.ts", + "./src/f.ts", + "./src/g.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-12964815745-declare module \"e\" {\n export const e = 10;\n}\ndeclare module \"f\" {\n export const f = 10;\n}\ndeclare module \"g\" {\n export const g = 10;\n}\n", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1340 +} + + + +Change:: emit js files +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:00:59 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:00 AM] Project 'src/project1/src/tsconfig.json' is out of date because buildinfo file 'src/project1/outFile.tsbuildinfo' indicates there is change in compilerOptions + +[12:01:01 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:01:06 AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates there is change in compilerOptions + +[12:01:07 AM] Building project '/src/project2/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/project1/outFile.js", + "module": 2, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "composite": true, + "outFile": "/src/project2/outFile.js", + "module": 2, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/outFile.d.ts +/src/project2/src/e.ts +/src/project2/src/f.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.aaa = exports.a = void 0; + exports.a = 10; + var aLocal = 10; + var aa = 10; + exports.aaa = 10; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); + + +//// [/src/project1/outFile.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts","./src/d.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; };","-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"module":2,"outFile":"./outFile.js"},"outSignature":"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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ], + "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; };", + "./src/a.ts": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "./src/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1231 +} + +//// [/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] +{"program":{"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":{"composite":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-12964815745-declare module \"e\" {\n export const e = 10;\n}\ndeclare module \"f\" {\n export const f = 10;\n}\ndeclare module \"g\" {\n export const g = 10;\n}\n","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../project1/outfile.d.ts", + "./src/e.ts", + "./src/f.ts", + "./src/g.ts" + ], + "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; };", + "../project1/outfile.d.ts": "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", + "./src/e.ts": "-13789510868-export const e = 10;", + "./src/f.ts": "-4849089835-import { a } from \"a\"; export const f = a;", + "./src/g.ts": "-18341999015-import { b } from \"b\"; export const g = b;" + }, + "root": [ + [ + [ + 3, + 5 + ], + [ + "./src/e.ts", + "./src/f.ts", + "./src/g.ts" + ] + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-12964815745-declare module \"e\" {\n export const e = 10;\n}\ndeclare module \"f\" {\n export const f = 10;\n}\ndeclare module \"g\" {\n export const g = 10;\n}\n", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1313 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:01:12 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:13 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' + +[12:01:14 AM] Project 'src/project2/src/tsconfig.json' is up to date because newest input 'src/project2/src/g.ts' is older than output 'src/project2/outFile.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: js emit with change without emitDeclarationOnly +Input:: +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10;const alocal = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:01:16 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:17 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/outFile.tsbuildinfo' is older than input 'src/project1/src/b.ts' + +[12:01:18 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:01:23 AM] Project 'src/project2/src/tsconfig.json' is up to date with .d.ts files from its dependencies + +[12:01:24 AM] Updating output timestamps of project '/src/project2/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/project1/outFile.js", + "module": 2, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.aaa = exports.a = void 0; + exports.a = 10; + var aLocal = 10; + var aa = 10; + exports.aaa = 10; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; + var alocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); + + +//// [/src/project1/outFile.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts","./src/d.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; };","-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","-2761163262-export const b = 10;const bLocal = 10;const alocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"module":2,"outFile":"./outFile.js"},"outSignature":"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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ], + "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; };", + "./src/a.ts": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "./src/b.ts": "-2761163262-export const b = 10;const bLocal = 10;const alocal = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1249 +} + +//// [/src/project2/outFile.tsbuildinfo] file changed its modified time + + +Change:: local change +Input:: +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:01:28 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:29 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/outFile.tsbuildinfo' is older than input 'src/project1/src/b.ts' + +[12:01:30 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:01:34 AM] Project 'src/project2/src/tsconfig.json' is up to date with .d.ts files from its dependencies + +[12:01:35 AM] Updating output timestamps of project '/src/project2/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/project1/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/outFile.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts","./src/d.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; };","-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","-3037017594-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"emitDeclarationOnly":true,"module":2,"outFile":"./outFile.js"},"outSignature":"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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ], + "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; };", + "./src/a.ts": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "./src/b.ts": "-3037017594-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1292 +} + +//// [/src/project2/outFile.tsbuildinfo] file changed its modified time + + +Change:: non local change +Input:: +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:01:39 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:40 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/outFile.tsbuildinfo' is older than input 'src/project1/src/b.ts' + +[12:01:41 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:01:46 AM] Project 'src/project2/src/tsconfig.json' is out of date because output 'src/project2/outFile.tsbuildinfo' is older than input 'src/project1/src' + +[12:01:47 AM] Building project '/src/project2/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/project1/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "composite": true, + "outFile": "/src/project2/outFile.js", + "module": 2, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/outFile.d.ts +/src/project2/src/e.ts +/src/project2/src/f.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/outFile.d.ts] +declare module "a" { + export const a = 10; + export const aaa = 10; +} +declare module "b" { + export const b = 10; + export const aaaaa = 10; +} +declare module "c" { + export const c = 10; +} +declare module "d" { + export const d = 10; +} + + +//// [/src/project1/outFile.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts","./src/d.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; };","-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","-7233149715-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"emitDeclarationOnly":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ], + "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; };", + "./src/a.ts": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "./src/b.ts": "-7233149715-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1348 +} + +//// [/src/project2/outFile.tsbuildinfo] +{"program":{"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":{"composite":true,"emitDeclarationOnly":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-12964815745-declare module \"e\" {\n export const e = 10;\n}\ndeclare module \"f\" {\n export const f = 10;\n}\ndeclare module \"g\" {\n export const g = 10;\n}\n","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../project1/outfile.d.ts", + "./src/e.ts", + "./src/f.ts", + "./src/g.ts" + ], + "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; };", + "../project1/outfile.d.ts": "-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", + "./src/e.ts": "-13789510868-export const e = 10;", + "./src/f.ts": "-4849089835-import { a } from \"a\"; export const f = a;", + "./src/g.ts": "-18341999015-import { b } from \"b\"; export const g = b;" + }, + "root": [ + [ + [ + 3, + 5 + ], + [ + "./src/e.ts", + "./src/f.ts", + "./src/g.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-12964815745-declare module \"e\" {\n export const e = 10;\n}\ndeclare module \"f\" {\n export const f = 10;\n}\ndeclare module \"g\" {\n export const g = 10;\n}\n", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1372 +} + + + +Change:: js emit with change without emitDeclarationOnly +Input:: +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;export const a2 = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:01:52 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:53 AM] Project 'src/project1/src/tsconfig.json' is out of date because buildinfo file 'src/project1/outFile.tsbuildinfo' indicates there is change in compilerOptions + +[12:01:54 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:02:00 AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/outFile.tsbuildinfo' indicates there is change in compilerOptions + +[12:02:01 AM] Building project '/src/project2/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/project1/outFile.js", + "module": 2, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "composite": true, + "outFile": "/src/project2/outFile.js", + "module": 2, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/outFile.d.ts +/src/project2/src/e.ts +/src/project2/src/f.ts +/src/project2/src/g.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/project1/outFile.d.ts] +declare module "a" { + export const a = 10; + export const aaa = 10; +} +declare module "b" { + export const b = 10; + export const aaaaa = 10; + export const a2 = 10; +} +declare module "c" { + export const c = 10; +} +declare module "d" { + export const d = 10; +} + + +//// [/src/project1/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.aaa = exports.a = void 0; + exports.a = 10; + var aLocal = 10; + var aa = 10; + exports.aaa = 10; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a2 = exports.aaaaa = exports.b = void 0; + exports.b = 10; + var bLocal = 10; + var alocal = 10; + var aaaa = 10; + exports.aaaaa = 10; + exports.a2 = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); + + +//// [/src/project1/outFile.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts","./src/d.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; };","-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","-18124257118-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;export const a2 = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"module":2,"outFile":"./outFile.js"},"outSignature":"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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project1/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ], + "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; };", + "./src/a.ts": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "./src/b.ts": "-18124257118-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;export const a2 = 10;", + "./src/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./src/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./src/a.ts", + "./src/b.ts", + "./src/c.ts", + "./src/d.ts" + ] + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1369 +} + +//// [/src/project2/outFile.js] file written with same contents +//// [/src/project2/outFile.tsbuildinfo] +{"program":{"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":{"composite":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-12964815745-declare module \"e\" {\n export const e = 10;\n}\ndeclare module \"f\" {\n export const f = 10;\n}\ndeclare module \"g\" {\n export const g = 10;\n}\n","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project2/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../project1/outfile.d.ts", + "./src/e.ts", + "./src/f.ts", + "./src/g.ts" + ], + "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; };", + "../project1/outfile.d.ts": "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", + "./src/e.ts": "-13789510868-export const e = 10;", + "./src/f.ts": "-4849089835-import { a } from \"a\"; export const f = a;", + "./src/g.ts": "-18341999015-import { b } from \"b\"; export const g = b;" + }, + "root": [ + [ + [ + 3, + 5 + ], + [ + "./src/e.ts", + "./src/f.ts", + "./src/g.ts" + ] + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-12964815745-declare module \"e\" {\n export const e = 10;\n}\ndeclare module \"f\" {\n export const f = 10;\n}\ndeclare module \"g\" {\n export const g = 10;\n}\n", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1371 +} + diff --git a/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline.js b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline.js new file mode 100644 index 0000000000000..75371da8cc561 --- /dev/null +++ b/tests/baselines/reference/tsbuild/commandLine/emitDeclarationOnly-on-commandline.js @@ -0,0 +1,2106 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project1/src/a.ts] +export const a = 10;const aLocal = 10; + +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10; + +//// [/src/project1/src/c.ts] +import { a } from "./a";export const c = a; + +//// [/src/project1/src/d.ts] +import { b } from "./b";export const d = b; + +//// [/src/project1/src/tsconfig.json] +{ + "compilerOptions": { + "composite": true + } +} + +//// [/src/project2/src/e.ts] +export const e = 10; + +//// [/src/project2/src/f.ts] +import { a } from "../../project1/src/a"; export const f = a; + +//// [/src/project2/src/g.ts] +import { b } from "../../project1/src/b"; export const g = b; + +//// [/src/project2/src/tsconfig.json] +{ + "compilerOptions": { + "composite": true + }, + "references": [ + { + "path": "../../project1/src" + } + ] +} + + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:00:19 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:20 AM] Project 'src/project1/src/tsconfig.json' is out of date because output file 'src/project1/src/tsconfig.tsbuildinfo' does not exist + +[12:00:21 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:00:29 AM] Project 'src/project2/src/tsconfig.json' is out of date because output file 'src/project2/src/tsconfig.tsbuildinfo' does not exist + +[12:00:30 AM] Building project '/src/project2/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "composite": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project1/src/a.ts (computed .d.ts during emit) +/src/project1/src/b.ts (computed .d.ts during emit) +/src/project1/src/c.ts (computed .d.ts during emit) +/src/project1/src/d.ts (computed .d.ts during emit) + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "composite": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project2/src/e.ts +/src/project1/src/a.d.ts +/src/project2/src/f.ts +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/project2/src/e.ts +/src/project1/src/a.d.ts +/src/project2/src/f.ts +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +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] +export declare const a = 10; + + +//// [/src/project1/src/b.d.ts] +export declare const b = 10; + + +//// [/src/project1/src/c.d.ts] +export declare const c = 10; + + +//// [/src/project1/src/d.d.ts] +export declare const d = 10; + + +//// [/src/project1/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-18487752940-export const a = 10;const aLocal = 10;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true,"emitDeclarationOnly":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./d.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./d.d.ts" + }, + "version": "FakeTSVersion", + "size": 1309 +} + +//// [/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] +{"program":{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"-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":{"composite":true,"emitDeclarationOnly":true},"fileIdsList":[[3],[5]],"referencedMap":[[4,1],[6,2]],"semanticDiagnosticsPerFile":[1,3,5,2,4,6],"latestChangedDtsFile":"./g.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileNamesList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.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 + }, + "./e.ts": { + "original": { + "version": "-13789510868-export const e = 10;", + "signature": "-4822840506-export declare const e = 10;\n" + }, + "version": "-13789510868-export const e = 10;", + "signature": "-4822840506-export declare const e = 10;\n" + }, + "../../project1/src/a.d.ts": { + "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": "-5154070489-export declare const f = 10;\n" + }, + "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": { + "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": "-5485300472-export declare const g = 10;\n" + }, + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "-5485300472-export declare const g = 10;\n" + } + }, + "root": [ + [ + 2, + "./e.ts" + ], + [ + 4, + "./f.ts" + ], + [ + 6, + "./g.ts" + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "../../project1/src/a.d.ts", + "../../project1/src/b.d.ts", + "./e.ts", + "./f.ts", + "./g.ts" + ], + "latestChangedDtsFile": "./g.d.ts" + }, + "version": "FakeTSVersion", + "size": 1344 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:00:37 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:38 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' + +[12:00:39 AM] Project 'src/project2/src/tsconfig.json' is up to date because newest input 'src/project2/src/g.ts' is older than output 'src/project2/src/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: local change +Input:: +//// [/src/project1/src/a.ts] +export const a = 10;const aLocal = 10;const aa = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:00:41 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:42 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/src/tsconfig.tsbuildinfo' is older than input 'src/project1/src/a.ts' + +[12:00:43 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:00:47 AM] Project 'src/project2/src/tsconfig.json' is up to date with .d.ts files from its dependencies + +[12:00:48 AM] Updating output timestamps of project '/src/project2/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "composite": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project1/src/a.ts + +Shape signatures in builder refreshed for:: +/src/project1/src/a.ts (computed .d.ts) + + +//// [/src/project1/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-16597586570-export const a = 10;const aLocal = 10;const aa = 10;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true,"emitDeclarationOnly":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./d.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-16597586570-export const a = 10;const aLocal = 10;const aa = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./d.d.ts" + }, + "version": "FakeTSVersion", + "size": 1323 +} + +//// [/src/project2/src/tsconfig.tsbuildinfo] file changed its modified time + + +Change:: non local change +Input:: +//// [/src/project1/src/a.ts] +export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:00:52 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:00:53 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/src/tsconfig.tsbuildinfo' is older than input 'src/project1/src/a.ts' + +[12:00:54 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:00:59 AM] Project 'src/project2/src/tsconfig.json' is out of date because output 'src/project2/src/tsconfig.tsbuildinfo' is older than input 'src/project1/src' + +[12:01:00 AM] Building project '/src/project2/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "composite": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project1/src/a.ts +/src/project1/src/c.ts + +Shape signatures in builder refreshed for:: +/src/project1/src/a.ts (computed .d.ts) +/src/project1/src/c.ts (computed .d.ts) + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "composite": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project2/src/e.ts +/src/project1/src/a.d.ts +/src/project2/src/f.ts +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +Semantic diagnostics in builder refreshed for:: +/src/project1/src/a.d.ts +/src/project2/src/f.ts + +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] +export declare const a = 10; +export declare const aaa = 10; + + +//// [/src/project1/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","signature":"-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true,"emitDeclarationOnly":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./a.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "version": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./a.d.ts" + }, + "version": "FakeTSVersion", + "size": 1376 +} + +//// [/src/project2/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"-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":{"composite":true,"emitDeclarationOnly":true},"fileIdsList":[[3],[5]],"referencedMap":[[4,1],[6,2]],"semanticDiagnosticsPerFile":[1,3,5,2,4,6],"latestChangedDtsFile":"./g.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileNamesList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.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 + }, + "./e.ts": { + "original": { + "version": "-13789510868-export const e = 10;", + "signature": "-4822840506-export declare const e = 10;\n" + }, + "version": "-13789510868-export const e = 10;", + "signature": "-4822840506-export declare const e = 10;\n" + }, + "../../project1/src/a.d.ts": { + "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": "-5154070489-export declare const f = 10;\n" + }, + "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": { + "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": "-5485300472-export declare const g = 10;\n" + }, + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "-5485300472-export declare const g = 10;\n" + } + }, + "root": [ + [ + 2, + "./e.ts" + ], + [ + 4, + "./f.ts" + ], + [ + 6, + "./g.ts" + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "../../project1/src/a.d.ts", + "../../project1/src/b.d.ts", + "./e.ts", + "./f.ts", + "./g.ts" + ], + "latestChangedDtsFile": "./g.d.ts" + }, + "version": "FakeTSVersion", + "size": 1376 +} + + + +Change:: emit js files +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:01:04 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:05 AM] Project 'src/project1/src/tsconfig.json' is out of date because buildinfo file 'src/project1/src/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[12:01:06 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:01:14 AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[12:01:15 AM] Building project '/src/project2/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "composite": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "composite": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project2/src/e.ts +/src/project1/src/a.d.ts +/src/project2/src/f.ts +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project1/src/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.aaa = exports.a = void 0; +exports.a = 10; +var aLocal = 10; +var aa = 10; +exports.aaa = 10; + + +//// [/src/project1/src/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; + + +//// [/src/project1/src/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; + + +//// [/src/project1/src/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; + + +//// [/src/project1/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","signature":"-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./a.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "version": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./a.d.ts" + }, + "version": "FakeTSVersion", + "size": 1349 +} + +//// [/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] +{"program":{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"-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":{"composite":true},"fileIdsList":[[3],[5]],"referencedMap":[[4,1],[6,2]],"semanticDiagnosticsPerFile":[1,3,5,2,4,6],"latestChangedDtsFile":"./g.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileNamesList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.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 + }, + "./e.ts": { + "original": { + "version": "-13789510868-export const e = 10;", + "signature": "-4822840506-export declare const e = 10;\n" + }, + "version": "-13789510868-export const e = 10;", + "signature": "-4822840506-export declare const e = 10;\n" + }, + "../../project1/src/a.d.ts": { + "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": "-5154070489-export declare const f = 10;\n" + }, + "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": { + "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": "-5485300472-export declare const g = 10;\n" + }, + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "-5485300472-export declare const g = 10;\n" + } + }, + "root": [ + [ + 2, + "./e.ts" + ], + [ + 4, + "./f.ts" + ], + [ + 6, + "./g.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "../../project1/src/a.d.ts", + "../../project1/src/b.d.ts", + "./e.ts", + "./f.ts", + "./g.ts" + ], + "latestChangedDtsFile": "./g.d.ts" + }, + "version": "FakeTSVersion", + "size": 1349 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:01:22 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:23 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' + +[12:01:24 AM] Project 'src/project2/src/tsconfig.json' is up to date because newest input 'src/project2/src/g.ts' is older than output 'src/project2/src/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + + + +Change:: js emit with change without emitDeclarationOnly +Input:: +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10;const alocal = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:01:26 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:27 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/src/tsconfig.tsbuildinfo' is older than input 'src/project1/src/b.ts' + +[12:01:28 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:01:33 AM] Project 'src/project2/src/tsconfig.json' is up to date with .d.ts files from its dependencies + +[12:01:34 AM] Updating output timestamps of project '/src/project2/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "composite": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project1/src/b.ts + +Shape signatures in builder refreshed for:: +/src/project1/src/b.ts (computed .d.ts) + + +//// [/src/project1/src/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; +var alocal = 10; + + +//// [/src/project1/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","signature":"-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n"},{"version":"-2761163262-export const b = 10;const bLocal = 10;const alocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./a.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "version": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-2761163262-export const b = 10;const bLocal = 10;const alocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-2761163262-export const b = 10;const bLocal = 10;const alocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./a.d.ts" + }, + "version": "FakeTSVersion", + "size": 1367 +} + +//// [/src/project2/src/tsconfig.tsbuildinfo] file changed its modified time + + +Change:: local change +Input:: +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:01:38 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:39 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/src/tsconfig.tsbuildinfo' is older than input 'src/project1/src/b.ts' + +[12:01:40 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:01:44 AM] Project 'src/project2/src/tsconfig.json' is up to date with .d.ts files from its dependencies + +[12:01:45 AM] Updating output timestamps of project '/src/project2/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "composite": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project1/src/b.ts + +Shape signatures in builder refreshed for:: +/src/project1/src/b.ts (computed .d.ts) + + +//// [/src/project1/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","signature":"-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n"},{"version":"-3037017594-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true,"emitDeclarationOnly":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./a.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "version": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-3037017594-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-3037017594-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./a.d.ts" + }, + "version": "FakeTSVersion", + "size": 1410 +} + +//// [/src/project2/src/tsconfig.tsbuildinfo] file changed its modified time + + +Change:: non local change +Input:: +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose --emitDeclarationOnly +[12:01:49 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:01:50 AM] Project 'src/project1/src/tsconfig.json' is out of date because output 'src/project1/src/tsconfig.tsbuildinfo' is older than input 'src/project1/src/b.ts' + +[12:01:51 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:01:56 AM] Project 'src/project2/src/tsconfig.json' is out of date because output 'src/project2/src/tsconfig.tsbuildinfo' is older than input 'src/project1/src' + +[12:01:57 AM] Building project '/src/project2/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "composite": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project1/src/b.ts +/src/project1/src/d.ts + +Shape signatures in builder refreshed for:: +/src/project1/src/b.ts (computed .d.ts) +/src/project1/src/d.ts (computed .d.ts) + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "composite": true, + "emitDeclarationOnly": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project2/src/e.ts +/src/project1/src/a.d.ts +/src/project2/src/f.ts +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +Semantic diagnostics in builder refreshed for:: +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +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] +export declare const b = 10; +export declare const aaaaa = 10; + + +//// [/src/project1/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","signature":"-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n"},{"version":"-7233149715-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;","signature":"2661550180-export declare const b = 10;\nexport declare const aaaaa = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true,"emitDeclarationOnly":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./b.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "version": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-7233149715-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;", + "signature": "2661550180-export declare const b = 10;\nexport declare const aaaaa = 10;\n" + }, + "version": "-7233149715-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;", + "signature": "2661550180-export declare const b = 10;\nexport declare const aaaaa = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./b.d.ts" + }, + "version": "FakeTSVersion", + "size": 1467 +} + +//// [/src/project2/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"-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":{"composite":true,"emitDeclarationOnly":true},"fileIdsList":[[3],[5]],"referencedMap":[[4,1],[6,2]],"semanticDiagnosticsPerFile":[1,3,5,2,4,6],"latestChangedDtsFile":"./g.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileNamesList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.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 + }, + "./e.ts": { + "original": { + "version": "-13789510868-export const e = 10;", + "signature": "-4822840506-export declare const e = 10;\n" + }, + "version": "-13789510868-export const e = 10;", + "signature": "-4822840506-export declare const e = 10;\n" + }, + "../../project1/src/a.d.ts": { + "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": "-5154070489-export declare const f = 10;\n" + }, + "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": { + "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": "-5485300472-export declare const g = 10;\n" + }, + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "-5485300472-export declare const g = 10;\n" + } + }, + "root": [ + [ + 2, + "./e.ts" + ], + [ + 4, + "./f.ts" + ], + [ + 6, + "./g.ts" + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "../../project1/src/a.d.ts", + "../../project1/src/b.d.ts", + "./e.ts", + "./f.ts", + "./g.ts" + ], + "latestChangedDtsFile": "./g.d.ts" + }, + "version": "FakeTSVersion", + "size": 1409 +} + + + +Change:: js emit with change without emitDeclarationOnly +Input:: +//// [/src/project1/src/b.ts] +export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;export const a2 = 10; + + + +Output:: +/lib/tsc --b /src/project2/src --verbose +[12:02:02 AM] Projects in this build: + * src/project1/src/tsconfig.json + * src/project2/src/tsconfig.json + +[12:02:03 AM] Project 'src/project1/src/tsconfig.json' is out of date because buildinfo file 'src/project1/src/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[12:02:04 AM] Building project '/src/project1/src/tsconfig.json'... + +[12:02:13 AM] Project 'src/project2/src/tsconfig.json' is out of date because buildinfo file 'src/project2/src/tsconfig.tsbuildinfo' indicates there is change in compilerOptions + +[12:02:14 AM] Building project '/src/project2/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project1/src/a.ts", + "/src/project1/src/b.ts", + "/src/project1/src/c.ts", + "/src/project1/src/d.ts" +] +Program options: { + "composite": true, + "configFilePath": "/src/project1/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project1/src/a.ts +/src/project1/src/b.ts +/src/project1/src/c.ts +/src/project1/src/d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project1/src/b.ts +/src/project1/src/d.ts + +Shape signatures in builder refreshed for:: +/src/project1/src/b.ts (computed .d.ts) +/src/project1/src/d.ts (computed .d.ts) + +Program root files: [ + "/src/project2/src/e.ts", + "/src/project2/src/f.ts", + "/src/project2/src/g.ts" +] +Program options: { + "composite": true, + "configFilePath": "/src/project2/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project2/src/e.ts +/src/project1/src/a.d.ts +/src/project2/src/f.ts +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +Semantic diagnostics in builder refreshed for:: +/src/project1/src/b.d.ts +/src/project2/src/g.ts + +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 +//// [/src/project1/src/b.d.ts] +export declare const b = 10; +export declare const aaaaa = 10; +export declare const a2 = 10; + + +//// [/src/project1/src/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a2 = exports.aaaaa = exports.b = void 0; +exports.b = 10; +var bLocal = 10; +var alocal = 10; +var aaaa = 10; +exports.aaaaa = 10; +exports.a2 = 10; + + +//// [/src/project1/src/c.js] file written with same contents +//// [/src/project1/src/d.js] file written with same contents +//// [/src/project1/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;","signature":"-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n"},{"version":"-18124257118-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;export const a2 = 10;","signature":"-2237944013-export declare const b = 10;\nexport declare const aaaaa = 10;\nexport declare const a2 = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./b.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project1/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "version": "-6435489413-export const a = 10;const aLocal = 10;const aa = 10;export const aaa = 10;", + "signature": "-1973399231-export declare const a = 10;\nexport declare const aaa = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-18124257118-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;export const a2 = 10;", + "signature": "-2237944013-export declare const b = 10;\nexport declare const aaaaa = 10;\nexport declare const a2 = 10;\n" + }, + "version": "-18124257118-export const b = 10;const bLocal = 10;const alocal = 10;const aaaa = 10;export const aaaaa = 10;export const a2 = 10;", + "signature": "-2237944013-export declare const b = 10;\nexport declare const aaaaa = 10;\nexport declare const a2 = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./b.d.ts" + }, + "version": "FakeTSVersion", + "size": 1494 +} + +//// [/src/project2/src/e.js] file written with same contents +//// [/src/project2/src/f.js] file written with same contents +//// [/src/project2/src/g.js] file written with same contents +//// [/src/project2/src/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","./e.ts","../../project1/src/a.d.ts","./f.ts","../../project1/src/b.d.ts","./g.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":"-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":{"composite":true},"fileIdsList":[[3],[5]],"referencedMap":[[4,1],[6,2]],"semanticDiagnosticsPerFile":[1,3,5,2,4,6],"latestChangedDtsFile":"./g.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project2/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "./e.ts", + "../../project1/src/a.d.ts", + "./f.ts", + "../../project1/src/b.d.ts", + "./g.ts" + ], + "fileNamesList": [ + [ + "../../project1/src/a.d.ts" + ], + [ + "../../project1/src/b.d.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 + }, + "./e.ts": { + "original": { + "version": "-13789510868-export const e = 10;", + "signature": "-4822840506-export declare const e = 10;\n" + }, + "version": "-13789510868-export const e = 10;", + "signature": "-4822840506-export declare const e = 10;\n" + }, + "../../project1/src/a.d.ts": { + "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": "-5154070489-export declare const f = 10;\n" + }, + "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": { + "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": "-5485300472-export declare const g = 10;\n" + }, + "version": "-2047954019-import { b } from \"../../project1/src/b\"; export const g = b;", + "signature": "-5485300472-export declare const g = 10;\n" + } + }, + "root": [ + [ + 2, + "./e.ts" + ], + [ + 4, + "./f.ts" + ], + [ + 6, + "./g.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./f.ts": [ + "../../project1/src/a.d.ts" + ], + "./g.ts": [ + "../../project1/src/b.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + "../../project1/src/a.d.ts", + "../../project1/src/b.d.ts", + "./e.ts", + "./f.ts", + "./g.ts" + ], + "latestChangedDtsFile": "./g.d.ts" + }, + "version": "FakeTSVersion", + "size": 1414 +} + diff --git a/tests/baselines/reference/tsbuild/configFileErrors/reports-syntax-errors-in-config-file-discrepancies.js b/tests/baselines/reference/tsbuild/configFileErrors/reports-syntax-errors-in-config-file-discrepancies.js new file mode 100644 index 0000000000000..c9bdc6828e595 --- /dev/null +++ b/tests/baselines/reference/tsbuild/configFileErrors/reports-syntax-errors-in-config-file-discrepancies.js @@ -0,0 +1,79 @@ +0:: reports syntax errors after change to config file +During incremental build, tsbuildinfo is not emitted, so declaration option is not present +Clean build has declaration option in tsbuildinfo +TsBuild info text without affectedFilesPendingEmit:: /src/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "4646078106-export function foo() { }" + }, + "./b.ts": { + "version": "1045484683-export function bar() { }" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "composite": true, + "declaration": true + }, + "referencedMap": {}, + "changeFileSet": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ] + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "4646078106-export function foo() { }" + }, + "./b.ts": { + "version": "1045484683-export function bar() { }" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": {}, + "changeFileSet": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ] + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsbuild/configFileErrors/reports-syntax-errors-in-config-file.js b/tests/baselines/reference/tsbuild/configFileErrors/reports-syntax-errors-in-config-file.js new file mode 100644 index 0000000000000..94eb44935e92b --- /dev/null +++ b/tests/baselines/reference/tsbuild/configFileErrors/reports-syntax-errors-in-config-file.js @@ -0,0 +1,354 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +export function foo() { } + +//// [/src/b.ts] +export function bar() { } + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + }, + "files": [ + "a.ts" + "b.ts" + ] +} + + + +Output:: +/lib/tsc --b /src/tsconfig.json +src/tsconfig.json:7:9 - error TS1005: ',' expected. + +7 "b.ts" +   ~~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + +//// [/src/tsconfig.tsbuildinfo] +{"program":{"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},"referencedMap":[],"changeFileSet":[1,2,3]},"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.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; };", + "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; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "4646078106-export function foo() { }", + "signature": false + }, + "version": "4646078106-export function foo() { }" + }, + "./b.ts": { + "original": { + "version": "1045484683-export function bar() { }", + "signature": false + }, + "version": "1045484683-export function bar() { }" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": {}, + "changeFileSet": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ] + }, + "version": "FakeTSVersion", + "size": 823 +} + + + +Change:: reports syntax errors after change to config file +Input:: +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "declaration": true, + }, + "files": [ + "a.ts" + "b.ts" + ] +} + + + +Output:: +/lib/tsc --b /src/tsconfig.json +src/tsconfig.json:8:9 - error TS1005: ',' expected. + +8 "b.ts" +   ~~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + + + +Change:: reports syntax errors after change to ts file +Input:: +//// [/src/a.ts] +export function foo() { }export function fooBar() { } + + + +Output:: +/lib/tsc --b /src/tsconfig.json +src/tsconfig.json:8:9 - error TS1005: ',' expected. + +8 "b.ts" +   ~~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + +//// [/src/tsconfig.tsbuildinfo] +{"program":{"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},"referencedMap":[],"changeFileSet":[1,2,3]},"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.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; };", + "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; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "9819159940-export function foo() { }export function fooBar() { }", + "signature": false + }, + "version": "9819159940-export function foo() { }export function fooBar() { }" + }, + "./b.ts": { + "original": { + "version": "1045484683-export function bar() { }", + "signature": false + }, + "version": "1045484683-export function bar() { }" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "composite": true, + "declaration": true + }, + "referencedMap": {}, + "changeFileSet": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ] + }, + "version": "FakeTSVersion", + "size": 870 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/tsconfig.json +src/tsconfig.json:8:9 - error TS1005: ',' expected. + +8 "b.ts" +   ~~~~~~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + + + +Change:: builds after fixing config file errors +Input:: +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "declaration": true + }, + "files": [ + "a.ts", + "b.ts" + ] +} + + + +Output:: +/lib/tsc --b /src/tsconfig.json +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] +{"program":{"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},"referencedMap":[],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./b.d.ts"},"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.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": "9819159940-export function foo() { }export function fooBar() { }", + "signature": "-9218003498-export declare function foo(): void;\nexport declare function fooBar(): void;\n" + }, + "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": "-2904461644-export declare function bar(): void;\n" + }, + "version": "1045484683-export function bar() { }", + "signature": "-2904461644-export declare function bar(): void;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "composite": true, + "declaration": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "latestChangedDtsFile": "./b.d.ts" + }, + "version": "FakeTSVersion", + "size": 1034 +} + diff --git a/tests/baselines/reference/tsbuild/fileDelete/deleted-file-with-outFile-without-composite.js b/tests/baselines/reference/tsbuild/fileDelete/deleted-file-with-outFile-without-composite.js new file mode 100644 index 0000000000000..0c94d76d37061 --- /dev/null +++ b/tests/baselines/reference/tsbuild/fileDelete/deleted-file-with-outFile-without-composite.js @@ -0,0 +1,97 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/child/child.ts] +import { child2 } from "../child/child2"; +export function child() { + child2(); +} + + +//// [/src/child/child2.ts] +export function child2() { +} + + +//// [/src/child/tsconfig.json] +{ + "compilerOptions": { + "outFile": "../childResult.js", + "module": "amd" + } +} + + + +Output:: +/lib/tsc --b /src/child/tsconfig.json -v --traceResolution --explainFiles +[12:00:10 AM] Projects in this build: + * src/child/tsconfig.json + +[12:00:11 AM] Project 'src/child/tsconfig.json' is out of date because output file 'src/childResult.js' does not exist + +[12:00:12 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' exists - use it as a name resolution result. +======== Module name '../child/child2' was successfully resolved to '/src/child/child2.ts'. ======== +lib/lib.d.ts + Default library for target 'es5' +src/child/child2.ts + Imported via "../child/child2" from file 'src/child/child.ts' + Matched by default include pattern '**/*' +src/child/child.ts + Matched by default include pattern '**/*' +exitCode:: ExitStatus.Success + + +//// [/src/childResult.js] +define("child2", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.child2 = child2; + function child2() { + } +}); +define("child", ["require", "exports", "child2"], function (require, exports, child2_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.child = child; + function child() { + (0, child2_1.child2)(); + } +}); + + + + +Change:: delete child2 file +Input:: +//// [/src/child/child2.ts] unlink + + +Output:: +/lib/tsc --b /src/child/tsconfig.json -v --traceResolution --explainFiles +[12:00:15 AM] Projects in this build: + * src/child/tsconfig.json + +[12:00:16 AM] Project 'src/child/tsconfig.json' is up to date because newest input 'src/child/child.ts' is older than output 'src/childResult.js' + +exitCode:: ExitStatus.Success + + diff --git a/tests/baselines/reference/tsbuild/fileDelete/deleted-file-without-composite.js b/tests/baselines/reference/tsbuild/fileDelete/deleted-file-without-composite.js new file mode 100644 index 0000000000000..829a1ea0422ad --- /dev/null +++ b/tests/baselines/reference/tsbuild/fileDelete/deleted-file-without-composite.js @@ -0,0 +1,96 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/child/child.ts] +import { child2 } from "../child/child2"; +export function child() { + child2(); +} + + +//// [/src/child/child2.ts] +export function child2() { +} + + +//// [/src/child/tsconfig.json] +{ + "compilerOptions": {} +} + + + +Output:: +/lib/tsc --b /src/child/tsconfig.json -v --traceResolution --explainFiles +[12:00:10 AM] Projects in this build: + * src/child/tsconfig.json + +[12:00:11 AM] Project 'src/child/tsconfig.json' is out of date because output file 'src/child/child.js' does not exist + +[12:00:12 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' exists - use it as a name resolution result. +======== Module name '../child/child2' was successfully resolved to '/src/child/child2.ts'. ======== +lib/lib.d.ts + Default library for target 'es5' +src/child/child2.ts + Imported via "../child/child2" from file 'src/child/child.ts' + Matched by default include pattern '**/*' +src/child/child.ts + Matched by default include pattern '**/*' +exitCode:: ExitStatus.Success + + +//// [/src/child/child.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.child = child; +var child2_1 = require("../child/child2"); +function child() { + (0, child2_1.child2)(); +} + + +//// [/src/child/child2.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.child2 = child2; +function child2() { +} + + + + +Change:: delete child2 file +Input:: +//// [/src/child/child2.js] unlink +//// [/src/child/child2.ts] unlink + + +Output:: +/lib/tsc --b /src/child/tsconfig.json -v --traceResolution --explainFiles +[12:00:17 AM] Projects in this build: + * src/child/tsconfig.json + +[12:00:18 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' + +exitCode:: ExitStatus.Success + + diff --git a/tests/baselines/reference/tsbuild/fileDelete/detects-deleted-file-discrepancies.js b/tests/baselines/reference/tsbuild/fileDelete/detects-deleted-file-discrepancies.js new file mode 100644 index 0000000000000..910a4990c83d4 --- /dev/null +++ b/tests/baselines/reference/tsbuild/fileDelete/detects-deleted-file-discrepancies.js @@ -0,0 +1,90 @@ +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: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "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 + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + [ + "./child.ts", + [ + { + "file": "./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: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "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 + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + [ + "./child.ts", + [ + { + "file": "./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/detects-deleted-file-with-outFile.js b/tests/baselines/reference/tsbuild/fileDelete/detects-deleted-file-with-outFile.js new file mode 100644 index 0000000000000..56295d3feb1ae --- /dev/null +++ b/tests/baselines/reference/tsbuild/fileDelete/detects-deleted-file-with-outFile.js @@ -0,0 +1,277 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/child/child.ts] +import { child2 } from "../child/child2"; +export function child() { + child2(); +} + + +//// [/src/child/child2.ts] +export function child2() { +} + + +//// [/src/child/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "outFile": "../childResult.js", + "module": "amd" + } +} + +//// [/src/main/main.ts] +import { child } from "child"; +export function main() { + child(); +} + + +//// [/src/main/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "outFile": "../mainResult.js", + "module": "amd" + }, + "references": [ + { + "path": "../child" + } + ] +} + + + +Output:: +/lib/tsc --b /src/main/tsconfig.json -v --traceResolution --explainFiles +[12:00:13 AM] Projects in this build: + * src/child/tsconfig.json + * src/main/tsconfig.json + +[12:00:14 AM] Project 'src/child/tsconfig.json' is out of date because output file 'src/childResult.tsbuildinfo' does not exist + +[12:00:15 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' exists - use it as a name resolution result. +======== Module name '../child/child2' was successfully resolved to '/src/child/child2.ts'. ======== +lib/lib.d.ts + Default library for target 'es5' +src/child/child2.ts + Imported via "../child/child2" from file 'src/child/child.ts' + Matched by default include pattern '**/*' +src/child/child.ts + Matched by default include pattern '**/*' +[12:00:21 AM] Project 'src/main/tsconfig.json' is out of date because output file 'src/mainResult.tsbuildinfo' does not exist + +[12:00:22 AM] Building project '/src/main/tsconfig.json'... + +======== Resolving module 'child' from '/src/main/main.ts'. ======== +Module resolution kind is not specified, using 'Classic'. +File '/src/main/child.ts' does not exist. +File '/src/main/child.tsx' does not exist. +File '/src/main/child.d.ts' does not exist. +File '/src/child.ts' does not exist. +File '/src/child.tsx' does not exist. +File '/src/child.d.ts' does not exist. +File '/child.ts' does not exist. +File '/child.tsx' does not exist. +File '/child.d.ts' does not exist. +Searching all ancestor node_modules directories for preferred extensions: Declaration. +Directory '/src/main/node_modules' does not exist, skipping all lookups in it. +Directory '/src/node_modules' does not exist, skipping all lookups in it. +Directory '/node_modules' does not exist, skipping all lookups in it. +File '/src/main/child.js' does not exist. +File '/src/main/child.jsx' does not exist. +File '/src/child.js' does not exist. +File '/src/child.jsx' does not exist. +File '/child.js' does not exist. +File '/child.jsx' does not exist. +======== Module name 'child' was not resolved. ======== +lib/lib.d.ts + Default library for target 'es5' +src/childResult.d.ts + Output from referenced project 'src/child/tsconfig.json' included because '--outFile' specified +src/main/main.ts + Matched by default include pattern '**/*' +exitCode:: ExitStatus.Success + + +//// [/src/childResult.d.ts] +declare module "child2" { + export function child2(): void; +} +declare module "child" { + export function child(): void; +} + + +//// [/src/childResult.js] +define("child2", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.child2 = child2; + function child2() { + } +}); +define("child", ["require", "exports", "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] +{"program":{"fileNames":["../lib/lib.d.ts","./child/child2.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; };","6507293504-export function child2() {\n}\n","-11458139532-import { child2 } from \"../child/child2\";\nexport function child() {\n child2();\n}\n"],"root":[2,3],"options":{"composite":true,"module":2,"outFile":"./childResult.js"},"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"},"version":"FakeTSVersion"} + +//// [/src/childResult.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./child/child2.ts", + "./child/child.ts" + ], + "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/child2.ts": "6507293504-export function child2() {\n}\n", + "./child/child.ts": "-11458139532-import { child2 } from \"../child/child2\";\nexport function child() {\n child2();\n}\n" + }, + "root": [ + [ + 2, + "./child/child2.ts" + ], + [ + 3, + "./child/child.ts" + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./childResult.js" + }, + "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" + }, + "version": "FakeTSVersion", + "size": 1007 +} + +//// [/src/mainResult.d.ts] +declare module "main" { + export function main(): void; +} + + +//// [/src/mainResult.js] +define("main", ["require", "exports", "child"], function (require, exports, child_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.main = main; + function main() { + (0, child_1.child)(); + } +}); + + +//// [/src/mainResult.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./childresult.d.ts","./main/main.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; };","2074776633-declare module \"child2\" {\n export function child2(): void;\n}\ndeclare module \"child\" {\n export function child(): void;\n}\n","-8784613407-import { child } from \"child\";\nexport function main() {\n child();\n}\n"],"root":[3],"options":{"composite":true,"module":2,"outFile":"./mainResult.js"},"outSignature":"7955277823-declare module \"main\" {\n export function main(): void;\n}\n","latestChangedDtsFile":"./mainResult.d.ts"},"version":"FakeTSVersion"} + +//// [/src/mainResult.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./childresult.d.ts", + "./main/main.ts" + ], + "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; };", + "./childresult.d.ts": "2074776633-declare module \"child2\" {\n export function child2(): void;\n}\ndeclare module \"child\" {\n export function child(): void;\n}\n", + "./main/main.ts": "-8784613407-import { child } from \"child\";\nexport function main() {\n child();\n}\n" + }, + "root": [ + [ + 3, + "./main/main.ts" + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./mainResult.js" + }, + "outSignature": "7955277823-declare module \"main\" {\n export function main(): void;\n}\n", + "latestChangedDtsFile": "./mainResult.d.ts" + }, + "version": "FakeTSVersion", + "size": 1022 +} + + + +Change:: delete child2 file +Input:: +//// [/src/child/child2.ts] unlink + + +Output:: +/lib/tsc --b /src/main/tsconfig.json -v --traceResolution --explainFiles +[12:00:29 AM] Projects in this build: + * src/child/tsconfig.json + * src/main/tsconfig.json + +[12:00:30 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. + +[12:00:31 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 '**/*' +[12:00:32 AM] Project 'src/main/tsconfig.json' can't be built because its dependency 'src/child' has errors + +[12:00:33 AM] Skipping build of project '/src/main/tsconfig.json' because its dependency '/src/child' has errors + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + diff --git a/tests/baselines/reference/tsbuild/fileDelete/detects-deleted-file.js b/tests/baselines/reference/tsbuild/fileDelete/detects-deleted-file.js new file mode 100644 index 0000000000000..69439e1df8ad5 --- /dev/null +++ b/tests/baselines/reference/tsbuild/fileDelete/detects-deleted-file.js @@ -0,0 +1,391 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/child/child.ts] +import { child2 } from "../child/child2"; +export function child() { + child2(); +} + + +//// [/src/child/child2.ts] +export function child2() { +} + + +//// [/src/child/tsconfig.json] +{ + "compilerOptions": { + "composite": true + } +} + +//// [/src/main/main.ts] +import { child } from "../child/child"; +export function main() { + child(); +} + + +//// [/src/main/tsconfig.json] +{ + "compilerOptions": { + "composite": true + }, + "references": [ + { + "path": "../child" + } + ] +} + + + +Output:: +/lib/tsc --b /src/main/tsconfig.json -v --traceResolution --explainFiles +[12:00:13 AM] Projects in this build: + * src/child/tsconfig.json + * src/main/tsconfig.json + +[12:00:14 AM] Project 'src/child/tsconfig.json' is out of date because output file 'src/child/tsconfig.tsbuildinfo' does not exist + +[12:00:15 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' exists - use it as a name resolution result. +======== Module name '../child/child2' was successfully resolved to '/src/child/child2.ts'. ======== +lib/lib.d.ts + Default library for target 'es5' +src/child/child2.ts + Imported via "../child/child2" from file 'src/child/child.ts' + Matched by default include pattern '**/*' +src/child/child.ts + Matched by default include pattern '**/*' +[12:00:23 AM] Project 'src/main/tsconfig.json' is out of date because output file 'src/main/tsconfig.tsbuildinfo' does not exist + +[12:00:24 AM] Building project '/src/main/tsconfig.json'... + +======== Resolving module '../child/child' from '/src/main/main.ts'. ======== +Module resolution kind is not specified, using 'Node10'. +Loading module as file / folder, candidate module location '/src/child/child', target file types: TypeScript, Declaration. +File '/src/child/child.ts' exists - use it as a name resolution result. +======== Module name '../child/child' was successfully resolved to '/src/child/child.ts'. ======== +lib/lib.d.ts + Default library for target 'es5' +src/child/child.d.ts + Imported via "../child/child" from file 'src/main/main.ts' + File is output of project reference source 'src/child/child.ts' +src/main/main.ts + Matched by default include pattern '**/*' +exitCode:: ExitStatus.Success + + +//// [/src/child/child.d.ts] +export declare function child(): void; + + +//// [/src/child/child.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.child = child; +var child2_1 = require("../child/child2"); +function child() { + (0, child2_1.child2)(); +} + + +//// [/src/child/child2.d.ts] +export declare function child2(): void; + + +//// [/src/child/child2.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.child2 = child2; +function child2() { +} + + +//// [/src/child/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./child2.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":"6507293504-export function child2() {\n}\n","signature":"-5501507595-export declare function child2(): void;\n"},{"version":"-11458139532-import { child2 } from \"../child/child2\";\nexport function child() {\n child2();\n}\n","signature":"-1814288093-export declare function child(): void;\n"}],"root":[2,3],"options":{"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,3,2],"latestChangedDtsFile":"./child.d.ts"},"version":"FakeTSVersion"} + +//// [/src/child/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./child2.ts", + "./child.ts" + ], + "fileNamesList": [ + [ + "./child2.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 + }, + "./child2.ts": { + "original": { + "version": "6507293504-export function child2() {\n}\n", + "signature": "-5501507595-export declare function child2(): void;\n" + }, + "version": "6507293504-export function child2() {\n}\n", + "signature": "-5501507595-export declare function child2(): void;\n" + }, + "./child.ts": { + "original": { + "version": "-11458139532-import { child2 } from \"../child/child2\";\nexport function child() {\n child2();\n}\n", + "signature": "-1814288093-export declare function child(): void;\n" + }, + "version": "-11458139532-import { child2 } from \"../child/child2\";\nexport function child() {\n child2();\n}\n", + "signature": "-1814288093-export declare function child(): void;\n" + } + }, + "root": [ + [ + 2, + "./child2.ts" + ], + [ + 3, + "./child.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./child.ts": [ + "./child2.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./child.ts", + "./child2.ts" + ], + "latestChangedDtsFile": "./child.d.ts" + }, + "version": "FakeTSVersion", + "size": 1065 +} + +//// [/src/main/main.d.ts] +export declare function main(): void; + + +//// [/src/main/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.main = main; +var child_1 = require("../child/child"); +function main() { + (0, child_1.child)(); +} + + +//// [/src/main/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","../child/child.d.ts","./main.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},"-1814288093-export declare function child(): void;\n",{"version":"-8540107489-import { child } from \"../child/child\";\nexport function main() {\n child();\n}\n","signature":"-2471343004-export declare function main(): void;\n"}],"root":[3],"options":{"composite":true},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./main.d.ts"},"version":"FakeTSVersion"} + +//// [/src/main/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "../child/child.d.ts", + "./main.ts" + ], + "fileNamesList": [ + [ + "../child/child.d.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 + }, + "../child/child.d.ts": { + "version": "-1814288093-export declare function child(): void;\n", + "signature": "-1814288093-export declare function child(): void;\n" + }, + "./main.ts": { + "original": { + "version": "-8540107489-import { child } from \"../child/child\";\nexport function main() {\n child();\n}\n", + "signature": "-2471343004-export declare function main(): void;\n" + }, + "version": "-8540107489-import { child } from \"../child/child\";\nexport function main() {\n child();\n}\n", + "signature": "-2471343004-export declare function main(): void;\n" + } + }, + "root": [ + [ + 3, + "./main.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./main.ts": [ + "../child/child.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "../child/child.d.ts", + "./main.ts" + ], + "latestChangedDtsFile": "./main.d.ts" + }, + "version": "FakeTSVersion", + "size": 993 +} + + + +Change:: delete child2 file +Input:: +//// [/src/child/child2.d.ts] unlink +//// [/src/child/child2.js] unlink +//// [/src/child/child2.ts] unlink + + +Output:: +/lib/tsc --b /src/main/tsconfig.json -v --traceResolution --explainFiles +[12:00:33 AM] Projects in this build: + * src/child/tsconfig.json + * src/main/tsconfig.json + +[12:00:34 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. + +[12:00:35 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 '**/*' +[12:00:39 AM] Project 'src/main/tsconfig.json' can't be built because its dependency 'src/child' has errors + +[12:00:40 AM] Skipping build of project '/src/main/tsconfig.json' because its dependency '/src/child' has errors + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + +//// [/src/child/tsconfig.tsbuildinfo] +{"program":{"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},"referencedMap":[],"semanticDiagnosticsPerFile":[1,[2,[{"file":"./child.ts","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"} + +//// [/src/child/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./child.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 + }, + "./child.ts": { + "original": { + "version": "-11458139532-import { child2 } from \"../child/child2\";\nexport function child() {\n child2();\n}\n", + "signature": "-1814288093-export declare function child(): void;\n" + }, + "version": "-11458139532-import { child2 } from \"../child/child2\";\nexport function child() {\n child2();\n}\n", + "signature": "-1814288093-export declare function child(): void;\n" + } + }, + "root": [ + [ + 2, + "./child.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + [ + "./child.ts", + [ + { + "file": "./child.ts", + "start": 23, + "length": 17, + "messageText": "Cannot find module '../child/child2' or its corresponding type declarations.", + "category": 1, + "code": 2307 + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "./child.ts", + "Js | Dts" + ] + ], + "latestChangedDtsFile": "./child.d.ts" + }, + "version": "FakeTSVersion", + "size": 1095 +} + diff --git a/tests/baselines/reference/tsbuild/noEmit/semantic-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noEmit/semantic-errors-with-incremental.js new file mode 100644 index 0000000000000..1a98d170aef07 --- /dev/null +++ b/tests/baselines/reference/tsbuild/noEmit/semantic-errors-with-incremental.js @@ -0,0 +1,284 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +const a: number = "hello" + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "noEmit": true + } +} + + + +Output:: +/lib/tsc --b /src/tsconfig.json -v --incremental +[12:00:08 AM] Projects in this build: + * src/tsconfig.json + +[12:00:09 AM] Project 'src/tsconfig.json' is out of date because output file 'src/tsconfig.tsbuildinfo' does not exist + +[12:00:10 AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 const a: number = "hello" +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts" +] +Program options: { + "noEmit": true, + "incremental": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/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 (used version) + + +//// [/src/tsconfig.tsbuildinfo] +{"program":{"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":"1311033573-const a: number = \"hello\"","affectsGlobalScope":true}],"root":[2],"referencedMap":[],"semanticDiagnosticsPerFile":[1,[2,[{"file":"./a.ts","start":6,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"affectedFilesPendingEmit":[2]},"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "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": "1311033573-const a: number = \"hello\"", + "affectsGlobalScope": true + }, + "version": "1311033573-const a: number = \"hello\"", + "signature": "1311033573-const a: number = \"hello\"", + "affectsGlobalScope": true + } + }, + "root": [ + [ + 2, + "./a.ts" + ] + ], + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../lib/lib.d.ts", + [ + "./a.ts", + [ + { + "file": "./a.ts", + "start": 6, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'string' is not assignable to type 'number'." + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js" + ] + ] + }, + "version": "FakeTSVersion", + "size": 882 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/tsconfig.json -v --incremental +[12:00:14 AM] Projects in this build: + * src/tsconfig.json + +[12:00:15 AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted + +[12:00:16 AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:7 - error TS2322: Type 'string' is not assignable to type 'number'. + +1 const a: number = "hello" +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts" +] +Program options: { + "noEmit": true, + "incremental": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: Fix error +Input:: +//// [/src/a.ts] +const a = "hello" + + + +Output:: +/lib/tsc --b /src/tsconfig.json -v --incremental +[12:00:18 AM] Projects in this build: + * src/tsconfig.json + +[12:00:19 AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted + +[12:00:20 AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts" +] +Program options: { + "noEmit": true, + "incremental": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/a.ts + +Shape signatures in builder refreshed for:: +/src/a.ts (computed .d.ts) + + +//// [/src/tsconfig.tsbuildinfo] +{"program":{"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":"4011451714-const a = \"hello\"","signature":"-5460434953-declare const a = \"hello\";\n","affectsGlobalScope":true}],"root":[2],"referencedMap":[],"semanticDiagnosticsPerFile":[1,2],"affectedFilesPendingEmit":[2]},"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "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": "4011451714-const a = \"hello\"", + "signature": "-5460434953-declare const a = \"hello\";\n", + "affectsGlobalScope": true + }, + "version": "4011451714-const a = \"hello\"", + "signature": "-5460434953-declare const a = \"hello\";\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + 2, + "./a.ts" + ] + ], + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../lib/lib.d.ts", + "./a.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js" + ] + ] + }, + "version": "FakeTSVersion", + "size": 797 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/tsconfig.json -v --incremental +[12:00:24 AM] Projects in this build: + * src/tsconfig.json + +[12:00:25 AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + diff --git a/tests/baselines/reference/tsbuild/noEmit/syntax-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noEmit/syntax-errors-with-incremental.js new file mode 100644 index 0000000000000..d8dc60f363d0d --- /dev/null +++ b/tests/baselines/reference/tsbuild/noEmit/syntax-errors-with-incremental.js @@ -0,0 +1,263 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/a.ts] +const a = "hello + +//// [/src/tsconfig.json] +{ + "compilerOptions": { + "noEmit": true + } +} + + + +Output:: +/lib/tsc --b /src/tsconfig.json -v --incremental +[12:00:08 AM] Projects in this build: + * src/tsconfig.json + +[12:00:09 AM] Project 'src/tsconfig.json' is out of date because output file 'src/tsconfig.tsbuildinfo' does not exist + +[12:00:10 AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:17 - error TS1002: Unterminated string literal. + +1 const a = "hello +    + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts" +] +Program options: { + "noEmit": true, + "incremental": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/tsconfig.tsbuildinfo] +{"program":{"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],"referencedMap":[],"changeFileSet":[1,2]},"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "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; };", + "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; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "original": { + "version": "2464268576-const a = \"hello", + "signature": false, + "affectsGlobalScope": true + }, + "version": "2464268576-const a = \"hello", + "affectsGlobalScope": true + } + }, + "root": [ + [ + 2, + "./a.ts" + ] + ], + "referencedMap": {}, + "changeFileSet": [ + "../lib/lib.d.ts", + "./a.ts" + ] + }, + "version": "FakeTSVersion", + "size": 730 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/tsconfig.json -v --incremental +[12:00:14 AM] Projects in this build: + * src/tsconfig.json + +[12:00:15 AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted + +[12:00:16 AM] Building project '/src/tsconfig.json'... + +src/a.ts:1:17 - error TS1002: Unterminated string literal. + +1 const a = "hello +    + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/a.ts" +] +Program options: { + "noEmit": true, + "incremental": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/a.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: Fix error +Input:: +//// [/src/a.ts] +const a = "hello" + + + +Output:: +/lib/tsc --b /src/tsconfig.json -v --incremental +[12:00:18 AM] Projects in this build: + * src/tsconfig.json + +[12:00:19 AM] Project 'src/tsconfig.json' is out of date because buildinfo file 'src/tsconfig.tsbuildinfo' indicates that some of the changes were not emitted + +[12:00:20 AM] Building project '/src/tsconfig.json'... + +exitCode:: ExitStatus.Success +Program root files: [ + "/src/a.ts" +] +Program options: { + "noEmit": true, + "incremental": true, + "configFilePath": "/src/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/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) + + +//// [/src/tsconfig.tsbuildinfo] +{"program":{"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":"4011451714-const a = \"hello\"","signature":"-5460434953-declare const a = \"hello\";\n","affectsGlobalScope":true}],"root":[2],"referencedMap":[],"semanticDiagnosticsPerFile":[1,2],"affectedFilesPendingEmit":[2]},"version":"FakeTSVersion"} + +//// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "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": "4011451714-const a = \"hello\"", + "signature": "-5460434953-declare const a = \"hello\";\n", + "affectsGlobalScope": true + }, + "version": "4011451714-const a = \"hello\"", + "signature": "-5460434953-declare const a = \"hello\";\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + 2, + "./a.ts" + ] + ], + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../lib/lib.d.ts", + "./a.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js" + ] + ] + }, + "version": "FakeTSVersion", + "size": 797 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --b /src/tsconfig.json -v --incremental +[12:00:24 AM] Projects in this build: + * src/tsconfig.json + +[12:00:25 AM] Project 'src/tsconfig.json' is up to date because newest input 'src/a.ts' is older than output 'src/tsconfig.tsbuildinfo' + +exitCode:: ExitStatus.Success + + diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/semantic-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noEmitOnError/semantic-errors-with-incremental.js new file mode 100644 index 0000000000000..36022675ebebf --- /dev/null +++ b/tests/baselines/reference/tsbuild/noEmitOnError/semantic-errors-with-incremental.js @@ -0,0 +1,366 @@ +currentDirectory:: /user/username/projects/noEmitOnError useCaseSensitiveFileNames: false +Input:: +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/user/username/projects/noEmitOnError/shared/types/db.ts] +export interface A { + name: string; +} + + +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a: string = 10; + +//// [/user/username/projects/noEmitOnError/src/other.ts] +console.log("hi"); +export { } + + +//// [/user/username/projects/noEmitOnError/tsconfig.json] +{ + "compilerOptions": { + "outDir": "./dev-build", + "noEmitOnError": true + } +} + + + +Output:: +/a/lib/tsc --b --incremental +src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. + +2 const a: string = 10; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 + +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 (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] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-5014788164-export interface A {\n name: string;\n}\n","-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "version": "-5014788164-export interface A {\n name: string;\n}\n", + "signature": "-5014788164-export interface A {\n name: string;\n}\n" + }, + "../src/main.ts": { + "version": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "signature": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;" + }, + "../src/other.ts": { + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + [ + "../src/main.ts", + [ + { + "file": "../src/main.ts", + "start": 46, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'number' is not assignable to type 'string'." + } + ] + ], + "../src/other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "../shared/types/db.ts", + "Js" + ], + [ + "../src/main.ts", + "Js" + ], + [ + "../src/other.ts", + "Js" + ] + ] + }, + "version": "FakeTSVersion", + "size": 1147 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/a/lib/tsc --b --incremental +src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. + +2 const a: string = 10; +   ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: Fix error +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a: string = "hello"; + + + +Output:: +/a/lib/tsc --b --incremental +exitCode:: ExitStatus.Success +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var a = "hello"; + + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +console.log("hi"); + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "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": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "signature": "-3531856636-export {};\n" + }, + "version": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "signature": "-3531856636-export {};\n" + }, + "../src/other.ts": { + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1026 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/a/lib/tsc --b --incremental +exitCode:: ExitStatus.Success + + diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/syntax-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noEmitOnError/syntax-errors-with-incremental.js new file mode 100644 index 0000000000000..b6200d3561abf --- /dev/null +++ b/tests/baselines/reference/tsbuild/noEmitOnError/syntax-errors-with-incremental.js @@ -0,0 +1,358 @@ +currentDirectory:: /user/username/projects/noEmitOnError useCaseSensitiveFileNames: false +Input:: +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/user/username/projects/noEmitOnError/shared/types/db.ts] +export interface A { + name: string; +} + + +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +; + + +//// [/user/username/projects/noEmitOnError/src/other.ts] +console.log("hi"); +export { } + + +//// [/user/username/projects/noEmitOnError/tsconfig.json] +{ + "compilerOptions": { + "outDir": "./dev-build", + "noEmitOnError": true + } +} + + + +Output:: +/a/lib/tsc --b --incremental +src/main.ts:4:1 - error TS1005: ',' expected. + +4 ; +  ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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":"-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":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"changeFileSet":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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" + }, + "../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" + }, + "../src/other.ts": { + "original": { + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": false + }, + "version": "9084524823-console.log(\"hi\");\nexport { }\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "changeFileSet": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1080 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/a/lib/tsc --b --incremental +src/main.ts:4:1 - error TS1005: ',' expected. + +4 ; +  ~ + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: Fix error +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +}; + + + +Output:: +/a/lib/tsc --b --incremental +exitCode:: ExitStatus.Success +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 + +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] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var a = { + lastName: 'sdsd' +}; + + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +console.log("hi"); + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "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": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "signature": "-3531856636-export {};\n" + }, + "version": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "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" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1086 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/a/lib/tsc --b --incremental +exitCode:: ExitStatus.Success + + diff --git a/tests/baselines/reference/tsbuildWatch/noEmit/does-not-go-in-loop-when-watching-when-no-files-are-emitted-with-incremental.js b/tests/baselines/reference/tsbuildWatch/noEmit/does-not-go-in-loop-when-watching-when-no-files-are-emitted-with-incremental.js new file mode 100644 index 0000000000000..4a3d1d976a6cc --- /dev/null +++ b/tests/baselines/reference/tsbuildWatch/noEmit/does-not-go-in-loop-when-watching-when-no-files-are-emitted-with-incremental.js @@ -0,0 +1,305 @@ +currentDirectory:: /user/username/projects/myproject useCaseSensitiveFileNames: false +Input:: +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/user/username/projects/myproject/a.js] + + +//// [/user/username/projects/myproject/b.ts] + + +//// [/user/username/projects/myproject/tsconfig.json] +{ + "compilerOptions": { + "allowJs": true, + "noEmit": true + } +} + + +/a/lib/tsc.js -b -w -verbose --incremental +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Projects in this build: + * tsconfig.json + +[HH:MM:SS AM] Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project '/user/username/projects/myproject/tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.js","./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},"5381-","5381-"],"root":[2,3],"options":{"allowJs":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,2,3],"affectedFilesPendingEmit":[2,3]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./a.js", + "./b.ts" + ], + "fileInfos": { + "../../../../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; };", + "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.js": { + "version": "5381-", + "signature": "5381-" + }, + "./b.ts": { + "version": "5381-", + "signature": "5381-" + } + }, + "root": [ + [ + 2, + "./a.js" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "allowJs": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./a.js", + "./b.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./a.js", + "Js" + ], + [ + "./b.ts", + "Js" + ] + ] + }, + "version": "FakeTSVersion", + "size": 738 +} + + +FsWatches:: +/user/username/projects/myproject/a.js: *new* + {} +/user/username/projects/myproject/b.ts: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject: *new* + {} + +Program root files: [ + "/user/username/projects/myproject/a.js", + "/user/username/projects/myproject/b.ts" +] +Program options: { + "allowJs": true, + "noEmit": true, + "watch": true, + "incremental": true, + "configFilePath": "/user/username/projects/myproject/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/a.js +/user/username/projects/myproject/b.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/myproject/a.js +/user/username/projects/myproject/b.ts + +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/myproject/a.js (used version) +/user/username/projects/myproject/b.ts (used version) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/myproject/a.js] file written with same contents + +Timeout callback:: count: 1 +1: timerToBuildInvalidatedProject *new* + +Before running Timeout callback:: count: 1 +1: timerToBuildInvalidatedProject + +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Project 'tsconfig.json' is up to date but needs to update timestamps of output files that are older than input files + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + + + +exitCode:: ExitStatus.undefined + +Change:: change + +Input:: +//// [/user/username/projects/myproject/a.js] +const x = 10; + + +Timeout callback:: count: 1 +2: timerToBuildInvalidatedProject *new* + +Before running Timeout callback:: count: 1 +2: timerToBuildInvalidatedProject + +After running Timeout callback:: count: 0 +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 'tsconfig.tsbuildinfo' is older than input 'a.js' + +[HH:MM:SS AM] Building project '/user/username/projects/myproject/tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./a.js","./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":"5029505981-const x = 10;","signature":"-3042032780-declare const x: 10;\n","affectsGlobalScope":true},"5381-"],"root":[2,3],"options":{"allowJs":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,2,3],"affectedFilesPendingEmit":[2,3]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./a.js", + "./b.ts" + ], + "fileInfos": { + "../../../../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; };", + "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.js": { + "original": { + "version": "5029505981-const x = 10;", + "signature": "-3042032780-declare const x: 10;\n", + "affectsGlobalScope": true + }, + "version": "5029505981-const x = 10;", + "signature": "-3042032780-declare const x: 10;\n", + "affectsGlobalScope": true + }, + "./b.ts": { + "version": "5381-", + "signature": "5381-" + } + }, + "root": [ + [ + 2, + "./a.js" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "allowJs": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./a.js", + "./b.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./a.js", + "Js" + ], + [ + "./b.ts", + "Js" + ] + ] + }, + "version": "FakeTSVersion", + "size": 844 +} + + + +Program root files: [ + "/user/username/projects/myproject/a.js", + "/user/username/projects/myproject/b.ts" +] +Program options: { + "allowJs": true, + "noEmit": true, + "watch": true, + "incremental": true, + "configFilePath": "/user/username/projects/myproject/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/a.js +/user/username/projects/myproject/b.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/myproject/a.js +/user/username/projects/myproject/b.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/myproject/a.js (computed .d.ts) +/user/username/projects/myproject/b.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsbuildWatch/noEmitOnError/does-not-emit-any-files-on-error-with-incremental.js b/tests/baselines/reference/tsbuildWatch/noEmitOnError/does-not-emit-any-files-on-error-with-incremental.js new file mode 100644 index 0000000000000..af24a7ee6958b --- /dev/null +++ b/tests/baselines/reference/tsbuildWatch/noEmitOnError/does-not-emit-any-files-on-error-with-incremental.js @@ -0,0 +1,794 @@ +currentDirectory:: /user/username/projects/noEmitOnError useCaseSensitiveFileNames: false +Input:: +//// [/user/username/projects/noEmitOnError/tsconfig.json] +{ + "compilerOptions": { + "outDir": "./dev-build", + "noEmitOnError": true + } +} + +//// [/user/username/projects/noEmitOnError/shared/types/db.ts] +export interface A { + name: string; +} + + +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +; + + +//// [/user/username/projects/noEmitOnError/src/other.ts] +console.log("hi"); +export { } + + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + + +/a/lib/tsc.js -b -w -verbose --incremental +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +[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/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... + +src/main.ts:4:1 - error TS1005: ',' expected. + +4 ; +  ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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":"-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":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"changeFileSet":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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" + }, + "../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" + }, + "../src/other.ts": { + "original": { + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": false + }, + "version": "9084524823-console.log(\"hi\");\nexport { }\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "changeFileSet": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1080 +} + + +FsWatches:: +/user/username/projects/noEmitOnError/shared/types/db.ts: *new* + {} +/user/username/projects/noEmitOnError/src/main.ts: *new* + {} +/user/username/projects/noEmitOnError/src/other.ts: *new* + {} +/user/username/projects/noEmitOnError/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/noEmitOnError: *new* + {} + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +1: timerToBuildInvalidatedProject *new* + +Before running Timeout callback:: count: 1 +1: timerToBuildInvalidatedProject + +After running Timeout callback:: count: 0 +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] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... + +src/main.ts:4:1 - error TS1005: ',' expected. + +4 ; +  ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + +exitCode:: ExitStatus.undefined + +Change:: Fix Syntax error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +}; + + +Timeout callback:: count: 1 +2: timerToBuildInvalidatedProject *new* + +Before running Timeout callback:: count: 1 +2: timerToBuildInvalidatedProject + +After running Timeout callback:: count: 0 +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] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "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": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "signature": "-3531856636-export {};\n" + }, + "version": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "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" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1086 +} + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var a = { + lastName: 'sdsd' +}; + + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +console.log("hi"); + + + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 + +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 + +Change:: Semantic Error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a: string = 10; + + +Timeout callback:: count: 1 +3: timerToBuildInvalidatedProject *new* + +Before running Timeout callback:: count: 1 +3: timerToBuildInvalidatedProject + +After running Timeout callback:: count: 0 +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] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... + +src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. + +2 const a: string = 10; +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[3]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "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": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "signature": "-3531856636-export {};\n" + }, + "version": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "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" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + [ + "../src/main.ts", + [ + { + "file": "../src/main.ts", + "start": 46, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'number' is not assignable to type 'string'." + } + ] + ], + "../src/other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "../src/main.ts", + "Js" + ] + ] + }, + "version": "FakeTSVersion", + "size": 1245 +} + + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +4: timerToBuildInvalidatedProject *new* + +Before running Timeout callback:: count: 1 +4: timerToBuildInvalidatedProject + +After running Timeout callback:: count: 0 +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] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... + +src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. + +2 const a: string = 10; +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + +exitCode:: ExitStatus.undefined + +Change:: Fix Semantic Error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a: string = "hello"; + + +Timeout callback:: count: 1 +5: timerToBuildInvalidatedProject *new* + +Before running Timeout callback:: count: 1 +5: timerToBuildInvalidatedProject + +After running Timeout callback:: count: 0 +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] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "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": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "signature": "-3531856636-export {};\n" + }, + "version": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "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" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1077 +} + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var a = "hello"; + + + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +6: timerToBuildInvalidatedProject *new* + +Before running Timeout callback:: count: 1 +6: timerToBuildInvalidatedProject + +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Project 'tsconfig.json' is up to date but needs to update timestamps of output files that are older than input files + +[HH:MM:SS AM] Updating output timestamps of project '/user/username/projects/noEmitOnError/tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] file changed its modified time + + +exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsc/incremental/different-options-discrepancies.js b/tests/baselines/reference/tsc/incremental/different-options-discrepancies.js new file mode 100644 index 0000000000000..e8fd5fc136a36 --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/different-options-discrepancies.js @@ -0,0 +1,357 @@ +2:: with declaration should not emit anything +Clean build tsbuildinfo will have compilerOptions with composite and declaration +Incremental build will detect that it doesnt need to rebuild so tsbuild info is from before which has option composite only +TsBuild info text without affectedFilesPendingEmit:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-18487752940-export const a = 10;const aLocal = 10;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "declaration": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-18487752940-export const a = 10;const aLocal = 10;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +6:: with emitDeclarationOnly should not emit anything +Clean build tsbuildinfo will have compilerOptions with composite and emitDeclarationOnly +Incremental build will detect that it doesnt need to rebuild so tsbuild info is from before which has option composite only +TsBuild info text without affectedFilesPendingEmit:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-18487752940-export const a = 10;const aLocal = 10;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-18487752940-export const a = 10;const aLocal = 10;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +9:: with declaration should not emit anything +Clean build tsbuildinfo will have compilerOptions with composite and declaration +Incremental build will detect that it doesnt need to rebuild so tsbuild info is from before which has option composite only +TsBuild info text without affectedFilesPendingEmit:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-17390360476-export const a = 10;const aLocal = 100;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "declaration": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-17390360476-export const a = 10;const aLocal = 100;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsc/incremental/different-options-with-incremental-discrepancies.js b/tests/baselines/reference/tsc/incremental/different-options-with-incremental-discrepancies.js new file mode 100644 index 0000000000000..706bd7b64b101 --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/different-options-with-incremental-discrepancies.js @@ -0,0 +1,230 @@ +4:: no-change-run +Clean build tsbuildinfo will have compilerOptions {} +Incremental build will detect that it doesnt need to rebuild so tsbuild info is from before which has option declaration and declarationMap +TsBuild info text without affectedFilesPendingEmit:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-18487752940-export const a = 10;const aLocal = 10;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "options": {} + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-18487752940-export const a = 10;const aLocal = 10;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true, + "declarationMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion" +} +7:: no-change-run +Clean build tsbuildinfo will have compilerOptions {} +Incremental build will detect that it doesnt need to rebuild so tsbuild info is from before which has option declaration and declarationMap +TsBuild info text without affectedFilesPendingEmit:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-17390360476-export const a = 10;const aLocal = 100;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "options": {} + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "-17390360476-export const a = 10;const aLocal = 100;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true, + "declarationMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsc/incremental/different-options-with-incremental-with-outFile-discrepancies.js b/tests/baselines/reference/tsc/incremental/different-options-with-incremental-with-outFile-discrepancies.js new file mode 100644 index 0000000000000..e39854108f896 --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/different-options-with-incremental-with-outFile-discrepancies.js @@ -0,0 +1,140 @@ +4:: no-change-run +Clean build tsbuildinfo will have compilerOptions {} +Incremental build will detect that it doesnt need to rebuild so tsbuild info is from before which has option declaration and declarationMap +Clean build does not have dts bundle section +Incremental build contains the dts build section from before +TsBuild info text without affectedFilesPendingEmit:: /src/outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "declarationMap": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion" +} +7:: no-change-run +Clean build tsbuildinfo will have compilerOptions {} +Incremental build will detect that it doesnt need to rebuild so tsbuild info is from before which has option declaration and declarationMap +Clean build does not have dts bundle section +Incremental build contains the dts build section from before +TsBuild info text without affectedFilesPendingEmit:: /src/outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "declarationMap": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsc/incremental/different-options-with-incremental-with-outFile.js b/tests/baselines/reference/tsc/incremental/different-options-with-incremental-with-outFile.js new file mode 100644 index 0000000000000..8fdc4924f846d --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/different-options-with-incremental-with-outFile.js @@ -0,0 +1,1268 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/a.ts] +export const a = 10;const aLocal = 10; + +//// [/src/project/b.ts] +export const b = 10;const bLocal = 10; + +//// [/src/project/c.ts] +import { a } from "./a";export const c = a; + +//// [/src/project/d.ts] +import { b } from "./b";export const d = b; + +//// [/src/project/tsconfig.json] +{ + "compilerOptions": { + "incremental": true, + "outFile": "../outFile.js", + "module": "amd" + } +} + + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 10; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); + + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 884 +} + + + +Change:: with sourceMap +Input:: + + +Output:: +/lib/tsc --p /src/project --sourceMap +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "sourceMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 10; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); +//# sourceMappingURL=outFile.js.map + +//// [/src/outFile.js.map] +{"version":3,"file":"outFile.js","sourceRoot":"","sources":["project/a.ts","project/b.ts","project/c.ts","project/d.ts"],"names":[],"mappings":";;;;IAAa,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,IAAM,MAAM,GAAG,EAAE,CAAC;;;;;;ICAzB,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,IAAM,MAAM,GAAG,EAAE,CAAC;;;;;;ICAD,QAAA,CAAC,GAAG,KAAC,CAAC;;;;;;ICAN,QAAA,CAAC,GAAG,KAAC,CAAC"} + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"module":2,"outFile":"./outFile.js","sourceMap":true}},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "module": 2, + "outFile": "./outFile.js", + "sourceMap": true + } + }, + "version": "FakeTSVersion", + "size": 901 +} + + + +Change:: should re-emit only js so they dont contain sourcemap +Input:: + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 10; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); + + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 884 +} + + + +Change:: with declaration, emit Dts and should not emit js +Input:: + + +Output:: +/lib/tsc --p /src/project --declaration +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "declaration": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.d.ts] +declare module "a" { + export const a = 10; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c = 10; +} +declare module "d" { + export const d = 10; +} + + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 903 +} + + + +Change:: with declaration and declarationMap +Input:: + + +Output:: +/lib/tsc --p /src/project --declaration --declarationMap +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "declaration": true, + "declarationMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.d.ts] +declare module "a" { + export const a = 10; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c = 10; +} +declare module "d" { + export const d = 10; +} +//# sourceMappingURL=outFile.d.ts.map + +//// [/src/outFile.d.ts.map] +{"version":3,"file":"outFile.d.ts","sourceRoot":"","sources":["project/a.ts","project/b.ts","project/c.ts","project/d.ts"],"names":[],"mappings":";IAAA,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;;ICApB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;;ICAI,MAAM,CAAC,MAAM,CAAC,KAAI,CAAC;;;ICAnB,MAAM,CAAC,MAAM,CAAC,KAAI,CAAC"} + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"declaration":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "declarationMap": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 925 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: local change +Input:: +//// [/src/project/a.ts] +export const a = 10;const aLocal = 100; + + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 100; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); + + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-17390360476-export const a = 10;const aLocal = 100;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 885 +} + + + +Change:: with declaration and declarationMap +Input:: + + +Output:: +/lib/tsc --p /src/project --declaration --declarationMap +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "declaration": true, + "declarationMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.d.ts] file written with same contents +//// [/src/outFile.d.ts.map] file written with same contents +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-17390360476-export const a = 10;const aLocal = 100;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"declaration":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "declarationMap": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 926 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: with inlineSourceMap +Input:: + + +Output:: +/lib/tsc --p /src/project --inlineSourceMap +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "inlineSourceMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 100; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0RmlsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInByb2plY3QvYS50cyIsInByb2plY3QvYi50cyIsInByb2plY3QvYy50cyIsInByb2plY3QvZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0lBQWEsUUFBQSxDQUFDLEdBQUcsRUFBRSxDQUFDO0lBQUEsSUFBTSxNQUFNLEdBQUcsR0FBRyxDQUFDOzs7Ozs7SUNBMUIsUUFBQSxDQUFDLEdBQUcsRUFBRSxDQUFDO0lBQUEsSUFBTSxNQUFNLEdBQUcsRUFBRSxDQUFDOzs7Ozs7SUNBRCxRQUFBLENBQUMsR0FBRyxLQUFDLENBQUM7Ozs7OztJQ0FOLFFBQUEsQ0FBQyxHQUFHLEtBQUMsQ0FBQyJ9 + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-17390360476-export const a = 10;const aLocal = 100;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"inlineSourceMap":true,"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "inlineSourceMap": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 908 +} + + + +Change:: with sourceMap +Input:: + + +Output:: +/lib/tsc --p /src/project --sourceMap +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "sourceMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 100; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); +//# sourceMappingURL=outFile.js.map + +//// [/src/outFile.js.map] +{"version":3,"file":"outFile.js","sourceRoot":"","sources":["project/a.ts","project/b.ts","project/c.ts","project/d.ts"],"names":[],"mappings":";;;;IAAa,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,IAAM,MAAM,GAAG,GAAG,CAAC;;;;;;ICA1B,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,IAAM,MAAM,GAAG,EAAE,CAAC;;;;;;ICAD,QAAA,CAAC,GAAG,KAAC,CAAC;;;;;;ICAN,QAAA,CAAC,GAAG,KAAC,CAAC"} + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-17390360476-export const a = 10;const aLocal = 100;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"module":2,"outFile":"./outFile.js","sourceMap":true}},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "module": 2, + "outFile": "./outFile.js", + "sourceMap": true + } + }, + "version": "FakeTSVersion", + "size": 902 +} + + + +Change:: emit js files +Input:: + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 100; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); + + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-17390360476-export const a = 10;const aLocal = 100;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 885 +} + + + +Change:: with declaration and declarationMap +Input:: + + +Output:: +/lib/tsc --p /src/project --declaration --declarationMap +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "declaration": true, + "declarationMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.d.ts] file written with same contents +//// [/src/outFile.d.ts.map] file written with same contents +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-17390360476-export const a = 10;const aLocal = 100;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"declaration":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"}},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "declaration": true, + "declarationMap": true, + "module": 2, + "outFile": "./outFile.js" + } + }, + "version": "FakeTSVersion", + "size": 926 +} + + + +Change:: with declaration and declarationMap, should not re-emit +Input:: + + +Output:: +/lib/tsc --p /src/project --declaration --declarationMap +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "declaration": true, + "declarationMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + diff --git a/tests/baselines/reference/tsc/incremental/different-options-with-incremental.js b/tests/baselines/reference/tsc/incremental/different-options-with-incremental.js new file mode 100644 index 0000000000000..55aeaa0cb391d --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/different-options-with-incremental.js @@ -0,0 +1,1853 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/a.ts] +export const a = 10;const aLocal = 10; + +//// [/src/project/b.ts] +export const b = 10;const bLocal = 10; + +//// [/src/project/c.ts] +import { a } from "./a";export const c = a; + +//// [/src/project/d.ts] +import { b } from "./b";export const d = b; + +//// [/src/project/tsconfig.json] +{ + "compilerOptions": { + "incremental": true + } +} + + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project/a.ts (used version) +/src/project/b.ts (used version) +/src/project/c.ts (used version) +/src/project/d.ts (used version) + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 10; + + +//// [/src/project/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; + + +//// [/src/project/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; + + +//// [/src/project/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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},"-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": { + "version": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-18487752940-export const a = 10;const aLocal = 10;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 940 +} + + + +Change:: with sourceMap +Input:: + + +Output:: +/lib/tsc --p /src/project --sourceMap +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "project": "/src/project", + "sourceMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 10; +//# sourceMappingURL=a.js.map + +//// [/src/project/a.js.map] +{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":";;;AAAa,QAAA,CAAC,GAAG,EAAE,CAAC;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC"} + +//// [/src/project/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; +//# sourceMappingURL=b.js.map + +//// [/src/project/b.js.map] +{"version":3,"file":"b.js","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":";;;AAAa,QAAA,CAAC,GAAG,EAAE,CAAC;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC"} + +//// [/src/project/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; +//# sourceMappingURL=c.js.map + +//// [/src/project/c.js.map] +{"version":3,"file":"c.js","sourceRoot":"","sources":["c.ts"],"names":[],"mappings":";;;AAAA,yBAAwB;AAAa,QAAA,CAAC,GAAG,KAAC,CAAC"} + +//// [/src/project/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; +//# sourceMappingURL=d.js.map + +//// [/src/project/d.js.map] +{"version":3,"file":"d.js","sourceRoot":"","sources":["d.ts"],"names":[],"mappings":";;;AAAA,yBAAwB;AAAa,QAAA,CAAC,GAAG,KAAC,CAAC"} + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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},"-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"sourceMap":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": { + "version": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-18487752940-export const a = 10;const aLocal = 10;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "sourceMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 969 +} + + + +Change:: should re-emit only js so they dont contain sourcemap +Input:: + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 10; + + +//// [/src/project/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; + + +//// [/src/project/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; + + +//// [/src/project/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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},"-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": { + "version": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-18487752940-export const a = 10;const aLocal = 10;" + }, + "./b.ts": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-6189287562-export const b = 10;const bLocal = 10;" + }, + "./c.ts": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "3248317647-import { a } from \"./a\";export const c = a;" + }, + "./d.ts": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-19615769517-import { b } from \"./b\";export const d = b;" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 940 +} + + + +Change:: with declaration, emit Dts and should not emit js +Input:: + + +Output:: +/lib/tsc --p /src/project --declaration +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "project": "/src/project", + "declaration": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.d.ts] +export declare const a = 10; + + +//// [/src/project/b.d.ts] +export declare const b = 10; + + +//// [/src/project/c.d.ts] +export declare const c = 10; + + +//// [/src/project/d.d.ts] +export declare const d = 10; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-18487752940-export const a = 10;const aLocal = 10;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"declaration":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1247 +} + + + +Change:: with declaration and declarationMap +Input:: + + +Output:: +/lib/tsc --p /src/project --declaration --declarationMap +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "project": "/src/project", + "declaration": true, + "declarationMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.d.ts] +export declare const a = 10; +//# sourceMappingURL=a.d.ts.map + +//// [/src/project/a.d.ts.map] +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,KAAK,CAAC"} + +//// [/src/project/b.d.ts] +export declare const b = 10; +//# sourceMappingURL=b.d.ts.map + +//// [/src/project/b.d.ts.map] +{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,KAAK,CAAC"} + +//// [/src/project/c.d.ts] +export declare const c = 10; +//# sourceMappingURL=c.d.ts.map + +//// [/src/project/c.d.ts.map] +{"version":3,"file":"c.d.ts","sourceRoot":"","sources":["c.ts"],"names":[],"mappings":"AAAwB,eAAO,MAAM,CAAC,KAAI,CAAC"} + +//// [/src/project/d.d.ts] +export declare const d = 10; +//# sourceMappingURL=d.d.ts.map + +//// [/src/project/d.d.ts.map] +{"version":3,"file":"d.d.ts","sourceRoot":"","sources":["d.ts"],"names":[],"mappings":"AAAwB,eAAO,MAAM,CAAC,KAAI,CAAC"} + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-18487752940-export const a = 10;const aLocal = 10;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"declaration":true,"declarationMap":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true, + "declarationMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1269 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: local change +Input:: +//// [/src/project/a.ts] +export const a = 10;const aLocal = 100; + + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project/a.ts + +Shape signatures in builder refreshed for:: +/src/project/a.ts (computed .d.ts) + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 100; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-17390360476-export const a = 10;const aLocal = 100;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1217 +} + + + +Change:: with declaration and declarationMap +Input:: + + +Output:: +/lib/tsc --p /src/project --declaration --declarationMap +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "project": "/src/project", + "declaration": true, + "declarationMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.d.ts] file written with same contents +//// [/src/project/a.d.ts.map] file written with same contents +//// [/src/project/b.d.ts] file written with same contents +//// [/src/project/b.d.ts.map] file written with same contents +//// [/src/project/c.d.ts] file written with same contents +//// [/src/project/c.d.ts.map] file written with same contents +//// [/src/project/d.d.ts] file written with same contents +//// [/src/project/d.d.ts.map] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-17390360476-export const a = 10;const aLocal = 100;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"declaration":true,"declarationMap":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true, + "declarationMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1270 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: with inlineSourceMap +Input:: + + +Output:: +/lib/tsc --p /src/project --inlineSourceMap +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "project": "/src/project", + "inlineSourceMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 100; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQWEsUUFBQSxDQUFDLEdBQUcsRUFBRSxDQUFDO0FBQUEsSUFBTSxNQUFNLEdBQUcsR0FBRyxDQUFDIn0= + +//// [/src/project/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQWEsUUFBQSxDQUFDLEdBQUcsRUFBRSxDQUFDO0FBQUEsSUFBTSxNQUFNLEdBQUcsRUFBRSxDQUFDIn0= + +//// [/src/project/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEseUJBQXdCO0FBQWEsUUFBQSxDQUFDLEdBQUcsS0FBQyxDQUFDIn0= + +//// [/src/project/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEseUJBQXdCO0FBQWEsUUFBQSxDQUFDLEdBQUcsS0FBQyxDQUFDIn0= + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-17390360476-export const a = 10;const aLocal = 100;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"inlineSourceMap":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "inlineSourceMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1252 +} + + + +Change:: with sourceMap +Input:: + + +Output:: +/lib/tsc --p /src/project --sourceMap +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "project": "/src/project", + "sourceMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 100; +//# sourceMappingURL=a.js.map + +//// [/src/project/a.js.map] +{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":";;;AAAa,QAAA,CAAC,GAAG,EAAE,CAAC;AAAA,IAAM,MAAM,GAAG,GAAG,CAAC"} + +//// [/src/project/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; +//# sourceMappingURL=b.js.map + +//// [/src/project/b.js.map] file written with same contents +//// [/src/project/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; +//# sourceMappingURL=c.js.map + +//// [/src/project/c.js.map] file written with same contents +//// [/src/project/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; +//# sourceMappingURL=d.js.map + +//// [/src/project/d.js.map] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-17390360476-export const a = 10;const aLocal = 100;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"sourceMap":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "sourceMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1246 +} + + + +Change:: emit js files +Input:: + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 100; + + +//// [/src/project/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; + + +//// [/src/project/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; + + +//// [/src/project/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-17390360476-export const a = 10;const aLocal = 100;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1217 +} + + + +Change:: with declaration and declarationMap +Input:: + + +Output:: +/lib/tsc --p /src/project --declaration --declarationMap +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "project": "/src/project", + "declaration": true, + "declarationMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.d.ts] file written with same contents +//// [/src/project/a.d.ts.map] file written with same contents +//// [/src/project/b.d.ts] file written with same contents +//// [/src/project/b.d.ts.map] file written with same contents +//// [/src/project/c.d.ts] file written with same contents +//// [/src/project/c.d.ts.map] file written with same contents +//// [/src/project/d.d.ts] file written with same contents +//// [/src/project/d.d.ts.map] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-17390360476-export const a = 10;const aLocal = 100;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"declaration":true,"declarationMap":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "declaration": true, + "declarationMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1270 +} + + + +Change:: with declaration and declarationMap, should not re-emit +Input:: + + +Output:: +/lib/tsc --p /src/project --declaration --declarationMap +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "incremental": true, + "project": "/src/project", + "declaration": true, + "declarationMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + diff --git a/tests/baselines/reference/tsc/incremental/different-options-with-outFile-discrepancies.js b/tests/baselines/reference/tsc/incremental/different-options-with-outFile-discrepancies.js new file mode 100644 index 0000000000000..c6e40e5d0a283 --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/different-options-with-outFile-discrepancies.js @@ -0,0 +1,221 @@ +2:: with declaration should not emit anything +Clean build tsbuildinfo will have compilerOptions with composite and declaration +Incremental build will detect that it doesnt need to rebuild so tsbuild info is from before which has option composite only +TsBuild info text without affectedFilesPendingEmit:: /src/outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +6:: with emitDeclarationOnly should not emit anything +Clean build tsbuildinfo will have compilerOptions with composite and emitDeclarationOnly +Incremental build will detect that it doesnt need to rebuild so tsbuild info is from before which has option composite only +Clean build info does not have js section because its fresh build +Incremental build info has js section from old build +TsBuild info text without affectedFilesPendingEmit:: /src/outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "emitDeclarationOnly": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +9:: with declaration should not emit anything +Clean build tsbuildinfo will have compilerOptions with composite and declaration +Incremental build will detect that it doesnt need to rebuild so tsbuild info is from before which has option composite only +TsBuild info text without affectedFilesPendingEmit:: /src/outfile.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "declaration": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsc/incremental/different-options-with-outFile.js b/tests/baselines/reference/tsc/incremental/different-options-with-outFile.js new file mode 100644 index 0000000000000..5a63c62a53519 --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/different-options-with-outFile.js @@ -0,0 +1,1354 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/a.ts] +export const a = 10;const aLocal = 10; + +//// [/src/project/b.ts] +export const b = 10;const bLocal = 10; + +//// [/src/project/c.ts] +import { a } from "./a";export const c = a; + +//// [/src/project/d.ts] +import { b } from "./b";export const d = b; + +//// [/src/project/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "outFile": "../outFile.js", + "module": "amd" + } +} + + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.d.ts] +declare module "a" { + export const a = 10; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c = 10; +} +declare module "d" { + export const d = 10; +} + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 10; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); + + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1184 +} + + + +Change:: with sourceMap +Input:: + + +Output:: +/lib/tsc --p /src/project --sourceMap +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "sourceMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 10; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); +//# sourceMappingURL=outFile.js.map + +//// [/src/outFile.js.map] +{"version":3,"file":"outFile.js","sourceRoot":"","sources":["project/a.ts","project/b.ts","project/c.ts","project/d.ts"],"names":[],"mappings":";;;;IAAa,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,IAAM,MAAM,GAAG,EAAE,CAAC;;;;;;ICAzB,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,IAAM,MAAM,GAAG,EAAE,CAAC;;;;;;ICAD,QAAA,CAAC,GAAG,KAAC,CAAC;;;;;;ICAN,QAAA,CAAC,GAAG,KAAC,CAAC"} + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"module":2,"outFile":"./outFile.js","sourceMap":true},"outSignature":"-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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./outFile.js", + "sourceMap": true + }, + "outSignature": "-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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1201 +} + + + +Change:: should re-emit only js so they dont contain sourcemap +Input:: + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 10; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); + + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1184 +} + + + +Change:: with declaration should not emit anything +Input:: + + +Output:: +/lib/tsc --p /src/project --declaration +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "declaration": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: with declaration and declarationMap +Input:: + + +Output:: +/lib/tsc --p /src/project --declaration --declarationMap +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "declaration": true, + "declarationMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.d.ts] +declare module "a" { + export const a = 10; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c = 10; +} +declare module "d" { + export const d = 10; +} +//# sourceMappingURL=outFile.d.ts.map + +//// [/src/outFile.d.ts.map] +{"version":3,"file":"outFile.d.ts","sourceRoot":"","sources":["project/a.ts","project/b.ts","project/c.ts","project/d.ts"],"names":[],"mappings":";IAAA,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;;ICApB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;;ICAI,MAAM,CAAC,MAAM,CAAC,KAAI,CAAC;;;ICAnB,MAAM,CAAC,MAAM,CAAC,KAAI,CAAC"} + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"declaration":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1225 +} + + + +Change:: should re-emit only dts so they dont contain sourcemap +Input:: + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.d.ts] +declare module "a" { + export const a = 10; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c = 10; +} +declare module "d" { + export const d = 10; +} + + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-18487752940-export const a = 10;const aLocal = 10;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-18487752940-export const a = 10;const aLocal = 10;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1184 +} + + + +Change:: with emitDeclarationOnly should not emit anything +Input:: + + +Output:: +/lib/tsc --p /src/project --emitDeclarationOnly +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "emitDeclarationOnly": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: local change +Input:: +//// [/src/project/a.ts] +export const a = 10;const aLocal = 100; + + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 100; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); + + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-17390360476-export const a = 10;const aLocal = 100;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1185 +} + + + +Change:: with declaration should not emit anything +Input:: + + +Output:: +/lib/tsc --p /src/project --declaration +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "declaration": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + + + +Change:: with inlineSourceMap +Input:: + + +Output:: +/lib/tsc --p /src/project --inlineSourceMap +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "inlineSourceMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 100; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3V0RmlsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInByb2plY3QvYS50cyIsInByb2plY3QvYi50cyIsInByb2plY3QvYy50cyIsInByb2plY3QvZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0lBQWEsUUFBQSxDQUFDLEdBQUcsRUFBRSxDQUFDO0lBQUEsSUFBTSxNQUFNLEdBQUcsR0FBRyxDQUFDOzs7Ozs7SUNBMUIsUUFBQSxDQUFDLEdBQUcsRUFBRSxDQUFDO0lBQUEsSUFBTSxNQUFNLEdBQUcsRUFBRSxDQUFDOzs7Ozs7SUNBRCxRQUFBLENBQUMsR0FBRyxLQUFDLENBQUM7Ozs7OztJQ0FOLFFBQUEsQ0FBQyxHQUFHLEtBQUMsQ0FBQyJ9 + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-17390360476-export const a = 10;const aLocal = 100;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"inlineSourceMap":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "inlineSourceMap": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1208 +} + + + +Change:: with sourceMap +Input:: + + +Output:: +/lib/tsc --p /src/project --sourceMap +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/outFile.js", + "module": 2, + "project": "/src/project", + "sourceMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 100; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); +//# sourceMappingURL=outFile.js.map + +//// [/src/outFile.js.map] +{"version":3,"file":"outFile.js","sourceRoot":"","sources":["project/a.ts","project/b.ts","project/c.ts","project/d.ts"],"names":[],"mappings":";;;;IAAa,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,IAAM,MAAM,GAAG,GAAG,CAAC;;;;;;ICA1B,QAAA,CAAC,GAAG,EAAE,CAAC;IAAA,IAAM,MAAM,GAAG,EAAE,CAAC;;;;;;ICAD,QAAA,CAAC,GAAG,KAAC,CAAC;;;;;;ICAN,QAAA,CAAC,GAAG,KAAC,CAAC"} + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-17390360476-export const a = 10;const aLocal = 100;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"module":2,"outFile":"./outFile.js","sourceMap":true},"outSignature":"-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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "module": 2, + "outFile": "./outFile.js", + "sourceMap": true + }, + "outSignature": "-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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1202 +} + + + +Change:: declarationMap enabling +Input:: +//// [/src/project/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "outFile": "../outFile.js", + "module": "amd", + "declarationMap": true + } +} + + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/outFile.js", + "module": 2, + "declarationMap": true, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.d.ts] +declare module "a" { + export const a = 10; +} +declare module "b" { + export const b = 10; +} +declare module "c" { + export const c = 10; +} +declare module "d" { + export const d = 10; +} +//# sourceMappingURL=outFile.d.ts.map + +//// [/src/outFile.d.ts.map] file written with same contents +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 100; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); + + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-17390360476-export const a = 10;const aLocal = 100;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"},"outSignature":"-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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "declarationMap": true, + "module": 2, + "outFile": "./outFile.js" + }, + "outSignature": "-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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1207 +} + + + +Change:: with sourceMap should not emit d.ts +Input:: + + +Output:: +/lib/tsc --p /src/project --sourceMap +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "outFile": "/src/outFile.js", + "module": 2, + "declarationMap": true, + "project": "/src/project", + "sourceMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +No cached semantic diagnostics in the builder:: + +No shapes updated in the builder:: + + +//// [/src/outFile.js] +define("a", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.a = void 0; + exports.a = 10; + var aLocal = 100; +}); +define("b", ["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.b = void 0; + exports.b = 10; + var bLocal = 10; +}); +define("c", ["require", "exports", "a"], function (require, exports, a_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.c = void 0; + exports.c = a_1.a; +}); +define("d", ["require", "exports", "b"], function (require, exports, b_1) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.d = void 0; + exports.d = b_1.b; +}); +//# sourceMappingURL=outFile.js.map + +//// [/src/outFile.js.map] file written with same contents +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.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; };","-17390360476-export const a = 10;const aLocal = 100;","-6189287562-export const b = 10;const bLocal = 10;","3248317647-import { a } from \"./a\";export const c = a;","-19615769517-import { b } from \"./b\";export const d = b;"],"root":[[2,5]],"options":{"composite":true,"declarationMap":true,"module":2,"outFile":"./outFile.js","sourceMap":true},"outSignature":"-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","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ], + "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; };", + "./project/a.ts": "-17390360476-export const a = 10;const aLocal = 100;", + "./project/b.ts": "-6189287562-export const b = 10;const bLocal = 10;", + "./project/c.ts": "3248317647-import { a } from \"./a\";export const c = a;", + "./project/d.ts": "-19615769517-import { b } from \"./b\";export const d = b;" + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./project/a.ts", + "./project/b.ts", + "./project/c.ts", + "./project/d.ts" + ] + ] + ], + "options": { + "composite": true, + "declarationMap": true, + "module": 2, + "outFile": "./outFile.js", + "sourceMap": true + }, + "outSignature": "-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", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 1224 +} + diff --git a/tests/baselines/reference/tsc/incremental/different-options.js b/tests/baselines/reference/tsc/incremental/different-options.js new file mode 100644 index 0000000000000..aa61c713d81c8 --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/different-options.js @@ -0,0 +1,1923 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/a.ts] +export const a = 10;const aLocal = 10; + +//// [/src/project/b.ts] +export const b = 10;const bLocal = 10; + +//// [/src/project/c.ts] +import { a } from "./a";export const c = a; + +//// [/src/project/d.ts] +import { b } from "./b";export const d = b; + +//// [/src/project/tsconfig.json] +{ + "compilerOptions": { + "composite": true + } +} + + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project/a.ts (computed .d.ts during emit) +/src/project/b.ts (computed .d.ts during emit) +/src/project/c.ts (computed .d.ts during emit) +/src/project/d.ts (computed .d.ts during emit) + + +//// [/src/project/a.d.ts] +export declare const a = 10; + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 10; + + +//// [/src/project/b.d.ts] +export declare const b = 10; + + +//// [/src/project/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; + + +//// [/src/project/c.d.ts] +export declare const c = 10; + + +//// [/src/project/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; + + +//// [/src/project/d.d.ts] +export declare const d = 10; + + +//// [/src/project/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-18487752940-export const a = 10;const aLocal = 10;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./d.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./d.d.ts" + }, + "version": "FakeTSVersion", + "size": 1279 +} + + + +Change:: with sourceMap +Input:: + + +Output:: +/lib/tsc --p /src/project --sourceMap +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "project": "/src/project", + "sourceMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 10; +//# sourceMappingURL=a.js.map + +//// [/src/project/a.js.map] +{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":";;;AAAa,QAAA,CAAC,GAAG,EAAE,CAAC;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC"} + +//// [/src/project/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; +//# sourceMappingURL=b.js.map + +//// [/src/project/b.js.map] +{"version":3,"file":"b.js","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":";;;AAAa,QAAA,CAAC,GAAG,EAAE,CAAC;AAAA,IAAM,MAAM,GAAG,EAAE,CAAC"} + +//// [/src/project/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; +//# sourceMappingURL=c.js.map + +//// [/src/project/c.js.map] +{"version":3,"file":"c.js","sourceRoot":"","sources":["c.ts"],"names":[],"mappings":";;;AAAA,yBAAwB;AAAa,QAAA,CAAC,GAAG,KAAC,CAAC"} + +//// [/src/project/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; +//# sourceMappingURL=d.js.map + +//// [/src/project/d.js.map] +{"version":3,"file":"d.js","sourceRoot":"","sources":["d.ts"],"names":[],"mappings":";;;AAAA,yBAAwB;AAAa,QAAA,CAAC,GAAG,KAAC,CAAC"} + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-18487752940-export const a = 10;const aLocal = 10;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true,"sourceMap":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./d.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "sourceMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./d.d.ts" + }, + "version": "FakeTSVersion", + "size": 1296 +} + + + +Change:: should re-emit only js so they dont contain sourcemap +Input:: + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 10; + + +//// [/src/project/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; + + +//// [/src/project/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; + + +//// [/src/project/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-18487752940-export const a = 10;const aLocal = 10;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./d.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./d.d.ts" + }, + "version": "FakeTSVersion", + "size": 1279 +} + + + +Change:: with declaration should not emit anything +Input:: + + +Output:: +/lib/tsc --p /src/project --declaration +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "project": "/src/project", + "declaration": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: with declaration and declarationMap +Input:: + + +Output:: +/lib/tsc --p /src/project --declaration --declarationMap +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "project": "/src/project", + "declaration": true, + "declarationMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.d.ts] +export declare const a = 10; +//# sourceMappingURL=a.d.ts.map + +//// [/src/project/a.d.ts.map] +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,KAAK,CAAC"} + +//// [/src/project/b.d.ts] +export declare const b = 10; +//# sourceMappingURL=b.d.ts.map + +//// [/src/project/b.d.ts.map] +{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC,KAAK,CAAC"} + +//// [/src/project/c.d.ts] +export declare const c = 10; +//# sourceMappingURL=c.d.ts.map + +//// [/src/project/c.d.ts.map] +{"version":3,"file":"c.d.ts","sourceRoot":"","sources":["c.ts"],"names":[],"mappings":"AAAwB,eAAO,MAAM,CAAC,KAAI,CAAC"} + +//// [/src/project/d.d.ts] +export declare const d = 10; +//# sourceMappingURL=d.d.ts.map + +//// [/src/project/d.d.ts.map] +{"version":3,"file":"d.d.ts","sourceRoot":"","sources":["d.ts"],"names":[],"mappings":"AAAwB,eAAO,MAAM,CAAC,KAAI,CAAC"} + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-18487752940-export const a = 10;const aLocal = 10;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true,"declaration":true,"declarationMap":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./d.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./d.d.ts" + }, + "version": "FakeTSVersion", + "size": 1320 +} + + + +Change:: should re-emit only dts so they dont contain sourcemap +Input:: + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.d.ts] +export declare const a = 10; + + +//// [/src/project/b.d.ts] +export declare const b = 10; + + +//// [/src/project/c.d.ts] +export declare const c = 10; + + +//// [/src/project/d.d.ts] +export declare const d = 10; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-18487752940-export const a = 10;const aLocal = 10;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./d.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-18487752940-export const a = 10;const aLocal = 10;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./d.d.ts" + }, + "version": "FakeTSVersion", + "size": 1279 +} + + + +Change:: with emitDeclarationOnly should not emit anything +Input:: + + +Output:: +/lib/tsc --p /src/project --emitDeclarationOnly +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "project": "/src/project", + "emitDeclarationOnly": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: local change +Input:: +//// [/src/project/a.ts] +export const a = 10;const aLocal = 100; + + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: +/src/project/a.ts + +Shape signatures in builder refreshed for:: +/src/project/a.ts (computed .d.ts) + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 100; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-17390360476-export const a = 10;const aLocal = 100;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./d.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./d.d.ts" + }, + "version": "FakeTSVersion", + "size": 1280 +} + + + +Change:: with declaration should not emit anything +Input:: + + +Output:: +/lib/tsc --p /src/project --declaration +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "project": "/src/project", + "declaration": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: with inlineSourceMap +Input:: + + +Output:: +/lib/tsc --p /src/project --inlineSourceMap +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "project": "/src/project", + "inlineSourceMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 100; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQWEsUUFBQSxDQUFDLEdBQUcsRUFBRSxDQUFDO0FBQUEsSUFBTSxNQUFNLEdBQUcsR0FBRyxDQUFDIn0= + +//// [/src/project/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQWEsUUFBQSxDQUFDLEdBQUcsRUFBRSxDQUFDO0FBQUEsSUFBTSxNQUFNLEdBQUcsRUFBRSxDQUFDIn0= + +//// [/src/project/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEseUJBQXdCO0FBQWEsUUFBQSxDQUFDLEdBQUcsS0FBQyxDQUFDIn0= + +//// [/src/project/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEseUJBQXdCO0FBQWEsUUFBQSxDQUFDLEdBQUcsS0FBQyxDQUFDIn0= + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-17390360476-export const a = 10;const aLocal = 100;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true,"inlineSourceMap":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./d.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "inlineSourceMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./d.d.ts" + }, + "version": "FakeTSVersion", + "size": 1303 +} + + + +Change:: with sourceMap +Input:: + + +Output:: +/lib/tsc --p /src/project --sourceMap +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "project": "/src/project", + "sourceMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 100; +//# sourceMappingURL=a.js.map + +//// [/src/project/a.js.map] +{"version":3,"file":"a.js","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":";;;AAAa,QAAA,CAAC,GAAG,EAAE,CAAC;AAAA,IAAM,MAAM,GAAG,GAAG,CAAC"} + +//// [/src/project/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; +//# sourceMappingURL=b.js.map + +//// [/src/project/b.js.map] file written with same contents +//// [/src/project/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; +//# sourceMappingURL=c.js.map + +//// [/src/project/c.js.map] file written with same contents +//// [/src/project/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; +//# sourceMappingURL=d.js.map + +//// [/src/project/d.js.map] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-17390360476-export const a = 10;const aLocal = 100;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true,"sourceMap":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./d.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "sourceMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./d.d.ts" + }, + "version": "FakeTSVersion", + "size": 1297 +} + + + +Change:: declarationMap enabling +Input:: +//// [/src/project/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "declarationMap": true + } +} + + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "declarationMap": true, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.d.ts] +export declare const a = 10; +//# sourceMappingURL=a.d.ts.map + +//// [/src/project/a.d.ts.map] file written with same contents +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 100; + + +//// [/src/project/b.d.ts] +export declare const b = 10; +//# sourceMappingURL=b.d.ts.map + +//// [/src/project/b.d.ts.map] file written with same contents +//// [/src/project/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; + + +//// [/src/project/c.d.ts] +export declare const c = 10; +//# sourceMappingURL=c.d.ts.map + +//// [/src/project/c.d.ts.map] file written with same contents +//// [/src/project/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; + + +//// [/src/project/d.d.ts] +export declare const d = 10; +//# sourceMappingURL=d.d.ts.map + +//// [/src/project/d.d.ts.map] file written with same contents +//// [/src/project/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-17390360476-export const a = 10;const aLocal = 100;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true,"declarationMap":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./d.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "declarationMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./d.d.ts" + }, + "version": "FakeTSVersion", + "size": 1302 +} + + + +Change:: with sourceMap should not emit d.ts +Input:: + + +Output:: +/lib/tsc --p /src/project --sourceMap +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/a.ts", + "/src/project/b.ts", + "/src/project/c.ts", + "/src/project/d.ts" +] +Program options: { + "composite": true, + "declarationMap": true, + "project": "/src/project", + "sourceMap": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/a.ts +/src/project/b.ts +/src/project/c.ts +/src/project/d.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/a.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.a = void 0; +exports.a = 10; +var aLocal = 100; +//# sourceMappingURL=a.js.map + +//// [/src/project/a.js.map] file written with same contents +//// [/src/project/b.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.b = void 0; +exports.b = 10; +var bLocal = 10; +//# sourceMappingURL=b.js.map + +//// [/src/project/b.js.map] file written with same contents +//// [/src/project/c.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.c = void 0; +var a_1 = require("./a"); +exports.c = a_1.a; +//# sourceMappingURL=c.js.map + +//// [/src/project/c.js.map] file written with same contents +//// [/src/project/d.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.d = void 0; +var b_1 = require("./b"); +exports.d = b_1.b; +//# sourceMappingURL=d.js.map + +//// [/src/project/d.js.map] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./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":"-17390360476-export const a = 10;const aLocal = 100;","signature":"-3497920574-export declare const a = 10;\n"},{"version":"-6189287562-export const b = 10;const bLocal = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"3248317647-import { a } from \"./a\";export const c = a;","signature":"-4160380540-export declare const c = 10;\n"},{"version":"-19615769517-import { b } from \"./b\";export const d = b;","signature":"-4491610523-export declare const d = 10;\n"}],"root":[[2,5]],"options":{"composite":true,"declarationMap":true,"sourceMap":true},"fileIdsList":[[2],[3]],"referencedMap":[[4,1],[5,2]],"semanticDiagnosticsPerFile":[1,2,3,4,5],"latestChangedDtsFile":"./d.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "fileNamesList": [ + [ + "./a.ts" + ], + [ + "./b.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": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "version": "-17390360476-export const a = 10;const aLocal = 100;", + "signature": "-3497920574-export declare const a = 10;\n" + }, + "./b.ts": { + "original": { + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "version": "-6189287562-export const b = 10;const bLocal = 10;", + "signature": "-3829150557-export declare const b = 10;\n" + }, + "./c.ts": { + "original": { + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "version": "3248317647-import { a } from \"./a\";export const c = a;", + "signature": "-4160380540-export declare const c = 10;\n" + }, + "./d.ts": { + "original": { + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + }, + "version": "-19615769517-import { b } from \"./b\";export const d = b;", + "signature": "-4491610523-export declare const d = 10;\n" + } + }, + "root": [ + [ + [ + 2, + 5 + ], + [ + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ] + ] + ], + "options": { + "composite": true, + "declarationMap": true, + "sourceMap": true + }, + "referencedMap": { + "./c.ts": [ + "./a.ts" + ], + "./d.ts": [ + "./b.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts", + "./c.ts", + "./d.ts" + ], + "latestChangedDtsFile": "./d.d.ts" + }, + "version": "FakeTSVersion", + "size": 1319 +} + diff --git a/tests/baselines/reference/tsc/incremental/file-deleted-before-fixing-error-with-noEmitOnError.js b/tests/baselines/reference/tsc/incremental/file-deleted-before-fixing-error-with-noEmitOnError.js new file mode 100644 index 0000000000000..ae8dc00d1cfed --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/file-deleted-before-fixing-error-with-noEmitOnError.js @@ -0,0 +1,250 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/file1.ts] +export const x: 30 = "hello"; + +//// [/src/project/file2.ts] +export class D { } + +//// [/src/project/tsconfig.json] +{ + "compilerOptions": { + "outDir": "outDir", + "noEmitOnError": true + } +} + + + +Output:: +/lib/tsc --p /src/project -i +src/project/file1.ts:1:14 - error TS2322: Type '"hello"' is not assignable to type '30'. + +1 export const x: 30 = "hello"; +   ~ + + +Found 1 error in src/project/file1.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/project/file1.ts", + "/src/project/file2.ts" +] +Program options: { + "outDir": "/src/project/outDir", + "noEmitOnError": true, + "project": "/src/project", + "incremental": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/file1.ts +/src/project/file2.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/project/file1.ts +/src/project/file2.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project/file1.ts (used version) +/src/project/file2.ts (used version) + + +//// [/src/project/outDir/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","../file1.ts","../file2.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},"-10927263693-export const x: 30 = \"hello\";","-7804761415-export class D { }"],"root":[2,3],"options":{"noEmitOnError":true,"outDir":"./"},"referencedMap":[],"semanticDiagnosticsPerFile":[1,[2,[{"file":"../file1.ts","start":13,"length":1,"code":2322,"category":1,"messageText":"Type '\"hello\"' is not assignable to type '30'."}]],3],"affectedFilesPendingEmit":[2,3]},"version":"FakeTSVersion"} + +//// [/src/project/outDir/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "../file1.ts", + "../file2.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 + }, + "../file1.ts": { + "version": "-10927263693-export const x: 30 = \"hello\";", + "signature": "-10927263693-export const x: 30 = \"hello\";" + }, + "../file2.ts": { + "version": "-7804761415-export class D { }", + "signature": "-7804761415-export class D { }" + } + }, + "root": [ + [ + 2, + "../file1.ts" + ], + [ + 3, + "../file2.ts" + ] + ], + "options": { + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + [ + "../file1.ts", + [ + { + "file": "../file1.ts", + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type '\"hello\"' is not assignable to type '30'." + } + ] + ], + "../file2.ts" + ], + "affectedFilesPendingEmit": [ + [ + "../file1.ts", + "Js" + ], + [ + "../file2.ts", + "Js" + ] + ] + }, + "version": "FakeTSVersion", + "size": 966 +} + + + +Change:: delete file without error +Input:: +//// [/src/project/file2.ts] unlink + + +Output:: +/lib/tsc --p /src/project -i +src/project/file1.ts:1:14 - error TS2322: Type '"hello"' is not assignable to type '30'. + +1 export const x: 30 = "hello"; +   ~ + + +Found 1 error in src/project/file1.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/src/project/file1.ts" +] +Program options: { + "outDir": "/src/project/outDir", + "noEmitOnError": true, + "project": "/src/project", + "incremental": true, + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/file1.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + +//// [/src/project/outDir/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../lib/lib.d.ts","../file1.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},"-10927263693-export const x: 30 = \"hello\";"],"root":[2],"options":{"noEmitOnError":true,"outDir":"./"},"referencedMap":[],"semanticDiagnosticsPerFile":[1,[2,[{"file":"../file1.ts","start":13,"length":1,"code":2322,"category":1,"messageText":"Type '\"hello\"' is not assignable to type '30'."}]]],"affectedFilesPendingEmit":[2]},"version":"FakeTSVersion"} + +//// [/src/project/outDir/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../lib/lib.d.ts", + "../file1.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 + }, + "../file1.ts": { + "version": "-10927263693-export const x: 30 = \"hello\";", + "signature": "-10927263693-export const x: 30 = \"hello\";" + } + }, + "root": [ + [ + 2, + "../file1.ts" + ] + ], + "options": { + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../lib/lib.d.ts", + [ + "../file1.ts", + [ + { + "file": "../file1.ts", + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type '\"hello\"' is not assignable to type '30'." + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "../file1.ts", + "Js" + ] + ] + }, + "version": "FakeTSVersion", + "size": 913 +} + diff --git a/tests/baselines/reference/tsc/incremental/noEmit-changes-composite-discrepancies.js b/tests/baselines/reference/tsc/incremental/noEmit-changes-composite-discrepancies.js new file mode 100644 index 0000000000000..89e34f12e0d88 --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/noEmit-changes-composite-discrepancies.js @@ -0,0 +1,2082 @@ +0:: No Change run with noEmit +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/project/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./src/class.ts": { + "version": "545032748-export class classC {\n prop = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "emitSignatures": [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./src/class.ts": { + "version": "545032748-export class classC {\n prop = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +1:: No Change run with noEmit +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/project/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./src/class.ts": { + "version": "545032748-export class classC {\n prop = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "emitSignatures": [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./src/class.ts": { + "version": "545032748-export class classC {\n prop = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +2:: Introduce error but still noEmit +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/project/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./src/class.ts": { + "version": "1786859709-export class classC {\n prop1 = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + [ + "./src/directuse.ts", + [ + { + "file": "./src/directuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/indirectclass.ts", + [ + "./src/indirectuse.ts", + [ + { + "file": "./src/indirectuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "emitSignatures": [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./src/class.ts": { + "version": "1786859709-export class classC {\n prop1 = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + [ + "./src/directuse.ts", + [ + { + "file": "./src/directuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/indirectclass.ts", + [ + "./src/indirectuse.ts", + [ + { + "file": "./src/indirectuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "emitSignatures": [ + [ + "./src/class.ts", + "-9508063301-export declare class classC {\n prop: number;\n}\n" + ], + [ + "./src/directuse.ts", + "-3531856636-export {};\n" + ], + [ + "./src/indirectuse.ts", + "-3531856636-export {};\n" + ] + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +5:: No Change run with noEmit +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/project/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./src/class.ts": { + "version": "545032748-export class classC {\n prop = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "emitSignatures": [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./src/class.ts": { + "version": "545032748-export class classC {\n prop = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +6:: No Change run with noEmit +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/project/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./src/class.ts": { + "version": "545032748-export class classC {\n prop = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "emitSignatures": [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./src/class.ts": { + "version": "545032748-export class classC {\n prop = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +10:: No Change run with noEmit +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/project/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./src/class.ts": { + "version": "1786859709-export class classC {\n prop1 = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + [ + "./src/directuse.ts", + [ + { + "file": "./src/directuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/indirectclass.ts", + [ + "./src/indirectuse.ts", + [ + { + "file": "./src/indirectuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "emitSignatures": [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./src/class.ts": { + "version": "1786859709-export class classC {\n prop1 = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + [ + "./src/directuse.ts", + [ + { + "file": "./src/directuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/indirectclass.ts", + [ + "./src/indirectuse.ts", + [ + { + "file": "./src/indirectuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +11:: No Change run with noEmit +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/project/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./src/class.ts": { + "version": "1786859709-export class classC {\n prop1 = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + [ + "./src/directuse.ts", + [ + { + "file": "./src/directuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/indirectclass.ts", + [ + "./src/indirectuse.ts", + [ + { + "file": "./src/indirectuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "emitSignatures": [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./src/class.ts": { + "version": "1786859709-export class classC {\n prop1 = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + [ + "./src/directuse.ts", + [ + { + "file": "./src/directuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/indirectclass.ts", + [ + "./src/indirectuse.ts", + [ + { + "file": "./src/indirectuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +13:: Fix error and no emit +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/project/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./src/class.ts": { + "version": "545032748-export class classC {\n prop = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "emitSignatures": [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./src/class.ts": { + "version": "545032748-export class classC {\n prop = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "emitSignatures": [ + [ + "./src/class.ts", + "-12157283604-export declare class classC {\n prop1: number;\n}\n" + ], + [ + "./src/directuse.ts", + "-3531856636-export {};\n" + ], + [ + "./src/indirectuse.ts", + "-3531856636-export {};\n" + ] + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +15:: No Change run with noEmit +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/project/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./src/class.ts": { + "version": "545032748-export class classC {\n prop = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "emitSignatures": [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./src/class.ts": { + "version": "545032748-export class classC {\n prop = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} +16:: No Change run with noEmit +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/project/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./src/class.ts": { + "version": "545032748-export class classC {\n prop = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "emitSignatures": [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./src/class.ts": { + "version": "545032748-export class classC {\n prop = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsc/incremental/noEmit-changes-composite.js b/tests/baselines/reference/tsc/incremental/noEmit-changes-composite.js new file mode 100644 index 0000000000000..7b8ef0bd5fb45 --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/noEmit-changes-composite.js @@ -0,0 +1,1623 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/src/class.ts] +export class classC { + prop = 1; +} + +//// [/src/project/src/directUse.ts] +import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop; + +//// [/src/project/src/indirectClass.ts] +import { classC } from './class'; +export class indirectClass { + classC = new classC(); +} + +//// [/src/project/src/indirectUse.ts] +import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop; + +//// [/src/project/src/noChangeFile.ts] +export function writeLog(s: string) { +} + +//// [/src/project/src/noChangeFileWithEmitSpecificError.ts] +function someFunc(arguments: boolean, ...rest: any[]) { +} + +//// [/src/project/tsconfig.json] +{ + "compilerOptions": { + "composite": true + } +} + + + +Output:: +/lib/tsc --p src/project +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 1 error in src/project/src/noChangeFileWithEmitSpecificError.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/src/class.d.ts] +export declare class classC { + prop: number; +} + + +//// [/src/project/src/class.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.classC = void 0; +var classC = /** @class */ (function () { + function classC() { + this.prop = 1; + } + return classC; +}()); +exports.classC = classC; + + +//// [/src/project/src/directUse.d.ts] +export {}; + + +//// [/src/project/src/directUse.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var indirectClass_1 = require("./indirectClass"); +new indirectClass_1.indirectClass().classC.prop; + + +//// [/src/project/src/indirectClass.d.ts] +import { classC } from './class'; +export declare class indirectClass { + classC: classC; +} + + +//// [/src/project/src/indirectClass.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.indirectClass = void 0; +var class_1 = require("./class"); +var indirectClass = /** @class */ (function () { + function indirectClass() { + this.classC = new class_1.classC(); + } + return indirectClass; +}()); +exports.indirectClass = indirectClass; + + +//// [/src/project/src/indirectUse.d.ts] +export {}; + + +//// [/src/project/src/indirectUse.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var indirectClass_1 = require("./indirectClass"); +new indirectClass_1.indirectClass().classC.prop; + + +//// [/src/project/src/noChangeFile.d.ts] +export declare function writeLog(s: string): void; + + +//// [/src/project/src/noChangeFile.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.writeLog = writeLog; +function writeLog(s) { +} + + +//// [/src/project/src/noChangeFileWithEmitSpecificError.d.ts] +declare function someFunc(arguments: boolean, ...rest: any[]): void; + + +//// [/src/project/src/noChangeFileWithEmitSpecificError.js] +function someFunc(arguments) { + var rest = []; + for (var _i = 1; _i < arguments.length; _i++) { + rest[_i - 1] = arguments[_i]; + } +} + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"545032748-export class classC {\n prop = 1;\n}","signature":"-9508063301-export declare class classC {\n prop: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8055010000-export declare function writeLog(s: string): void;\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n","affectsGlobalScope":true}],"root":[[2,7]],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"latestChangedDtsFile":"./src/noChangeFileWithEmitSpecificError.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/indirectuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/nochangefile.ts": { + "original": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "latestChangedDtsFile": "./src/noChangeFileWithEmitSpecificError.d.ts" + }, + "version": "FakeTSVersion", + "size": 2211 +} + + + +Change:: No Change run with noEmit +Input:: + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with noEmit +Input:: + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + + + +Change:: Introduce error but still noEmit +Input:: +//// [/src/project/src/class.ts] +export class classC { + prop1 = 1; +} + + + +Output:: +/lib/tsc --p src/project --noEmit +src/project/src/directUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/indirectUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + + +Found 2 errors in 2 files. + +Errors Files + 1 src/project/src/directUse.ts:2 + 1 src/project/src/indirectUse.ts:2 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"1786859709-export class classC {\n prop1 = 1;\n}","signature":"-12157283604-export declare class classC {\n prop1: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;",{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8055010000-export declare function writeLog(s: string): void;\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n","affectsGlobalScope":true}],"root":[[2,7]],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,[4,[{"file":"./src/directuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],3,[5,[{"file":"./src/indirectuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"affectedFilesPendingEmit":[2,[4],3,[5]],"emitSignatures":[[2,"-9508063301-export declare class classC {\n prop: number;\n}\n"],[4,"-3531856636-export {};\n"],[5,"-3531856636-export {};\n"]],"latestChangedDtsFile":"./src/noChangeFileWithEmitSpecificError.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "1786859709-export class classC {\n prop1 = 1;\n}", + "signature": "-12157283604-export declare class classC {\n prop1: number;\n}\n" + }, + "version": "1786859709-export class classC {\n prop1 = 1;\n}", + "signature": "-12157283604-export declare class classC {\n prop1: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "original": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + [ + "./src/directuse.ts", + [ + { + "file": "./src/directuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/indirectclass.ts", + [ + "./src/indirectuse.ts", + [ + { + "file": "./src/indirectuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "./src/class.ts", + "Js | Dts" + ], + [ + [ + "./src/directuse.ts" + ], + "Dts" + ], + [ + "./src/indirectclass.ts", + "Js | Dts" + ], + [ + [ + "./src/indirectuse.ts" + ], + "Dts" + ] + ], + "emitSignatures": [ + [ + "./src/class.ts", + "-9508063301-export declare class classC {\n prop: number;\n}\n" + ], + [ + "./src/directuse.ts", + "-3531856636-export {};\n" + ], + [ + "./src/indirectuse.ts", + "-3531856636-export {};\n" + ] + ], + "latestChangedDtsFile": "./src/noChangeFileWithEmitSpecificError.d.ts" + }, + "version": "FakeTSVersion", + "size": 2921 +} + + + +Change:: Fix error and emit +Input:: +//// [/src/project/src/class.ts] +export class classC { + prop = 1; +} + + + +Output:: +/lib/tsc --p src/project +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 1 error in src/project/src/noChangeFileWithEmitSpecificError.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/src/class.js] file written with same contents +//// [/src/project/src/indirectClass.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"545032748-export class classC {\n prop = 1;\n}","signature":"-9508063301-export declare class classC {\n prop: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8055010000-export declare function writeLog(s: string): void;\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n","affectsGlobalScope":true}],"root":[[2,7]],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"latestChangedDtsFile":"./src/noChangeFileWithEmitSpecificError.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/indirectuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/nochangefile.ts": { + "original": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "latestChangedDtsFile": "./src/noChangeFileWithEmitSpecificError.d.ts" + }, + "version": "FakeTSVersion", + "size": 2211 +} + + + +Change:: No Change run with emit +Input:: + + +Output:: +/lib/tsc --p src/project +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 1 error in src/project/src/noChangeFileWithEmitSpecificError.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + + + +Change:: No Change run with noEmit +Input:: + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with noEmit +Input:: + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with emit +Input:: + + +Output:: +/lib/tsc --p src/project +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 1 error in src/project/src/noChangeFileWithEmitSpecificError.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + + + +Change:: Introduce error and emit +Input:: +//// [/src/project/src/class.ts] +export class classC { + prop1 = 1; +} + + + +Output:: +/lib/tsc --p src/project +src/project/src/directUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/indirectUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 3 errors in 3 files. + +Errors Files + 1 src/project/src/directUse.ts:2 + 1 src/project/src/indirectUse.ts:2 + 1 src/project/src/noChangeFileWithEmitSpecificError.ts:1 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/src/class.d.ts] +export declare class classC { + prop1: number; +} + + +//// [/src/project/src/class.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.classC = void 0; +var classC = /** @class */ (function () { + function classC() { + this.prop1 = 1; + } + return classC; +}()); +exports.classC = classC; + + +//// [/src/project/src/indirectClass.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"1786859709-export class classC {\n prop1 = 1;\n}","signature":"-12157283604-export declare class classC {\n prop1: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8055010000-export declare function writeLog(s: string): void;\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n","affectsGlobalScope":true}],"root":[[2,7]],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,[4,[{"file":"./src/directuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],3,[5,[{"file":"./src/indirectuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"latestChangedDtsFile":"./src/class.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "1786859709-export class classC {\n prop1 = 1;\n}", + "signature": "-12157283604-export declare class classC {\n prop1: number;\n}\n" + }, + "version": "1786859709-export class classC {\n prop1 = 1;\n}", + "signature": "-12157283604-export declare class classC {\n prop1: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/indirectuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/nochangefile.ts": { + "original": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + [ + "./src/directuse.ts", + [ + { + "file": "./src/directuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/indirectclass.ts", + [ + "./src/indirectuse.ts", + [ + { + "file": "./src/indirectuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "latestChangedDtsFile": "./src/class.d.ts" + }, + "version": "FakeTSVersion", + "size": 2801 +} + + + +Change:: No Change run with emit +Input:: + + +Output:: +/lib/tsc --p src/project +src/project/src/directUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/indirectUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 3 errors in 3 files. + +Errors Files + 1 src/project/src/directUse.ts:2 + 1 src/project/src/indirectUse.ts:2 + 1 src/project/src/noChangeFileWithEmitSpecificError.ts:1 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + + + +Change:: No Change run with noEmit +Input:: + + +Output:: +/lib/tsc --p src/project --noEmit +src/project/src/directUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/indirectUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + + +Found 2 errors in 2 files. + +Errors Files + 1 src/project/src/directUse.ts:2 + 1 src/project/src/indirectUse.ts:2 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + + + +Change:: No Change run with noEmit +Input:: + + +Output:: +/lib/tsc --p src/project --noEmit +src/project/src/directUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/indirectUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + + +Found 2 errors in 2 files. + +Errors Files + 1 src/project/src/directUse.ts:2 + 1 src/project/src/indirectUse.ts:2 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + + + +Change:: No Change run with emit +Input:: + + +Output:: +/lib/tsc --p src/project +src/project/src/directUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/indirectUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 3 errors in 3 files. + +Errors Files + 1 src/project/src/directUse.ts:2 + 1 src/project/src/indirectUse.ts:2 + 1 src/project/src/noChangeFileWithEmitSpecificError.ts:1 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + + + +Change:: Fix error and no emit +Input:: +//// [/src/project/src/class.ts] +export class classC { + prop = 1; +} + + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"545032748-export class classC {\n prop = 1;\n}","signature":"-9508063301-export declare class classC {\n prop: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;",{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8055010000-export declare function writeLog(s: string): void;\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n","affectsGlobalScope":true}],"root":[[2,7]],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"affectedFilesPendingEmit":[2,[4],3,[5]],"emitSignatures":[[2,"-12157283604-export declare class classC {\n prop1: number;\n}\n"],[4,"-3531856636-export {};\n"],[5,"-3531856636-export {};\n"]],"latestChangedDtsFile":"./src/class.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "original": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "./src/class.ts", + "Js | Dts" + ], + [ + [ + "./src/directuse.ts" + ], + "Dts" + ], + [ + "./src/indirectclass.ts", + "Js | Dts" + ], + [ + [ + "./src/indirectuse.ts" + ], + "Dts" + ] + ], + "emitSignatures": [ + [ + "./src/class.ts", + "-12157283604-export declare class classC {\n prop1: number;\n}\n" + ], + [ + "./src/directuse.ts", + "-3531856636-export {};\n" + ], + [ + "./src/indirectuse.ts", + "-3531856636-export {};\n" + ] + ], + "latestChangedDtsFile": "./src/class.d.ts" + }, + "version": "FakeTSVersion", + "size": 2277 +} + + + +Change:: No Change run with emit +Input:: + + +Output:: +/lib/tsc --p src/project +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 1 error in src/project/src/noChangeFileWithEmitSpecificError.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/src/class.d.ts] +export declare class classC { + prop: number; +} + + +//// [/src/project/src/class.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.classC = void 0; +var classC = /** @class */ (function () { + function classC() { + this.prop = 1; + } + return classC; +}()); +exports.classC = classC; + + +//// [/src/project/src/indirectClass.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"545032748-export class classC {\n prop = 1;\n}","signature":"-9508063301-export declare class classC {\n prop: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8055010000-export declare function writeLog(s: string): void;\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n","affectsGlobalScope":true}],"root":[[2,7]],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"latestChangedDtsFile":"./src/class.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/indirectuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/nochangefile.ts": { + "original": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "latestChangedDtsFile": "./src/class.d.ts" + }, + "version": "FakeTSVersion", + "size": 2183 +} + + + +Change:: No Change run with noEmit +Input:: + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with noEmit +Input:: + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with emit +Input:: + + +Output:: +/lib/tsc --p src/project +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 1 error in src/project/src/noChangeFileWithEmitSpecificError.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + diff --git a/tests/baselines/reference/tsc/incremental/noEmit-changes-incremental-declaration.js b/tests/baselines/reference/tsc/incremental/noEmit-changes-incremental-declaration.js new file mode 100644 index 0000000000000..d2abc1b2fb60a --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/noEmit-changes-incremental-declaration.js @@ -0,0 +1,1600 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/src/class.ts] +export class classC { + prop = 1; +} + +//// [/src/project/src/directUse.ts] +import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop; + +//// [/src/project/src/indirectClass.ts] +import { classC } from './class'; +export class indirectClass { + classC = new classC(); +} + +//// [/src/project/src/indirectUse.ts] +import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop; + +//// [/src/project/src/noChangeFile.ts] +export function writeLog(s: string) { +} + +//// [/src/project/src/noChangeFileWithEmitSpecificError.ts] +function someFunc(arguments: boolean, ...rest: any[]) { +} + +//// [/src/project/tsconfig.json] +{ + "compilerOptions": { + "incremental": true, + "declaration": true + } +} + + + +Output:: +/lib/tsc --p src/project +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 1 error in src/project/src/noChangeFileWithEmitSpecificError.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/src/class.d.ts] +export declare class classC { + prop: number; +} + + +//// [/src/project/src/class.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.classC = void 0; +var classC = /** @class */ (function () { + function classC() { + this.prop = 1; + } + return classC; +}()); +exports.classC = classC; + + +//// [/src/project/src/directUse.d.ts] +export {}; + + +//// [/src/project/src/directUse.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var indirectClass_1 = require("./indirectClass"); +new indirectClass_1.indirectClass().classC.prop; + + +//// [/src/project/src/indirectClass.d.ts] +import { classC } from './class'; +export declare class indirectClass { + classC: classC; +} + + +//// [/src/project/src/indirectClass.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.indirectClass = void 0; +var class_1 = require("./class"); +var indirectClass = /** @class */ (function () { + function indirectClass() { + this.classC = new class_1.classC(); + } + return indirectClass; +}()); +exports.indirectClass = indirectClass; + + +//// [/src/project/src/indirectUse.d.ts] +export {}; + + +//// [/src/project/src/indirectUse.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var indirectClass_1 = require("./indirectClass"); +new indirectClass_1.indirectClass().classC.prop; + + +//// [/src/project/src/noChangeFile.d.ts] +export declare function writeLog(s: string): void; + + +//// [/src/project/src/noChangeFile.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.writeLog = writeLog; +function writeLog(s) { +} + + +//// [/src/project/src/noChangeFileWithEmitSpecificError.d.ts] +declare function someFunc(arguments: boolean, ...rest: any[]): void; + + +//// [/src/project/src/noChangeFileWithEmitSpecificError.js] +function someFunc(arguments) { + var rest = []; + for (var _i = 1; _i < arguments.length; _i++) { + rest[_i - 1] = arguments[_i]; + } +} + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"545032748-export class classC {\n prop = 1;\n}","signature":"-9508063301-export declare class classC {\n prop: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8055010000-export declare function writeLog(s: string): void;\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n","affectsGlobalScope":true}],"root":[[2,7]],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/indirectuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/nochangefile.ts": { + "original": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ] + }, + "version": "FakeTSVersion", + "size": 2143 +} + + + +Change:: No Change run with noEmit +Input:: + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with noEmit +Input:: + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + + + +Change:: Introduce error but still noEmit +Input:: +//// [/src/project/src/class.ts] +export class classC { + prop1 = 1; +} + + + +Output:: +/lib/tsc --p src/project --noEmit +src/project/src/directUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/indirectUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + + +Found 2 errors in 2 files. + +Errors Files + 1 src/project/src/directUse.ts:2 + 1 src/project/src/indirectUse.ts:2 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"1786859709-export class classC {\n prop1 = 1;\n}","signature":"-12157283604-export declare class classC {\n prop1: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;",{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8055010000-export declare function writeLog(s: string): void;\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n","affectsGlobalScope":true}],"root":[[2,7]],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,[4,[{"file":"./src/directuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],3,[5,[{"file":"./src/indirectuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"affectedFilesPendingEmit":[2,[4],3,[5]]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "1786859709-export class classC {\n prop1 = 1;\n}", + "signature": "-12157283604-export declare class classC {\n prop1: number;\n}\n" + }, + "version": "1786859709-export class classC {\n prop1 = 1;\n}", + "signature": "-12157283604-export declare class classC {\n prop1: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "original": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + [ + "./src/directuse.ts", + [ + { + "file": "./src/directuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/indirectclass.ts", + [ + "./src/indirectuse.ts", + [ + { + "file": "./src/indirectuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "./src/class.ts", + "Js | Dts" + ], + [ + [ + "./src/directuse.ts" + ], + "Dts" + ], + [ + "./src/indirectclass.ts", + "Js | Dts" + ], + [ + [ + "./src/indirectuse.ts" + ], + "Dts" + ] + ] + }, + "version": "FakeTSVersion", + "size": 2700 +} + + + +Change:: Fix error and emit +Input:: +//// [/src/project/src/class.ts] +export class classC { + prop = 1; +} + + + +Output:: +/lib/tsc --p src/project +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 1 error in src/project/src/noChangeFileWithEmitSpecificError.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/src/class.d.ts] file written with same contents +//// [/src/project/src/class.js] file written with same contents +//// [/src/project/src/directUse.d.ts] file written with same contents +//// [/src/project/src/indirectClass.d.ts] file written with same contents +//// [/src/project/src/indirectClass.js] file written with same contents +//// [/src/project/src/indirectUse.d.ts] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"545032748-export class classC {\n prop = 1;\n}","signature":"-9508063301-export declare class classC {\n prop: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8055010000-export declare function writeLog(s: string): void;\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n","affectsGlobalScope":true}],"root":[[2,7]],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/indirectuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/nochangefile.ts": { + "original": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ] + }, + "version": "FakeTSVersion", + "size": 2143 +} + + + +Change:: No Change run with emit +Input:: + + +Output:: +/lib/tsc --p src/project +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 1 error in src/project/src/noChangeFileWithEmitSpecificError.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + + + +Change:: No Change run with noEmit +Input:: + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with noEmit +Input:: + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with emit +Input:: + + +Output:: +/lib/tsc --p src/project +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 1 error in src/project/src/noChangeFileWithEmitSpecificError.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + + + +Change:: Introduce error and emit +Input:: +//// [/src/project/src/class.ts] +export class classC { + prop1 = 1; +} + + + +Output:: +/lib/tsc --p src/project +src/project/src/directUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/indirectUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 3 errors in 3 files. + +Errors Files + 1 src/project/src/directUse.ts:2 + 1 src/project/src/indirectUse.ts:2 + 1 src/project/src/noChangeFileWithEmitSpecificError.ts:1 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/src/class.d.ts] +export declare class classC { + prop1: number; +} + + +//// [/src/project/src/class.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.classC = void 0; +var classC = /** @class */ (function () { + function classC() { + this.prop1 = 1; + } + return classC; +}()); +exports.classC = classC; + + +//// [/src/project/src/directUse.d.ts] file written with same contents +//// [/src/project/src/indirectClass.d.ts] file written with same contents +//// [/src/project/src/indirectClass.js] file written with same contents +//// [/src/project/src/indirectUse.d.ts] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"1786859709-export class classC {\n prop1 = 1;\n}","signature":"-12157283604-export declare class classC {\n prop1: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8055010000-export declare function writeLog(s: string): void;\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n","affectsGlobalScope":true}],"root":[[2,7]],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,[4,[{"file":"./src/directuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],3,[5,[{"file":"./src/indirectuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "1786859709-export class classC {\n prop1 = 1;\n}", + "signature": "-12157283604-export declare class classC {\n prop1: number;\n}\n" + }, + "version": "1786859709-export class classC {\n prop1 = 1;\n}", + "signature": "-12157283604-export declare class classC {\n prop1: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/indirectuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/nochangefile.ts": { + "original": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + [ + "./src/directuse.ts", + [ + { + "file": "./src/directuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/indirectclass.ts", + [ + "./src/indirectuse.ts", + [ + { + "file": "./src/indirectuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ] + }, + "version": "FakeTSVersion", + "size": 2761 +} + + + +Change:: No Change run with emit +Input:: + + +Output:: +/lib/tsc --p src/project +src/project/src/directUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/indirectUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 3 errors in 3 files. + +Errors Files + 1 src/project/src/directUse.ts:2 + 1 src/project/src/indirectUse.ts:2 + 1 src/project/src/noChangeFileWithEmitSpecificError.ts:1 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + + + +Change:: No Change run with noEmit +Input:: + + +Output:: +/lib/tsc --p src/project --noEmit +src/project/src/directUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/indirectUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + + +Found 2 errors in 2 files. + +Errors Files + 1 src/project/src/directUse.ts:2 + 1 src/project/src/indirectUse.ts:2 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + + + +Change:: No Change run with noEmit +Input:: + + +Output:: +/lib/tsc --p src/project --noEmit +src/project/src/directUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/indirectUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + + +Found 2 errors in 2 files. + +Errors Files + 1 src/project/src/directUse.ts:2 + 1 src/project/src/indirectUse.ts:2 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + + + +Change:: No Change run with emit +Input:: + + +Output:: +/lib/tsc --p src/project +src/project/src/directUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/indirectUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 3 errors in 3 files. + +Errors Files + 1 src/project/src/directUse.ts:2 + 1 src/project/src/indirectUse.ts:2 + 1 src/project/src/noChangeFileWithEmitSpecificError.ts:1 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + + + +Change:: Fix error and no emit +Input:: +//// [/src/project/src/class.ts] +export class classC { + prop = 1; +} + + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"545032748-export class classC {\n prop = 1;\n}","signature":"-9508063301-export declare class classC {\n prop: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;",{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8055010000-export declare function writeLog(s: string): void;\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n","affectsGlobalScope":true}],"root":[[2,7]],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"affectedFilesPendingEmit":[2,[4],3,[5]]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "original": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "./src/class.ts", + "Js | Dts" + ], + [ + [ + "./src/directuse.ts" + ], + "Dts" + ], + [ + "./src/indirectclass.ts", + "Js | Dts" + ], + [ + [ + "./src/indirectuse.ts" + ], + "Dts" + ] + ] + }, + "version": "FakeTSVersion", + "size": 2082 +} + + + +Change:: No Change run with emit +Input:: + + +Output:: +/lib/tsc --p src/project +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 1 error in src/project/src/noChangeFileWithEmitSpecificError.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/src/class.d.ts] +export declare class classC { + prop: number; +} + + +//// [/src/project/src/class.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.classC = void 0; +var classC = /** @class */ (function () { + function classC() { + this.prop = 1; + } + return classC; +}()); +exports.classC = classC; + + +//// [/src/project/src/directUse.d.ts] file written with same contents +//// [/src/project/src/indirectClass.d.ts] file written with same contents +//// [/src/project/src/indirectClass.js] file written with same contents +//// [/src/project/src/indirectUse.d.ts] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"545032748-export class classC {\n prop = 1;\n}","signature":"-9508063301-export declare class classC {\n prop: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8055010000-export declare function writeLog(s: string): void;\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n","affectsGlobalScope":true}],"root":[[2,7]],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/indirectuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/nochangefile.ts": { + "original": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ] + }, + "version": "FakeTSVersion", + "size": 2143 +} + + + +Change:: No Change run with noEmit +Input:: + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with noEmit +Input:: + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with emit +Input:: + + +Output:: +/lib/tsc --p src/project +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 1 error in src/project/src/noChangeFileWithEmitSpecificError.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + diff --git a/tests/baselines/reference/tsc/incremental/noEmit-changes-incremental.js b/tests/baselines/reference/tsc/incremental/noEmit-changes-incremental.js new file mode 100644 index 0000000000000..9baa762b48676 --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/noEmit-changes-incremental.js @@ -0,0 +1,1454 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/src/class.ts] +export class classC { + prop = 1; +} + +//// [/src/project/src/directUse.ts] +import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop; + +//// [/src/project/src/indirectClass.ts] +import { classC } from './class'; +export class indirectClass { + classC = new classC(); +} + +//// [/src/project/src/indirectUse.ts] +import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop; + +//// [/src/project/src/noChangeFile.ts] +export function writeLog(s: string) { +} + +//// [/src/project/src/noChangeFileWithEmitSpecificError.ts] +function someFunc(arguments: boolean, ...rest: any[]) { +} + +//// [/src/project/tsconfig.json] +{ + "compilerOptions": { + "incremental": true + } +} + + + +Output:: +/lib/tsc --p src/project +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 1 error in src/project/src/noChangeFileWithEmitSpecificError.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/src/class.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.classC = void 0; +var classC = /** @class */ (function () { + function classC() { + this.prop = 1; + } + return classC; +}()); +exports.classC = classC; + + +//// [/src/project/src/directUse.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var indirectClass_1 = require("./indirectClass"); +new indirectClass_1.indirectClass().classC.prop; + + +//// [/src/project/src/indirectClass.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.indirectClass = void 0; +var class_1 = require("./class"); +var indirectClass = /** @class */ (function () { + function indirectClass() { + this.classC = new class_1.classC(); + } + return indirectClass; +}()); +exports.indirectClass = indirectClass; + + +//// [/src/project/src/indirectUse.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var indirectClass_1 = require("./indirectClass"); +new indirectClass_1.indirectClass().classC.prop; + + +//// [/src/project/src/noChangeFile.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.writeLog = writeLog; +function writeLog(s) { +} + + +//// [/src/project/src/noChangeFileWithEmitSpecificError.js] +function someFunc(arguments) { + var rest = []; + for (var _i = 1; _i < arguments.length; _i++) { + rest[_i - 1] = arguments[_i]; + } +} + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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},"545032748-export class classC {\n prop = 1;\n}","6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"root":[[2,7]],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "545032748-export class classC {\n prop = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ] + }, + "version": "FakeTSVersion", + "size": 1596 +} + + + +Change:: No Change run with noEmit +Input:: + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with noEmit +Input:: + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + + + +Change:: Introduce error but still noEmit +Input:: +//// [/src/project/src/class.ts] +export class classC { + prop1 = 1; +} + + + +Output:: +/lib/tsc --p src/project --noEmit +src/project/src/directUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/indirectUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + + +Found 2 errors in 2 files. + +Errors Files + 1 src/project/src/directUse.ts:2 + 1 src/project/src/indirectUse.ts:2 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"1786859709-export class classC {\n prop1 = 1;\n}","signature":"-12157283604-export declare class classC {\n prop1: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},"6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"root":[[2,7]],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,[4,[{"file":"./src/directuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],3,[5,[{"file":"./src/indirectuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"affectedFilesPendingEmit":[2,4,3,5]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "1786859709-export class classC {\n prop1 = 1;\n}", + "signature": "-12157283604-export declare class classC {\n prop1: number;\n}\n" + }, + "version": "1786859709-export class classC {\n prop1 = 1;\n}", + "signature": "-12157283604-export declare class classC {\n prop1: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/indirectuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + [ + "./src/directuse.ts", + [ + { + "file": "./src/directuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/indirectclass.ts", + [ + "./src/indirectuse.ts", + [ + { + "file": "./src/indirectuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "./src/class.ts", + "Js" + ], + [ + "./src/directuse.ts", + "Js" + ], + [ + "./src/indirectclass.ts", + "Js" + ], + [ + "./src/indirectuse.ts", + "Js" + ] + ] + }, + "version": "FakeTSVersion", + "size": 2580 +} + + + +Change:: Fix error and emit +Input:: +//// [/src/project/src/class.ts] +export class classC { + prop = 1; +} + + + +Output:: +/lib/tsc --p src/project +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 1 error in src/project/src/noChangeFileWithEmitSpecificError.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/src/class.js] file written with same contents +//// [/src/project/src/directUse.js] file written with same contents +//// [/src/project/src/indirectClass.js] file written with same contents +//// [/src/project/src/indirectUse.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"545032748-export class classC {\n prop = 1;\n}","signature":"-9508063301-export declare class classC {\n prop: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"root":[[2,7]],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ] + }, + "version": "FakeTSVersion", + "size": 1823 +} + + + +Change:: No Change run with emit +Input:: + + +Output:: +/lib/tsc --p src/project +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 1 error in src/project/src/noChangeFileWithEmitSpecificError.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + + + +Change:: No Change run with noEmit +Input:: + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with noEmit +Input:: + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with emit +Input:: + + +Output:: +/lib/tsc --p src/project +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 1 error in src/project/src/noChangeFileWithEmitSpecificError.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + + + +Change:: Introduce error and emit +Input:: +//// [/src/project/src/class.ts] +export class classC { + prop1 = 1; +} + + + +Output:: +/lib/tsc --p src/project +src/project/src/directUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/indirectUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 3 errors in 3 files. + +Errors Files + 1 src/project/src/directUse.ts:2 + 1 src/project/src/indirectUse.ts:2 + 1 src/project/src/noChangeFileWithEmitSpecificError.ts:1 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/src/class.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.classC = void 0; +var classC = /** @class */ (function () { + function classC() { + this.prop1 = 1; + } + return classC; +}()); +exports.classC = classC; + + +//// [/src/project/src/indirectClass.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"1786859709-export class classC {\n prop1 = 1;\n}","signature":"-12157283604-export declare class classC {\n prop1: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"root":[[2,7]],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,[4,[{"file":"./src/directuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],3,[5,[{"file":"./src/indirectuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "1786859709-export class classC {\n prop1 = 1;\n}", + "signature": "-12157283604-export declare class classC {\n prop1: number;\n}\n" + }, + "version": "1786859709-export class classC {\n prop1 = 1;\n}", + "signature": "-12157283604-export declare class classC {\n prop1: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + [ + "./src/directuse.ts", + [ + { + "file": "./src/directuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/indirectclass.ts", + [ + "./src/indirectuse.ts", + [ + { + "file": "./src/indirectuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ] + }, + "version": "FakeTSVersion", + "size": 2441 +} + + + +Change:: No Change run with emit +Input:: + + +Output:: +/lib/tsc --p src/project +src/project/src/directUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/indirectUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 3 errors in 3 files. + +Errors Files + 1 src/project/src/directUse.ts:2 + 1 src/project/src/indirectUse.ts:2 + 1 src/project/src/noChangeFileWithEmitSpecificError.ts:1 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + + + +Change:: No Change run with noEmit +Input:: + + +Output:: +/lib/tsc --p src/project --noEmit +src/project/src/directUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/indirectUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + + +Found 2 errors in 2 files. + +Errors Files + 1 src/project/src/directUse.ts:2 + 1 src/project/src/indirectUse.ts:2 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + + + +Change:: No Change run with noEmit +Input:: + + +Output:: +/lib/tsc --p src/project --noEmit +src/project/src/directUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/indirectUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + + +Found 2 errors in 2 files. + +Errors Files + 1 src/project/src/directUse.ts:2 + 1 src/project/src/indirectUse.ts:2 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + + + +Change:: No Change run with emit +Input:: + + +Output:: +/lib/tsc --p src/project +src/project/src/directUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/indirectUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 3 errors in 3 files. + +Errors Files + 1 src/project/src/directUse.ts:2 + 1 src/project/src/indirectUse.ts:2 + 1 src/project/src/noChangeFileWithEmitSpecificError.ts:1 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + + + +Change:: Fix error and no emit +Input:: +//// [/src/project/src/class.ts] +export class classC { + prop = 1; +} + + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"545032748-export class classC {\n prop = 1;\n}","signature":"-9508063301-export declare class classC {\n prop: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"root":[[2,7]],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"affectedFilesPendingEmit":[2,3]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "./src/class.ts", + "Js" + ], + [ + "./src/indirectclass.ts", + "Js" + ] + ] + }, + "version": "FakeTSVersion", + "size": 1856 +} + + + +Change:: No Change run with emit +Input:: + + +Output:: +/lib/tsc --p src/project +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 1 error in src/project/src/noChangeFileWithEmitSpecificError.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/src/class.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.classC = void 0; +var classC = /** @class */ (function () { + function classC() { + this.prop = 1; + } + return classC; +}()); +exports.classC = classC; + + +//// [/src/project/src/indirectClass.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"545032748-export class classC {\n prop = 1;\n}","signature":"-9508063301-export declare class classC {\n prop: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"root":[[2,7]],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ] + }, + "version": "FakeTSVersion", + "size": 1823 +} + + + +Change:: No Change run with noEmit +Input:: + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with noEmit +Input:: + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + + + +Change:: No Change run with emit +Input:: + + +Output:: +/lib/tsc --p src/project +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 1 error in src/project/src/noChangeFileWithEmitSpecificError.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + diff --git a/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-composite-discrepancies.js b/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-composite-discrepancies.js new file mode 100644 index 0000000000000..b88761cd4a26e --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-composite-discrepancies.js @@ -0,0 +1,193 @@ +2:: Fix error and no emit +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/project/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./src/class.ts": { + "version": "545032748-export class classC {\n prop = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "emitSignatures": [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./src/class.ts": { + "version": "545032748-export class classC {\n prop = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "emitSignatures": [ + [ + "./src/class.ts", + "-12157283604-export declare class classC {\n prop1: number;\n}\n" + ], + [ + "./src/directuse.ts", + "-3531856636-export {};\n" + ], + [ + "./src/indirectuse.ts", + "-3531856636-export {};\n" + ] + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-composite.js b/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-composite.js new file mode 100644 index 0000000000000..1ee0c553ffa94 --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-composite.js @@ -0,0 +1,1081 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/src/class.ts] +export class classC { + prop = 1; +} + +//// [/src/project/src/directUse.ts] +import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop; + +//// [/src/project/src/indirectClass.ts] +import { classC } from './class'; +export class indirectClass { + classC = new classC(); +} + +//// [/src/project/src/indirectUse.ts] +import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop; + +//// [/src/project/src/noChangeFile.ts] +export function writeLog(s: string) { +} + +//// [/src/project/src/noChangeFileWithEmitSpecificError.ts] +function someFunc(arguments: boolean, ...rest: any[]) { +} + +//// [/src/project/tsconfig.json] +{ + "compilerOptions": { + "composite": true + } +} + + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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},"545032748-export class classC {\n prop = 1;\n}","6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"root":[[2,7]],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"affectedFilesPendingEmit":[2,4,3,5,6,7],"emitSignatures":[2,3,4,5,6,7]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "545032748-export class classC {\n prop = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "./src/class.ts", + "Js | Dts" + ], + [ + "./src/directuse.ts", + "Js | Dts" + ], + [ + "./src/indirectclass.ts", + "Js | Dts" + ], + [ + "./src/indirectuse.ts", + "Js | Dts" + ], + [ + "./src/nochangefile.ts", + "Js | Dts" + ], + [ + "./src/nochangefilewithemitspecificerror.ts", + "Js | Dts" + ] + ], + "emitSignatures": [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1697 +} + + + +Change:: No Change run with emit +Input:: + + +Output:: +/lib/tsc --p src/project +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 1 error in src/project/src/noChangeFileWithEmitSpecificError.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/src/class.d.ts] +export declare class classC { + prop: number; +} + + +//// [/src/project/src/class.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.classC = void 0; +var classC = /** @class */ (function () { + function classC() { + this.prop = 1; + } + return classC; +}()); +exports.classC = classC; + + +//// [/src/project/src/directUse.d.ts] +export {}; + + +//// [/src/project/src/directUse.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var indirectClass_1 = require("./indirectClass"); +new indirectClass_1.indirectClass().classC.prop; + + +//// [/src/project/src/indirectClass.d.ts] +import { classC } from './class'; +export declare class indirectClass { + classC: classC; +} + + +//// [/src/project/src/indirectClass.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.indirectClass = void 0; +var class_1 = require("./class"); +var indirectClass = /** @class */ (function () { + function indirectClass() { + this.classC = new class_1.classC(); + } + return indirectClass; +}()); +exports.indirectClass = indirectClass; + + +//// [/src/project/src/indirectUse.d.ts] +export {}; + + +//// [/src/project/src/indirectUse.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var indirectClass_1 = require("./indirectClass"); +new indirectClass_1.indirectClass().classC.prop; + + +//// [/src/project/src/noChangeFile.d.ts] +export declare function writeLog(s: string): void; + + +//// [/src/project/src/noChangeFile.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.writeLog = writeLog; +function writeLog(s) { +} + + +//// [/src/project/src/noChangeFileWithEmitSpecificError.d.ts] +declare function someFunc(arguments: boolean, ...rest: any[]): void; + + +//// [/src/project/src/noChangeFileWithEmitSpecificError.js] +function someFunc(arguments) { + var rest = []; + for (var _i = 1; _i < arguments.length; _i++) { + rest[_i - 1] = arguments[_i]; + } +} + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"545032748-export class classC {\n prop = 1;\n}","signature":"-9508063301-export declare class classC {\n prop: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8055010000-export declare function writeLog(s: string): void;\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n","affectsGlobalScope":true}],"root":[[2,7]],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"latestChangedDtsFile":"./src/noChangeFileWithEmitSpecificError.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/indirectuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/nochangefile.ts": { + "original": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "latestChangedDtsFile": "./src/noChangeFileWithEmitSpecificError.d.ts" + }, + "version": "FakeTSVersion", + "size": 2211 +} + + + +Change:: Introduce error with emit +Input:: +//// [/src/project/src/class.ts] +export class classC { + prop1 = 1; +} + + + +Output:: +/lib/tsc --p src/project +src/project/src/directUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/indirectUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 3 errors in 3 files. + +Errors Files + 1 src/project/src/directUse.ts:2 + 1 src/project/src/indirectUse.ts:2 + 1 src/project/src/noChangeFileWithEmitSpecificError.ts:1 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/src/class.d.ts] +export declare class classC { + prop1: number; +} + + +//// [/src/project/src/class.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.classC = void 0; +var classC = /** @class */ (function () { + function classC() { + this.prop1 = 1; + } + return classC; +}()); +exports.classC = classC; + + +//// [/src/project/src/indirectClass.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"1786859709-export class classC {\n prop1 = 1;\n}","signature":"-12157283604-export declare class classC {\n prop1: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8055010000-export declare function writeLog(s: string): void;\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n","affectsGlobalScope":true}],"root":[[2,7]],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,[4,[{"file":"./src/directuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],3,[5,[{"file":"./src/indirectuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"latestChangedDtsFile":"./src/class.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "1786859709-export class classC {\n prop1 = 1;\n}", + "signature": "-12157283604-export declare class classC {\n prop1: number;\n}\n" + }, + "version": "1786859709-export class classC {\n prop1 = 1;\n}", + "signature": "-12157283604-export declare class classC {\n prop1: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/indirectuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/nochangefile.ts": { + "original": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + [ + "./src/directuse.ts", + [ + { + "file": "./src/directuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/indirectclass.ts", + [ + "./src/indirectuse.ts", + [ + { + "file": "./src/indirectuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "latestChangedDtsFile": "./src/class.d.ts" + }, + "version": "FakeTSVersion", + "size": 2801 +} + + + +Change:: Fix error and no emit +Input:: +//// [/src/project/src/class.ts] +export class classC { + prop = 1; +} + + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"545032748-export class classC {\n prop = 1;\n}","signature":"-9508063301-export declare class classC {\n prop: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;",{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8055010000-export declare function writeLog(s: string): void;\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n","affectsGlobalScope":true}],"root":[[2,7]],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"affectedFilesPendingEmit":[2,[4],3,[5]],"emitSignatures":[[2,"-12157283604-export declare class classC {\n prop1: number;\n}\n"],[4,"-3531856636-export {};\n"],[5,"-3531856636-export {};\n"]],"latestChangedDtsFile":"./src/class.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "original": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "./src/class.ts", + "Js | Dts" + ], + [ + [ + "./src/directuse.ts" + ], + "Dts" + ], + [ + "./src/indirectclass.ts", + "Js | Dts" + ], + [ + [ + "./src/indirectuse.ts" + ], + "Dts" + ] + ], + "emitSignatures": [ + [ + "./src/class.ts", + "-12157283604-export declare class classC {\n prop1: number;\n}\n" + ], + [ + "./src/directuse.ts", + "-3531856636-export {};\n" + ], + [ + "./src/indirectuse.ts", + "-3531856636-export {};\n" + ] + ], + "latestChangedDtsFile": "./src/class.d.ts" + }, + "version": "FakeTSVersion", + "size": 2277 +} + + + +Change:: No Change run with emit +Input:: + + +Output:: +/lib/tsc --p src/project +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 1 error in src/project/src/noChangeFileWithEmitSpecificError.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/src/class.d.ts] +export declare class classC { + prop: number; +} + + +//// [/src/project/src/class.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.classC = void 0; +var classC = /** @class */ (function () { + function classC() { + this.prop = 1; + } + return classC; +}()); +exports.classC = classC; + + +//// [/src/project/src/indirectClass.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"545032748-export class classC {\n prop = 1;\n}","signature":"-9508063301-export declare class classC {\n prop: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8055010000-export declare function writeLog(s: string): void;\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n","affectsGlobalScope":true}],"root":[[2,7]],"options":{"composite":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"latestChangedDtsFile":"./src/class.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/indirectuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/nochangefile.ts": { + "original": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "composite": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "latestChangedDtsFile": "./src/class.d.ts" + }, + "version": "FakeTSVersion", + "size": 2183 +} + diff --git a/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-incremental-declaration.js b/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-incremental-declaration.js new file mode 100644 index 0000000000000..05b0c77f3b4ab --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-incremental-declaration.js @@ -0,0 +1,1062 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/src/class.ts] +export class classC { + prop = 1; +} + +//// [/src/project/src/directUse.ts] +import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop; + +//// [/src/project/src/indirectClass.ts] +import { classC } from './class'; +export class indirectClass { + classC = new classC(); +} + +//// [/src/project/src/indirectUse.ts] +import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop; + +//// [/src/project/src/noChangeFile.ts] +export function writeLog(s: string) { +} + +//// [/src/project/src/noChangeFileWithEmitSpecificError.ts] +function someFunc(arguments: boolean, ...rest: any[]) { +} + +//// [/src/project/tsconfig.json] +{ + "compilerOptions": { + "incremental": true, + "declaration": true + } +} + + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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},"545032748-export class classC {\n prop = 1;\n}","6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"root":[[2,7]],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"affectedFilesPendingEmit":[2,4,3,5,6,7]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "545032748-export class classC {\n prop = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "./src/class.ts", + "Js | Dts" + ], + [ + "./src/directuse.ts", + "Js | Dts" + ], + [ + "./src/indirectclass.ts", + "Js | Dts" + ], + [ + "./src/indirectuse.ts", + "Js | Dts" + ], + [ + "./src/nochangefile.ts", + "Js | Dts" + ], + [ + "./src/nochangefilewithemitspecificerror.ts", + "Js | Dts" + ] + ] + }, + "version": "FakeTSVersion", + "size": 1668 +} + + + +Change:: No Change run with emit +Input:: + + +Output:: +/lib/tsc --p src/project +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 1 error in src/project/src/noChangeFileWithEmitSpecificError.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/src/class.d.ts] +export declare class classC { + prop: number; +} + + +//// [/src/project/src/class.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.classC = void 0; +var classC = /** @class */ (function () { + function classC() { + this.prop = 1; + } + return classC; +}()); +exports.classC = classC; + + +//// [/src/project/src/directUse.d.ts] +export {}; + + +//// [/src/project/src/directUse.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var indirectClass_1 = require("./indirectClass"); +new indirectClass_1.indirectClass().classC.prop; + + +//// [/src/project/src/indirectClass.d.ts] +import { classC } from './class'; +export declare class indirectClass { + classC: classC; +} + + +//// [/src/project/src/indirectClass.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.indirectClass = void 0; +var class_1 = require("./class"); +var indirectClass = /** @class */ (function () { + function indirectClass() { + this.classC = new class_1.classC(); + } + return indirectClass; +}()); +exports.indirectClass = indirectClass; + + +//// [/src/project/src/indirectUse.d.ts] +export {}; + + +//// [/src/project/src/indirectUse.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var indirectClass_1 = require("./indirectClass"); +new indirectClass_1.indirectClass().classC.prop; + + +//// [/src/project/src/noChangeFile.d.ts] +export declare function writeLog(s: string): void; + + +//// [/src/project/src/noChangeFile.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.writeLog = writeLog; +function writeLog(s) { +} + + +//// [/src/project/src/noChangeFileWithEmitSpecificError.d.ts] +declare function someFunc(arguments: boolean, ...rest: any[]): void; + + +//// [/src/project/src/noChangeFileWithEmitSpecificError.js] +function someFunc(arguments) { + var rest = []; + for (var _i = 1; _i < arguments.length; _i++) { + rest[_i - 1] = arguments[_i]; + } +} + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"545032748-export class classC {\n prop = 1;\n}","signature":"-9508063301-export declare class classC {\n prop: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8055010000-export declare function writeLog(s: string): void;\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n","affectsGlobalScope":true}],"root":[[2,7]],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/indirectuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/nochangefile.ts": { + "original": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ] + }, + "version": "FakeTSVersion", + "size": 2143 +} + + + +Change:: Introduce error with emit +Input:: +//// [/src/project/src/class.ts] +export class classC { + prop1 = 1; +} + + + +Output:: +/lib/tsc --p src/project +src/project/src/directUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/indirectUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 3 errors in 3 files. + +Errors Files + 1 src/project/src/directUse.ts:2 + 1 src/project/src/indirectUse.ts:2 + 1 src/project/src/noChangeFileWithEmitSpecificError.ts:1 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/src/class.d.ts] +export declare class classC { + prop1: number; +} + + +//// [/src/project/src/class.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.classC = void 0; +var classC = /** @class */ (function () { + function classC() { + this.prop1 = 1; + } + return classC; +}()); +exports.classC = classC; + + +//// [/src/project/src/directUse.d.ts] file written with same contents +//// [/src/project/src/indirectClass.d.ts] file written with same contents +//// [/src/project/src/indirectClass.js] file written with same contents +//// [/src/project/src/indirectUse.d.ts] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"1786859709-export class classC {\n prop1 = 1;\n}","signature":"-12157283604-export declare class classC {\n prop1: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8055010000-export declare function writeLog(s: string): void;\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n","affectsGlobalScope":true}],"root":[[2,7]],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,[4,[{"file":"./src/directuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],3,[5,[{"file":"./src/indirectuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "1786859709-export class classC {\n prop1 = 1;\n}", + "signature": "-12157283604-export declare class classC {\n prop1: number;\n}\n" + }, + "version": "1786859709-export class classC {\n prop1 = 1;\n}", + "signature": "-12157283604-export declare class classC {\n prop1: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/indirectuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/nochangefile.ts": { + "original": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + [ + "./src/directuse.ts", + [ + { + "file": "./src/directuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/indirectclass.ts", + [ + "./src/indirectuse.ts", + [ + { + "file": "./src/indirectuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ] + }, + "version": "FakeTSVersion", + "size": 2761 +} + + + +Change:: Fix error and no emit +Input:: +//// [/src/project/src/class.ts] +export class classC { + prop = 1; +} + + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"545032748-export class classC {\n prop = 1;\n}","signature":"-9508063301-export declare class classC {\n prop: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;",{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8055010000-export declare function writeLog(s: string): void;\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n","affectsGlobalScope":true}],"root":[[2,7]],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"affectedFilesPendingEmit":[2,[4],3,[5]]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "original": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "./src/class.ts", + "Js | Dts" + ], + [ + [ + "./src/directuse.ts" + ], + "Dts" + ], + [ + "./src/indirectclass.ts", + "Js | Dts" + ], + [ + [ + "./src/indirectuse.ts" + ], + "Dts" + ] + ] + }, + "version": "FakeTSVersion", + "size": 2082 +} + + + +Change:: No Change run with emit +Input:: + + +Output:: +/lib/tsc --p src/project +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 1 error in src/project/src/noChangeFileWithEmitSpecificError.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/src/class.d.ts] +export declare class classC { + prop: number; +} + + +//// [/src/project/src/class.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.classC = void 0; +var classC = /** @class */ (function () { + function classC() { + this.prop = 1; + } + return classC; +}()); +exports.classC = classC; + + +//// [/src/project/src/directUse.d.ts] file written with same contents +//// [/src/project/src/indirectClass.d.ts] file written with same contents +//// [/src/project/src/indirectClass.js] file written with same contents +//// [/src/project/src/indirectUse.d.ts] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"545032748-export class classC {\n prop = 1;\n}","signature":"-9508063301-export declare class classC {\n prop: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"6714567633-export function writeLog(s: string) {\n}","signature":"8055010000-export declare function writeLog(s: string): void;\n"},{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","signature":"-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n","affectsGlobalScope":true}],"root":[[2,7]],"options":{"declaration":true},"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/indirectuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/nochangefile.ts": { + "original": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "8055010000-export declare function writeLog(s: string): void;\n" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-5615417221-declare function someFunc(arguments: boolean, ...rest: any[]): void;\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "options": { + "declaration": true + }, + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ] + }, + "version": "FakeTSVersion", + "size": 2143 +} + diff --git a/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-incremental.js b/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-incremental.js new file mode 100644 index 0000000000000..b10ebcc63abc4 --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/noEmit-changes-with-initial-noEmit-incremental.js @@ -0,0 +1,945 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/src/class.ts] +export class classC { + prop = 1; +} + +//// [/src/project/src/directUse.ts] +import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop; + +//// [/src/project/src/indirectClass.ts] +import { classC } from './class'; +export class indirectClass { + classC = new classC(); +} + +//// [/src/project/src/indirectUse.ts] +import { indirectClass } from './indirectClass'; +new indirectClass().classC.prop; + +//// [/src/project/src/noChangeFile.ts] +export function writeLog(s: string) { +} + +//// [/src/project/src/noChangeFileWithEmitSpecificError.ts] +function someFunc(arguments: boolean, ...rest: any[]) { +} + +//// [/src/project/tsconfig.json] +{ + "compilerOptions": { + "incremental": true + } +} + + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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},"545032748-export class classC {\n prop = 1;\n}","6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"root":[[2,7]],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"affectedFilesPendingEmit":[2,4,3,5,6,7]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "545032748-export class classC {\n prop = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "./src/class.ts", + "Js" + ], + [ + "./src/directuse.ts", + "Js" + ], + [ + "./src/indirectclass.ts", + "Js" + ], + [ + "./src/indirectuse.ts", + "Js" + ], + [ + "./src/nochangefile.ts", + "Js" + ], + [ + "./src/nochangefilewithemitspecificerror.ts", + "Js" + ] + ] + }, + "version": "FakeTSVersion", + "size": 1637 +} + + + +Change:: No Change run with emit +Input:: + + +Output:: +/lib/tsc --p src/project +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 1 error in src/project/src/noChangeFileWithEmitSpecificError.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/src/class.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.classC = void 0; +var classC = /** @class */ (function () { + function classC() { + this.prop = 1; + } + return classC; +}()); +exports.classC = classC; + + +//// [/src/project/src/directUse.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var indirectClass_1 = require("./indirectClass"); +new indirectClass_1.indirectClass().classC.prop; + + +//// [/src/project/src/indirectClass.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.indirectClass = void 0; +var class_1 = require("./class"); +var indirectClass = /** @class */ (function () { + function indirectClass() { + this.classC = new class_1.classC(); + } + return indirectClass; +}()); +exports.indirectClass = indirectClass; + + +//// [/src/project/src/indirectUse.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var indirectClass_1 = require("./indirectClass"); +new indirectClass_1.indirectClass().classC.prop; + + +//// [/src/project/src/noChangeFile.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.writeLog = writeLog; +function writeLog(s) { +} + + +//// [/src/project/src/noChangeFileWithEmitSpecificError.js] +function someFunc(arguments) { + var rest = []; + for (var _i = 1; _i < arguments.length; _i++) { + rest[_i - 1] = arguments[_i]; + } +} + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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},"545032748-export class classC {\n prop = 1;\n}","6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"root":[[2,7]],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "545032748-export class classC {\n prop = 1;\n}" + }, + "./src/indirectclass.ts": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ] + }, + "version": "FakeTSVersion", + "size": 1596 +} + + + +Change:: Introduce error with emit +Input:: +//// [/src/project/src/class.ts] +export class classC { + prop1 = 1; +} + + + +Output:: +/lib/tsc --p src/project +src/project/src/directUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/indirectUse.ts:2:28 - error TS2551: Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'? + +2 new indirectClass().classC.prop; +   ~~~~ + + src/project/src/class.ts:2:5 + 2 prop1 = 1; +    ~~~~~ + 'prop1' is declared here. + +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 3 errors in 3 files. + +Errors Files + 1 src/project/src/directUse.ts:2 + 1 src/project/src/indirectUse.ts:2 + 1 src/project/src/noChangeFileWithEmitSpecificError.ts:1 +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/src/class.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.classC = void 0; +var classC = /** @class */ (function () { + function classC() { + this.prop1 = 1; + } + return classC; +}()); +exports.classC = classC; + + +//// [/src/project/src/directUse.js] file written with same contents +//// [/src/project/src/indirectClass.js] file written with same contents +//// [/src/project/src/indirectUse.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"1786859709-export class classC {\n prop1 = 1;\n}","signature":"-12157283604-export declare class classC {\n prop1: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},{"version":"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","signature":"-3531856636-export {};\n"},"6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"root":[[2,7]],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,[4,[{"file":"./src/directuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],3,[5,[{"file":"./src/indirectuse.ts","start":76,"length":4,"code":2551,"category":1,"messageText":"Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?","relatedInformation":[{"file":"./src/class.ts","start":26,"length":5,"messageText":"'prop1' is declared here.","category":3,"code":2728}]}]],6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "1786859709-export class classC {\n prop1 = 1;\n}", + "signature": "-12157283604-export declare class classC {\n prop1: number;\n}\n" + }, + "version": "1786859709-export class classC {\n prop1 = 1;\n}", + "signature": "-12157283604-export declare class classC {\n prop1: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/indirectuse.ts": { + "original": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-3531856636-export {};\n" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + [ + "./src/directuse.ts", + [ + { + "file": "./src/directuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/indirectclass.ts", + [ + "./src/indirectuse.ts", + [ + { + "file": "./src/indirectuse.ts", + "start": 76, + "length": 4, + "code": 2551, + "category": 1, + "messageText": "Property 'prop' does not exist on type 'classC'. Did you mean 'prop1'?", + "relatedInformation": [ + { + "file": "./src/class.ts", + "start": 26, + "length": 5, + "messageText": "'prop1' is declared here.", + "category": 3, + "code": 2728 + } + ] + } + ] + ], + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ] + }, + "version": "FakeTSVersion", + "size": 2543 +} + + + +Change:: Fix error and no emit +Input:: +//// [/src/project/src/class.ts] +export class classC { + prop = 1; +} + + + +Output:: +/lib/tsc --p src/project --noEmit +exitCode:: ExitStatus.Success + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"545032748-export class classC {\n prop = 1;\n}","signature":"-9508063301-export declare class classC {\n prop: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"root":[[2,7]],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]],"affectedFilesPendingEmit":[2,3]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "./src/class.ts", + "Js" + ], + [ + "./src/indirectclass.ts", + "Js" + ] + ] + }, + "version": "FakeTSVersion", + "size": 1856 +} + + + +Change:: No Change run with emit +Input:: + + +Output:: +/lib/tsc --p src/project +src/project/src/noChangeFileWithEmitSpecificError.ts:1:19 - error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters. + +1 function someFunc(arguments: boolean, ...rest: any[]) { +   ~~~~~~~~~~~~~~~~~~ + + +Found 1 error in src/project/src/noChangeFileWithEmitSpecificError.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated + + +//// [/src/project/src/class.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.classC = void 0; +var classC = /** @class */ (function () { + function classC() { + this.prop = 1; + } + return classC; +}()); +exports.classC = classC; + + +//// [/src/project/src/indirectClass.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./src/class.ts","./src/indirectclass.ts","./src/directuse.ts","./src/indirectuse.ts","./src/nochangefile.ts","./src/nochangefilewithemitspecificerror.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":"545032748-export class classC {\n prop = 1;\n}","signature":"-9508063301-export declare class classC {\n prop: number;\n}\n"},{"version":"6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}","signature":"9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n"},"-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;","6714567633-export function writeLog(s: string) {\n}",{"version":"-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}","affectsGlobalScope":true}],"root":[[2,7]],"fileIdsList":[[3],[2]],"referencedMap":[[4,1],[3,2],[5,1]],"semanticDiagnosticsPerFile":[1,2,4,3,5,6,[7,[{"file":"./src/nochangefilewithemitspecificerror.ts","start":18,"length":18,"messageText":"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.","category":1,"code":2396,"skippedOn":"noEmit"}]]]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ], + "fileNamesList": [ + [ + "./src/indirectclass.ts" + ], + [ + "./src/class.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/class.ts": { + "original": { + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "version": "545032748-export class classC {\n prop = 1;\n}", + "signature": "-9508063301-export declare class classC {\n prop: number;\n}\n" + }, + "./src/indirectclass.ts": { + "original": { + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "version": "6324910780-import { classC } from './class';\nexport class indirectClass {\n classC = new classC();\n}", + "signature": "9337978648-import { classC } from './class';\nexport declare class indirectClass {\n classC: classC;\n}\n" + }, + "./src/directuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/indirectuse.ts": { + "version": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;", + "signature": "-8953710208-import { indirectClass } from './indirectClass';\nnew indirectClass().classC.prop;" + }, + "./src/nochangefile.ts": { + "version": "6714567633-export function writeLog(s: string) {\n}", + "signature": "6714567633-export function writeLog(s: string) {\n}" + }, + "./src/nochangefilewithemitspecificerror.ts": { + "original": { + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + }, + "version": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "signature": "-19339541508-function someFunc(arguments: boolean, ...rest: any[]) {\n}", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 7 + ], + [ + "./src/class.ts", + "./src/indirectclass.ts", + "./src/directuse.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + "./src/nochangefilewithemitspecificerror.ts" + ] + ] + ], + "referencedMap": { + "./src/directuse.ts": [ + "./src/indirectclass.ts" + ], + "./src/indirectclass.ts": [ + "./src/class.ts" + ], + "./src/indirectuse.ts": [ + "./src/indirectclass.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./src/class.ts", + "./src/directuse.ts", + "./src/indirectclass.ts", + "./src/indirectuse.ts", + "./src/nochangefile.ts", + [ + "./src/nochangefilewithemitspecificerror.ts", + [ + { + "file": "./src/nochangefilewithemitspecificerror.ts", + "start": 18, + "length": 18, + "messageText": "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.", + "category": 1, + "code": 2396, + "skippedOn": "noEmit" + } + ] + ] + ] + }, + "version": "FakeTSVersion", + "size": 1823 +} + diff --git a/tests/baselines/reference/tsc/incremental/when-declarationMap-changes-discrepancies.js b/tests/baselines/reference/tsc/incremental/when-declarationMap-changes-discrepancies.js new file mode 100644 index 0000000000000..9821479e0a407 --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/when-declarationMap-changes-discrepancies.js @@ -0,0 +1,130 @@ +0:: error and enable declarationMap +Clean build does not emit any file so will have emitSignatures with all files since they are not emitted +Incremental build has emitSignatures from before, so it will have a.ts with signature since file.version isnt same +Incremental build will also have emitSignatureDtsMapDiffers for both files since the emitSignatures were without declarationMap but currentOptions have declrationMap +TsBuild info text without affectedFilesPendingEmit:: /src/project/tsconfig.tsbuildinfo.readable.baseline.txt:: +CleanBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "5515933561-const x: 20 = 10;", + "affectsGlobalScope": true + }, + "./b.ts": { + "version": "2026006654-const y = 10;", + "affectsGlobalScope": true + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "noEmitOnError": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + [ + "./a.ts", + [ + { + "file": "./a.ts", + "start": 6, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type '10' is not assignable to type '20'." + } + ] + ], + "./b.ts" + ], + "emitSignatures": [ + "./a.ts", + "./b.ts" + ] + }, + "version": "FakeTSVersion" +} +IncrementalBuild: +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./a.ts": { + "version": "5515933561-const x: 20 = 10;", + "affectsGlobalScope": true + }, + "./b.ts": { + "version": "2026006654-const y = 10;", + "affectsGlobalScope": true + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "noEmitOnError": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + [ + "./a.ts", + [ + { + "file": "./a.ts", + "start": 6, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type '10' is not assignable to type '20'." + } + ] + ], + "./b.ts" + ], + "emitSignatures": [ + [ + "./a.ts", + [ + "-4001438729-declare const x = 10;\n" + ] + ], + [ + "./b.ts", + [] + ] + ], + "latestChangedDtsFile": "FakeFileName" + }, + "version": "FakeTSVersion" +} \ No newline at end of file diff --git a/tests/baselines/reference/tsc/incremental/when-declarationMap-changes-with-outFile.js b/tests/baselines/reference/tsc/incremental/when-declarationMap-changes-with-outFile.js new file mode 100644 index 0000000000000..82fc73e8c15e5 --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/when-declarationMap-changes-with-outFile.js @@ -0,0 +1,173 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/a.ts] +const x = 10; + +//// [/src/project/b.ts] +const y = 10; + +//// [/src/project/tsconfig.json] +{ + "compilerOptions": { + "noEmitOnError": true, + "declaration": true, + "composite": true, + "outFile": "../outFile.js" + } +} + + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success + + +//// [/src/outFile.d.ts] +declare const x = 10; +declare const y = 10; + + +//// [/src/outFile.js] +var x = 10; +var y = 10; + + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/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; };","5029505981-const x = 10;","2026006654-const y = 10;"],"root":[2,3],"options":{"composite":true,"declaration":true,"noEmitOnError":true,"outFile":"./outFile.js"},"outSignature":"-2781996726-declare const x = 10;\ndeclare const y = 10;\n","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts" + ], + "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; };", + "./project/a.ts": "5029505981-const x = 10;", + "./project/b.ts": "2026006654-const y = 10;" + }, + "root": [ + [ + 2, + "./project/a.ts" + ], + [ + 3, + "./project/b.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "noEmitOnError": true, + "outFile": "./outFile.js" + }, + "outSignature": "-2781996726-declare const x = 10;\ndeclare const y = 10;\n", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 837 +} + + + +Change:: error and enable declarationMap +Input:: +//// [/src/project/a.ts] +const x: 20 = 10; + + + +Output:: +/lib/tsc --p /src/project --declarationMap +src/project/a.ts:1:7 - error TS2322: Type '10' is not assignable to type '20'. + +1 const x: 20 = 10; +   ~ + + +Found 1 error in src/project/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + + + +Change:: fix error declarationMap +Input:: +//// [/src/project/a.ts] +const x = 10; + + + +Output:: +/lib/tsc --p /src/project --declarationMap +exitCode:: ExitStatus.Success + + +//// [/src/outFile.d.ts] +declare const x = 10; +declare const y = 10; +//# sourceMappingURL=outFile.d.ts.map + +//// [/src/outFile.d.ts.map] +{"version":3,"file":"outFile.d.ts","sourceRoot":"","sources":["project/a.ts","project/b.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,KAAK,CAAC;ACAb,QAAA,MAAM,CAAC,KAAK,CAAC"} + +//// [/src/outFile.tsbuildinfo] +{"program":{"fileNames":["../lib/lib.d.ts","./project/a.ts","./project/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; };","5029505981-const x = 10;","2026006654-const y = 10;"],"root":[2,3],"options":{"composite":true,"declaration":true,"declarationMap":true,"noEmitOnError":true,"outFile":"./outFile.js"},"outSignature":"-2781996726-declare const x = 10;\ndeclare const y = 10;\n","latestChangedDtsFile":"./outFile.d.ts"},"version":"FakeTSVersion"} + +//// [/src/outFile.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../lib/lib.d.ts", + "./project/a.ts", + "./project/b.ts" + ], + "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; };", + "./project/a.ts": "5029505981-const x = 10;", + "./project/b.ts": "2026006654-const y = 10;" + }, + "root": [ + [ + 2, + "./project/a.ts" + ], + [ + 3, + "./project/b.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "noEmitOnError": true, + "outFile": "./outFile.js" + }, + "outSignature": "-2781996726-declare const x = 10;\ndeclare const y = 10;\n", + "latestChangedDtsFile": "./outFile.d.ts" + }, + "version": "FakeTSVersion", + "size": 859 +} + diff --git a/tests/baselines/reference/tsc/incremental/when-declarationMap-changes.js b/tests/baselines/reference/tsc/incremental/when-declarationMap-changes.js new file mode 100644 index 0000000000000..8c244ad1d9108 --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/when-declarationMap-changes.js @@ -0,0 +1,350 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/a.ts] +const x = 10; + +//// [/src/project/b.ts] +const y = 10; + +//// [/src/project/tsconfig.json] +{ + "compilerOptions": { + "noEmitOnError": true, + "declaration": true, + "composite": true + } +} + + + +Output:: +/lib/tsc --p /src/project +exitCode:: ExitStatus.Success + + +//// [/src/project/a.d.ts] +declare const x = 10; + + +//// [/src/project/a.js] +var x = 10; + + +//// [/src/project/b.d.ts] +declare const y = 10; + + +//// [/src/project/b.js] +var y = 10; + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"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":"5029505981-const x = 10;","signature":"-4001438729-declare const x = 10;\n","affectsGlobalScope":true},{"version":"2026006654-const y = 10;","signature":"-4332668712-declare const y = 10;\n","affectsGlobalScope":true}],"root":[2,3],"options":{"composite":true,"declaration":true,"noEmitOnError":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./b.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.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": "5029505981-const x = 10;", + "signature": "-4001438729-declare const x = 10;\n", + "affectsGlobalScope": true + }, + "version": "5029505981-const x = 10;", + "signature": "-4001438729-declare const x = 10;\n", + "affectsGlobalScope": true + }, + "./b.ts": { + "original": { + "version": "2026006654-const y = 10;", + "signature": "-4332668712-declare const y = 10;\n", + "affectsGlobalScope": true + }, + "version": "2026006654-const y = 10;", + "signature": "-4332668712-declare const y = 10;\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "noEmitOnError": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "latestChangedDtsFile": "./b.d.ts" + }, + "version": "FakeTSVersion", + "size": 987 +} + + + +Change:: error and enable declarationMap +Input:: +//// [/src/project/a.ts] +const x: 20 = 10; + + + +Output:: +/lib/tsc --p /src/project --declarationMap +src/project/a.ts:1:7 - error TS2322: Type '10' is not assignable to type '20'. + +1 const x: 20 = 10; +   ~ + + +Found 1 error in src/project/a.ts:1 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"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":"5515933561-const x: 20 = 10;","signature":"-3041996843-declare const x: 20;\n","affectsGlobalScope":true},{"version":"2026006654-const y = 10;","signature":"-4332668712-declare const y = 10;\n","affectsGlobalScope":true}],"root":[2,3],"options":{"composite":true,"declaration":true,"declarationMap":true,"noEmitOnError":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,[2,[{"file":"./a.ts","start":6,"length":1,"code":2322,"category":1,"messageText":"Type '10' is not assignable to type '20'."}]],3],"affectedFilesPendingEmit":[2,3],"emitSignatures":[[2,["-4001438729-declare const x = 10;\n"]],[3,[]]],"latestChangedDtsFile":"./b.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.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": "5515933561-const x: 20 = 10;", + "signature": "-3041996843-declare const x: 20;\n", + "affectsGlobalScope": true + }, + "version": "5515933561-const x: 20 = 10;", + "signature": "-3041996843-declare const x: 20;\n", + "affectsGlobalScope": true + }, + "./b.ts": { + "original": { + "version": "2026006654-const y = 10;", + "signature": "-4332668712-declare const y = 10;\n", + "affectsGlobalScope": true + }, + "version": "2026006654-const y = 10;", + "signature": "-4332668712-declare const y = 10;\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "noEmitOnError": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + [ + "./a.ts", + [ + { + "file": "./a.ts", + "start": 6, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type '10' is not assignable to type '20'." + } + ] + ], + "./b.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js | Dts | DtsMap" + ], + [ + "./b.ts", + "Js | Dts | DtsMap" + ] + ], + "emitSignatures": [ + [ + "./a.ts", + [ + "-4001438729-declare const x = 10;\n" + ] + ], + [ + "./b.ts", + [] + ] + ], + "latestChangedDtsFile": "./b.d.ts" + }, + "version": "FakeTSVersion", + "size": 1241 +} + + + +Change:: fix error declarationMap +Input:: +//// [/src/project/a.ts] +const x = 10; + + + +Output:: +/lib/tsc --p /src/project --declarationMap +exitCode:: ExitStatus.Success + + +//// [/src/project/a.d.ts] +declare const x = 10; +//# sourceMappingURL=a.d.ts.map + +//// [/src/project/a.d.ts.map] +{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["a.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,KAAK,CAAC"} + +//// [/src/project/a.js] file written with same contents +//// [/src/project/b.d.ts] +declare const y = 10; +//# sourceMappingURL=b.d.ts.map + +//// [/src/project/b.d.ts.map] +{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["b.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC,KAAK,CAAC"} + +//// [/src/project/b.js] file written with same contents +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"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":"5029505981-const x = 10;","signature":"-4001438729-declare const x = 10;\n","affectsGlobalScope":true},{"version":"2026006654-const y = 10;","signature":"-4332668712-declare const y = 10;\n","affectsGlobalScope":true}],"root":[2,3],"options":{"composite":true,"declaration":true,"declarationMap":true,"noEmitOnError":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./b.d.ts"},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.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": "5029505981-const x = 10;", + "signature": "-4001438729-declare const x = 10;\n", + "affectsGlobalScope": true + }, + "version": "5029505981-const x = 10;", + "signature": "-4001438729-declare const x = 10;\n", + "affectsGlobalScope": true + }, + "./b.ts": { + "original": { + "version": "2026006654-const y = 10;", + "signature": "-4332668712-declare const y = 10;\n", + "affectsGlobalScope": true + }, + "version": "2026006654-const y = 10;", + "signature": "-4332668712-declare const y = 10;\n", + "affectsGlobalScope": true + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "noEmitOnError": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "latestChangedDtsFile": "./b.d.ts" + }, + "version": "FakeTSVersion", + "size": 1009 +} + diff --git a/tests/baselines/reference/tsc/incremental/when-project-has-strict-true.js b/tests/baselines/reference/tsc/incremental/when-project-has-strict-true.js new file mode 100644 index 0000000000000..1d959919f54d6 --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/when-project-has-strict-true.js @@ -0,0 +1,136 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/src/project/class1.ts] +export class class1 {} + +//// [/src/project/tsconfig.json] +{ + "compilerOptions": { + "incremental": true, + "strict": true + } +} + + + +Output:: +/lib/tsc -noEmit -p src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/class1.ts" +] +Program options: { + "incremental": true, + "strict": true, + "noEmit": true, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/class1.ts + +Semantic diagnostics in builder refreshed for:: +/lib/lib.d.ts +/src/project/class1.ts + +Shape signatures in builder refreshed for:: +/lib/lib.d.ts (used version) +/src/project/class1.ts (used version) + + +//// [/src/project/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../lib/lib.d.ts","./class1.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},"-7660182596-export class class1 {}"],"root":[2],"options":{"strict":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,2],"affectedFilesPendingEmit":[2]},"version":"FakeTSVersion"} + +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../lib/lib.d.ts", + "./class1.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 + }, + "./class1.ts": { + "version": "-7660182596-export class class1 {}", + "signature": "-7660182596-export class class1 {}" + } + }, + "root": [ + [ + 2, + "./class1.ts" + ] + ], + "options": { + "strict": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./class1.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./class1.ts", + "Js" + ] + ] + }, + "version": "FakeTSVersion", + "size": 740 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/lib/tsc -noEmit -p src/project +exitCode:: ExitStatus.Success +Program root files: [ + "/src/project/class1.ts" +] +Program options: { + "incremental": true, + "strict": true, + "noEmit": true, + "project": "/src/project", + "configFilePath": "/src/project/tsconfig.json" +} +Program structureReused: Not +Program files:: +/lib/lib.d.ts +/src/project/class1.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + diff --git a/tests/baselines/reference/tsc/incremental/with-noEmitOnError-semantic-errors.js b/tests/baselines/reference/tsc/incremental/with-noEmitOnError-semantic-errors.js new file mode 100644 index 0000000000000..fd45b37497c47 --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/with-noEmitOnError-semantic-errors.js @@ -0,0 +1,387 @@ +currentDirectory:: /user/username/projects/noEmitOnError useCaseSensitiveFileNames: false +Input:: +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/user/username/projects/noEmitOnError/shared/types/db.ts] +export interface A { + name: string; +} + + +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a: string = 10; + +//// [/user/username/projects/noEmitOnError/src/other.ts] +console.log("hi"); +export { } + + +//// [/user/username/projects/noEmitOnError/tsconfig.json] +{ + "compilerOptions": { + "outDir": "./dev-build", + "noEmitOnError": true + } +} + + + +Output:: +/a/lib/tsc --incremental +src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. + +2 const a: string = 10; +   ~ + + +Found 1 error in src/main.ts:2 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 + +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 (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] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-5014788164-export interface A {\n name: string;\n}\n","-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "version": "-5014788164-export interface A {\n name: string;\n}\n", + "signature": "-5014788164-export interface A {\n name: string;\n}\n" + }, + "../src/main.ts": { + "version": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "signature": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;" + }, + "../src/other.ts": { + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + [ + "../src/main.ts", + [ + { + "file": "../src/main.ts", + "start": 46, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'number' is not assignable to type 'string'." + } + ] + ], + "../src/other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "../shared/types/db.ts", + "Js" + ], + [ + "../src/main.ts", + "Js" + ], + [ + "../src/other.ts", + "Js" + ] + ] + }, + "version": "FakeTSVersion", + "size": 1147 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/a/lib/tsc --incremental +src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. + +2 const a: string = 10; +   ~ + + +Found 1 error in src/main.ts:2 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: incremental-declaration-doesnt-change +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a: string = "hello"; + + + +Output:: +/a/lib/tsc --incremental +exitCode:: ExitStatus.Success +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var a = "hello"; + + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +console.log("hi"); + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "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": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "signature": "-3531856636-export {};\n" + }, + "version": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "signature": "-3531856636-export {};\n" + }, + "../src/other.ts": { + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1026 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/a/lib/tsc --incremental +exitCode:: ExitStatus.Success +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + diff --git a/tests/baselines/reference/tsc/incremental/with-noEmitOnError-syntax-errors.js b/tests/baselines/reference/tsc/incremental/with-noEmitOnError-syntax-errors.js new file mode 100644 index 0000000000000..b5a10423405f3 --- /dev/null +++ b/tests/baselines/reference/tsc/incremental/with-noEmitOnError-syntax-errors.js @@ -0,0 +1,382 @@ +currentDirectory:: /user/username/projects/noEmitOnError useCaseSensitiveFileNames: false +Input:: +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/user/username/projects/noEmitOnError/shared/types/db.ts] +export interface A { + name: string; +} + + +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +; + + +//// [/user/username/projects/noEmitOnError/src/other.ts] +console.log("hi"); +export { } + + +//// [/user/username/projects/noEmitOnError/tsconfig.json] +{ + "compilerOptions": { + "outDir": "./dev-build", + "noEmitOnError": true + } +} + + + +Output:: +/a/lib/tsc --incremental +src/main.ts:4:1 - error TS1005: ',' expected. + +4 ; +  ~ + + +Found 1 error in src/main.ts:4 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 + +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 (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] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4],"affectedFilesPendingEmit":[2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "version": "-5014788164-export interface A {\n name: string;\n}\n", + "signature": "-5014788164-export interface A {\n name: string;\n}\n" + }, + "../src/main.ts": { + "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": { + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../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" + ] + ] + }, + "version": "FakeTSVersion", + "size": 1020 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/a/lib/tsc --incremental +src/main.ts:4:1 - error TS1005: ',' expected. + +4 ; +  ~ + + +Found 1 error in src/main.ts:4 + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + + + +Change:: incremental-declaration-doesnt-change +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +}; + + + +Output:: +/a/lib/tsc --incremental +exitCode:: ExitStatus.Success +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var a = { + lastName: 'sdsd' +}; + + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +console.log("hi"); + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "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": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "signature": "-3531856636-export {};\n" + }, + "version": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "signature": "-3531856636-export {};\n" + }, + "../src/other.ts": { + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1035 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/a/lib/tsc --incremental +exitCode:: ExitStatus.Success +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + + diff --git a/tests/baselines/reference/tsc/moduleResolution/alternateResult.js b/tests/baselines/reference/tsc/moduleResolution/alternateResult.js index 5a12ea54c693a..ed6ecc8a79b32 100644 --- a/tests/baselines/reference/tsc/moduleResolution/alternateResult.js +++ b/tests/baselines/reference/tsc/moduleResolution/alternateResult.js @@ -383,7 +383,7 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/index.mjs] "use strict"; -export {}; +Object.defineProperty(exports, "__esModule", { value: true }); //// [/home/src/projects/project/tsconfig.tsbuildinfo] diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError-with-incremental.js new file mode 100644 index 0000000000000..032a1050400b9 --- /dev/null +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError-with-incremental.js @@ -0,0 +1,693 @@ +currentDirectory:: /user/username/projects/noEmitOnError useCaseSensitiveFileNames: false +Input:: +//// [/user/username/projects/noEmitOnError/tsconfig.json] +{ + "compilerOptions": { + "outDir": "./dev-build", + "noEmitOnError": true + } +} + +//// [/user/username/projects/noEmitOnError/shared/types/db.ts] +export interface A { + name: string; +} + + +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +; + + +//// [/user/username/projects/noEmitOnError/src/other.ts] +console.log("hi"); +export { } + + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + + +/a/lib/tsc.js --w --assumeChangesOnlyAffectDirectDependencies --incremental +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +src/main.ts:4:1 - error TS1005: ',' expected. + +4 ; +  ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":{"assumeChangesOnlyAffectDirectDependencies":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4],"affectedFilesPendingEmit":[2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "version": "-5014788164-export interface A {\n name: string;\n}\n", + "signature": "-5014788164-export interface A {\n name: string;\n}\n" + }, + "../src/main.ts": { + "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": { + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "assumeChangesOnlyAffectDirectDependencies": true, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../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" + ] + ] + }, + "version": "FakeTSVersion", + "size": 1069 +} + + +PolledWatches:: +/user/username/projects/noEmitOnError/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/noEmitOnError/shared/types/db.ts: *new* + {} +/user/username/projects/noEmitOnError/src/main.ts: *new* + {} +/user/username/projects/noEmitOnError/src/other.ts: *new* + {} +/user/username/projects/noEmitOnError/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/noEmitOnError: *new* + {} + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "assumeChangesOnlyAffectDirectDependencies": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 + +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 (used version) +/user/username/projects/noemitonerror/src/main.ts (used version) +/user/username/projects/noemitonerror/src/other.ts (used version) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +1: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +1: timerToUpdateProgram + +After running Timeout callback:: count: 0 + + +exitCode:: ExitStatus.undefined + +Change:: Fix Syntax error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +}; + + +Timeout callback:: count: 1 +2: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +2: timerToUpdateProgram + +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":{"assumeChangesOnlyAffectDirectDependencies":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "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": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "signature": "-3531856636-export {};\n" + }, + "version": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "signature": "-3531856636-export {};\n" + }, + "../src/other.ts": { + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "assumeChangesOnlyAffectDirectDependencies": true, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1084 +} + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var a = { + lastName: 'sdsd' +}; + + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +console.log("hi"); + + + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "assumeChangesOnlyAffectDirectDependencies": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Completely +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: Semantic Error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a: string = 10; + + +Timeout callback:: count: 1 +3: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +3: timerToUpdateProgram + +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. + +2 const a: string = 10; +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":{"assumeChangesOnlyAffectDirectDependencies":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[3]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "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": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "signature": "-3531856636-export {};\n" + }, + "version": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "signature": "-3531856636-export {};\n" + }, + "../src/other.ts": { + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "assumeChangesOnlyAffectDirectDependencies": true, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + [ + "../src/main.ts", + [ + { + "file": "../src/main.ts", + "start": 46, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'number' is not assignable to type 'string'." + } + ] + ], + "../src/other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "../src/main.ts", + "Js" + ] + ] + }, + "version": "FakeTSVersion", + "size": 1243 +} + + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "assumeChangesOnlyAffectDirectDependencies": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Completely +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +4: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +4: timerToUpdateProgram + +After running Timeout callback:: count: 0 + + +exitCode:: ExitStatus.undefined + +Change:: Fix Semantic Error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a: string = "hello"; + + +Timeout callback:: count: 1 +5: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +5: timerToUpdateProgram + +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":{"assumeChangesOnlyAffectDirectDependencies":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "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": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "signature": "-3531856636-export {};\n" + }, + "version": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "signature": "-3531856636-export {};\n" + }, + "../src/other.ts": { + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "assumeChangesOnlyAffectDirectDependencies": true, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1075 +} + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var a = "hello"; + + + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "assumeChangesOnlyAffectDirectDependencies": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Completely +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +6: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +6: timerToUpdateProgram + +After running Timeout callback:: count: 0 + + +exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError.js new file mode 100644 index 0000000000000..1bc197a356d78 --- /dev/null +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependencies/with-noEmitOnError.js @@ -0,0 +1,349 @@ +currentDirectory:: /user/username/projects/noEmitOnError useCaseSensitiveFileNames: false +Input:: +//// [/user/username/projects/noEmitOnError/tsconfig.json] +{ + "compilerOptions": { + "outDir": "./dev-build", + "noEmitOnError": true + } +} + +//// [/user/username/projects/noEmitOnError/shared/types/db.ts] +export interface A { + name: string; +} + + +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +; + + +//// [/user/username/projects/noEmitOnError/src/other.ts] +console.log("hi"); +export { } + + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + + +/a/lib/tsc.js --w --assumeChangesOnlyAffectDirectDependencies +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +src/main.ts:4:1 - error TS1005: ',' expected. + +4 ; +  ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + + +PolledWatches:: +/user/username/projects/noEmitOnError/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/noEmitOnError/shared/types/db.ts: *new* + {} +/user/username/projects/noEmitOnError/src/main.ts: *new* + {} +/user/username/projects/noEmitOnError/src/other.ts: *new* + {} +/user/username/projects/noEmitOnError/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/noEmitOnError: *new* + {} + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "assumeChangesOnlyAffectDirectDependencies": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 + +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 (used version) +/user/username/projects/noemitonerror/src/main.ts (used version) +/user/username/projects/noemitonerror/src/other.ts (used version) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +1: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +1: timerToUpdateProgram + +After running Timeout callback:: count: 0 + + +exitCode:: ExitStatus.undefined + +Change:: Fix Syntax error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +}; + + +Timeout callback:: count: 1 +2: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +2: timerToUpdateProgram + +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var a = { + lastName: 'sdsd' +}; + + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +console.log("hi"); + + + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "assumeChangesOnlyAffectDirectDependencies": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Completely +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: Semantic Error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a: string = 10; + + +Timeout callback:: count: 1 +3: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +3: timerToUpdateProgram + +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. + +2 const a: string = 10; +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "assumeChangesOnlyAffectDirectDependencies": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Completely +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +4: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +4: timerToUpdateProgram + +After running Timeout callback:: count: 0 + + +exitCode:: ExitStatus.undefined + +Change:: Fix Semantic Error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a: string = "hello"; + + +Timeout callback:: count: 1 +5: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +5: timerToUpdateProgram + +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var a = "hello"; + + + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "assumeChangesOnlyAffectDirectDependencies": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Completely +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +6: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +6: timerToUpdateProgram + +After running Timeout callback:: count: 0 + + +exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError-with-incremental.js new file mode 100644 index 0000000000000..ff0c308eb0be1 --- /dev/null +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError-with-incremental.js @@ -0,0 +1,728 @@ +currentDirectory:: /user/username/projects/noEmitOnError useCaseSensitiveFileNames: false +Input:: +//// [/user/username/projects/noEmitOnError/tsconfig.json] +{ + "compilerOptions": { + "outDir": "./dev-build", + "noEmitOnError": true + } +} + +//// [/user/username/projects/noEmitOnError/shared/types/db.ts] +export interface A { + name: string; +} + + +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +; + + +//// [/user/username/projects/noEmitOnError/src/other.ts] +console.log("hi"); +export { } + + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + + +/a/lib/tsc.js --w --assumeChangesOnlyAffectDirectDependencies --d --incremental +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +src/main.ts:4:1 - error TS1005: ',' expected. + +4 ; +  ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4],"affectedFilesPendingEmit":[2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "version": "-5014788164-export interface A {\n name: string;\n}\n", + "signature": "-5014788164-export interface A {\n name: string;\n}\n" + }, + "../src/main.ts": { + "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": { + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "assumeChangesOnlyAffectDirectDependencies": true, + "declaration": true, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../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" + ] + ] + }, + "version": "FakeTSVersion", + "size": 1088 +} + + +PolledWatches:: +/user/username/projects/noEmitOnError/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/noEmitOnError/shared/types/db.ts: *new* + {} +/user/username/projects/noEmitOnError/src/main.ts: *new* + {} +/user/username/projects/noEmitOnError/src/other.ts: *new* + {} +/user/username/projects/noEmitOnError/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/noEmitOnError: *new* + {} + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "assumeChangesOnlyAffectDirectDependencies": true, + "declaration": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 + +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 (used version) +/user/username/projects/noemitonerror/src/main.ts (used version) +/user/username/projects/noemitonerror/src/other.ts (used version) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +1: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +1: timerToUpdateProgram + +After running Timeout callback:: count: 0 + + +exitCode:: ExitStatus.undefined + +Change:: Fix Syntax error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +}; + + +Timeout callback:: count: 1 +2: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +2: timerToUpdateProgram + +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "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": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "signature": "-3531856636-export {};\n" + }, + "version": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "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" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "assumeChangesOnlyAffectDirectDependencies": true, + "declaration": true, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1154 +} + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.d.ts] +export interface A { + name: string; +} + + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var a = { + lastName: 'sdsd' +}; + + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.d.ts] +export {}; + + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +console.log("hi"); + + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.d.ts] +export {}; + + + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "assumeChangesOnlyAffectDirectDependencies": true, + "declaration": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Completely +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: Semantic Error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a: string = 10; + + +Timeout callback:: count: 1 +3: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +3: timerToUpdateProgram + +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. + +2 const a: string = 10; +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[3]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "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": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "signature": "-3531856636-export {};\n" + }, + "version": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "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" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "assumeChangesOnlyAffectDirectDependencies": true, + "declaration": true, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + [ + "../src/main.ts", + [ + { + "file": "../src/main.ts", + "start": 46, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'number' is not assignable to type 'string'." + } + ] + ], + "../src/other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "../src/main.ts", + "Js | Dts" + ] + ] + }, + "version": "FakeTSVersion", + "size": 1313 +} + + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "assumeChangesOnlyAffectDirectDependencies": true, + "declaration": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Completely +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +4: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +4: timerToUpdateProgram + +After running Timeout callback:: count: 0 + + +exitCode:: ExitStatus.undefined + +Change:: Fix Semantic Error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a: string = "hello"; + + +Timeout callback:: count: 1 +5: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +5: timerToUpdateProgram + +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":{"assumeChangesOnlyAffectDirectDependencies":true,"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "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": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "signature": "-3531856636-export {};\n" + }, + "version": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "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" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "assumeChangesOnlyAffectDirectDependencies": true, + "declaration": true, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1145 +} + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var a = "hello"; + + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.d.ts] file written with same contents + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "assumeChangesOnlyAffectDirectDependencies": true, + "declaration": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Completely +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +6: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +6: timerToUpdateProgram + +After running Timeout callback:: count: 0 + + +exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError.js new file mode 100644 index 0000000000000..d02470d9cf80e --- /dev/null +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/assumeChangesOnlyAffectDirectDependenciesAndD/with-noEmitOnError.js @@ -0,0 +1,368 @@ +currentDirectory:: /user/username/projects/noEmitOnError useCaseSensitiveFileNames: false +Input:: +//// [/user/username/projects/noEmitOnError/tsconfig.json] +{ + "compilerOptions": { + "outDir": "./dev-build", + "noEmitOnError": true + } +} + +//// [/user/username/projects/noEmitOnError/shared/types/db.ts] +export interface A { + name: string; +} + + +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +; + + +//// [/user/username/projects/noEmitOnError/src/other.ts] +console.log("hi"); +export { } + + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + + +/a/lib/tsc.js --w --assumeChangesOnlyAffectDirectDependencies --d +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +src/main.ts:4:1 - error TS1005: ',' expected. + +4 ; +  ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + + +PolledWatches:: +/user/username/projects/noEmitOnError/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/noEmitOnError/shared/types/db.ts: *new* + {} +/user/username/projects/noEmitOnError/src/main.ts: *new* + {} +/user/username/projects/noEmitOnError/src/other.ts: *new* + {} +/user/username/projects/noEmitOnError/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/noEmitOnError: *new* + {} + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "assumeChangesOnlyAffectDirectDependencies": true, + "declaration": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 + +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 (used version) +/user/username/projects/noemitonerror/src/main.ts (used version) +/user/username/projects/noemitonerror/src/other.ts (used version) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +1: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +1: timerToUpdateProgram + +After running Timeout callback:: count: 0 + + +exitCode:: ExitStatus.undefined + +Change:: Fix Syntax error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +}; + + +Timeout callback:: count: 1 +2: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +2: timerToUpdateProgram + +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.d.ts] +export interface A { + name: string; +} + + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var a = { + lastName: 'sdsd' +}; + + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.d.ts] +export {}; + + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +console.log("hi"); + + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.d.ts] +export {}; + + + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "assumeChangesOnlyAffectDirectDependencies": true, + "declaration": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Completely +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: Semantic Error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a: string = 10; + + +Timeout callback:: count: 1 +3: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +3: timerToUpdateProgram + +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. + +2 const a: string = 10; +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "assumeChangesOnlyAffectDirectDependencies": true, + "declaration": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Completely +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +4: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +4: timerToUpdateProgram + +After running Timeout callback:: count: 0 + + +exitCode:: ExitStatus.undefined + +Change:: Fix Semantic Error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a: string = "hello"; + + +Timeout callback:: count: 1 +5: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +5: timerToUpdateProgram + +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var a = "hello"; + + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.d.ts] file written with same contents + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "assumeChangesOnlyAffectDirectDependencies": true, + "declaration": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Completely +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +6: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +6: timerToUpdateProgram + +After running Timeout callback:: count: 0 + + +exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/with-noEmitOnError-with-incremental.js new file mode 100644 index 0000000000000..13142921b2c05 --- /dev/null +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/default/with-noEmitOnError-with-incremental.js @@ -0,0 +1,685 @@ +currentDirectory:: /user/username/projects/noEmitOnError useCaseSensitiveFileNames: false +Input:: +//// [/user/username/projects/noEmitOnError/tsconfig.json] +{ + "compilerOptions": { + "outDir": "./dev-build", + "noEmitOnError": true + } +} + +//// [/user/username/projects/noEmitOnError/shared/types/db.ts] +export interface A { + name: string; +} + + +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +; + + +//// [/user/username/projects/noEmitOnError/src/other.ts] +console.log("hi"); +export { } + + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + + +/a/lib/tsc.js --w --incremental +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +src/main.ts:4:1 - error TS1005: ',' expected. + +4 ; +  ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4],"affectedFilesPendingEmit":[2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "version": "-5014788164-export interface A {\n name: string;\n}\n", + "signature": "-5014788164-export interface A {\n name: string;\n}\n" + }, + "../src/main.ts": { + "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": { + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../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" + ] + ] + }, + "version": "FakeTSVersion", + "size": 1020 +} + + +PolledWatches:: +/user/username/projects/noEmitOnError/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/noEmitOnError/shared/types/db.ts: *new* + {} +/user/username/projects/noEmitOnError/src/main.ts: *new* + {} +/user/username/projects/noEmitOnError/src/other.ts: *new* + {} +/user/username/projects/noEmitOnError/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/noEmitOnError: *new* + {} + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 + +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 (used version) +/user/username/projects/noemitonerror/src/main.ts (used version) +/user/username/projects/noemitonerror/src/other.ts (used version) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +1: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +1: timerToUpdateProgram + +After running Timeout callback:: count: 0 + + +exitCode:: ExitStatus.undefined + +Change:: Fix Syntax error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +}; + + +Timeout callback:: count: 1 +2: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +2: timerToUpdateProgram + +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "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": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "signature": "-3531856636-export {};\n" + }, + "version": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "signature": "-3531856636-export {};\n" + }, + "../src/other.ts": { + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1035 +} + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var a = { + lastName: 'sdsd' +}; + + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +console.log("hi"); + + + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Completely +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: Semantic Error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a: string = 10; + + +Timeout callback:: count: 1 +3: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +3: timerToUpdateProgram + +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. + +2 const a: string = 10; +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[3]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "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": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "signature": "-3531856636-export {};\n" + }, + "version": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "signature": "-3531856636-export {};\n" + }, + "../src/other.ts": { + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + [ + "../src/main.ts", + [ + { + "file": "../src/main.ts", + "start": 46, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'number' is not assignable to type 'string'." + } + ] + ], + "../src/other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "../src/main.ts", + "Js" + ] + ] + }, + "version": "FakeTSVersion", + "size": 1194 +} + + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Completely +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +4: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +4: timerToUpdateProgram + +After running Timeout callback:: count: 0 + + +exitCode:: ExitStatus.undefined + +Change:: Fix Semantic Error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a: string = "hello"; + + +Timeout callback:: count: 1 +5: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +5: timerToUpdateProgram + +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "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": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "signature": "-3531856636-export {};\n" + }, + "version": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "signature": "-3531856636-export {};\n" + }, + "../src/other.ts": { + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1026 +} + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var a = "hello"; + + + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Completely +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +6: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +6: timerToUpdateProgram + +After running Timeout callback:: count: 0 + + +exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/with-noEmitOnError-with-incremental.js new file mode 100644 index 0000000000000..2abe3c7974d3e --- /dev/null +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/defaultAndD/with-noEmitOnError-with-incremental.js @@ -0,0 +1,720 @@ +currentDirectory:: /user/username/projects/noEmitOnError useCaseSensitiveFileNames: false +Input:: +//// [/user/username/projects/noEmitOnError/tsconfig.json] +{ + "compilerOptions": { + "outDir": "./dev-build", + "noEmitOnError": true + } +} + +//// [/user/username/projects/noEmitOnError/shared/types/db.ts] +export interface A { + name: string; +} + + +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +; + + +//// [/user/username/projects/noEmitOnError/src/other.ts] +console.log("hi"); +export { } + + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + + +/a/lib/tsc.js --w --d --incremental +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +src/main.ts:4:1 - error TS1005: ',' expected. + +4 ; +  ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4],"affectedFilesPendingEmit":[2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "version": "-5014788164-export interface A {\n name: string;\n}\n", + "signature": "-5014788164-export interface A {\n name: string;\n}\n" + }, + "../src/main.ts": { + "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": { + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "declaration": true, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../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" + ] + ] + }, + "version": "FakeTSVersion", + "size": 1039 +} + + +PolledWatches:: +/user/username/projects/noEmitOnError/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/noEmitOnError/shared/types/db.ts: *new* + {} +/user/username/projects/noEmitOnError/src/main.ts: *new* + {} +/user/username/projects/noEmitOnError/src/other.ts: *new* + {} +/user/username/projects/noEmitOnError/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/noEmitOnError: *new* + {} + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "declaration": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 + +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 (used version) +/user/username/projects/noemitonerror/src/main.ts (used version) +/user/username/projects/noemitonerror/src/other.ts (used version) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +1: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +1: timerToUpdateProgram + +After running Timeout callback:: count: 0 + + +exitCode:: ExitStatus.undefined + +Change:: Fix Syntax error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +}; + + +Timeout callback:: count: 1 +2: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +2: timerToUpdateProgram + +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "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": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "signature": "-3531856636-export {};\n" + }, + "version": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "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" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "declaration": true, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1105 +} + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.d.ts] +export interface A { + name: string; +} + + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var a = { + lastName: 'sdsd' +}; + + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.d.ts] +export {}; + + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +console.log("hi"); + + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.d.ts] +export {}; + + + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "declaration": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Completely +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: Semantic Error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a: string = 10; + + +Timeout callback:: count: 1 +3: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +3: timerToUpdateProgram + +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. + +2 const a: string = 10; +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[3]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "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": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "signature": "-3531856636-export {};\n" + }, + "version": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "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" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "declaration": true, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + [ + "../src/main.ts", + [ + { + "file": "../src/main.ts", + "start": 46, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'number' is not assignable to type 'string'." + } + ] + ], + "../src/other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "../src/main.ts", + "Js | Dts" + ] + ] + }, + "version": "FakeTSVersion", + "size": 1264 +} + + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "declaration": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Completely +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +4: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +4: timerToUpdateProgram + +After running Timeout callback:: count: 0 + + +exitCode:: ExitStatus.undefined + +Change:: Fix Semantic Error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a: string = "hello"; + + +Timeout callback:: count: 1 +5: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +5: timerToUpdateProgram + +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "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": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "signature": "-3531856636-export {};\n" + }, + "version": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "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" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "declaration": true, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1096 +} + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var a = "hello"; + + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.d.ts] file written with same contents + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "declaration": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Completely +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +6: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +6: timerToUpdateProgram + +After running Timeout callback:: count: 0 + + +exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/with-noEmitOnError-with-incremental.js new file mode 100644 index 0000000000000..f53439aaf18d7 --- /dev/null +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModules/with-noEmitOnError-with-incremental.js @@ -0,0 +1,689 @@ +currentDirectory:: /user/username/projects/noEmitOnError useCaseSensitiveFileNames: false +Input:: +//// [/user/username/projects/noEmitOnError/tsconfig.json] +{ + "compilerOptions": { + "outDir": "./dev-build", + "noEmitOnError": true + } +} + +//// [/user/username/projects/noEmitOnError/shared/types/db.ts] +export interface A { + name: string; +} + + +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +; + + +//// [/user/username/projects/noEmitOnError/src/other.ts] +console.log("hi"); +export { } + + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + + +/a/lib/tsc.js --w --isolatedModules --incremental +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +src/main.ts:4:1 - error TS1005: ',' expected. + +4 ; +  ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4],"affectedFilesPendingEmit":[2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "version": "-5014788164-export interface A {\n name: string;\n}\n", + "signature": "-5014788164-export interface A {\n name: string;\n}\n" + }, + "../src/main.ts": { + "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": { + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../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" + ] + ] + }, + "version": "FakeTSVersion", + "size": 1020 +} + + +PolledWatches:: +/user/username/projects/noEmitOnError/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/noEmitOnError/shared/types/db.ts: *new* + {} +/user/username/projects/noEmitOnError/src/main.ts: *new* + {} +/user/username/projects/noEmitOnError/src/other.ts: *new* + {} +/user/username/projects/noEmitOnError/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/noEmitOnError: *new* + {} + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "isolatedModules": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 + +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 (used version) +/user/username/projects/noemitonerror/src/main.ts (used version) +/user/username/projects/noemitonerror/src/other.ts (used version) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +1: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +1: timerToUpdateProgram + +After running Timeout callback:: count: 0 + + +exitCode:: ExitStatus.undefined + +Change:: Fix Syntax error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +}; + + +Timeout callback:: count: 1 +2: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +2: timerToUpdateProgram + +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "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": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "signature": "-3531856636-export {};\n" + }, + "version": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "signature": "-3531856636-export {};\n" + }, + "../src/other.ts": { + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1035 +} + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var a = { + lastName: 'sdsd' +}; + + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +console.log("hi"); + + + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "isolatedModules": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Completely +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: Semantic Error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a: string = 10; + + +Timeout callback:: count: 1 +3: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +3: timerToUpdateProgram + +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. + +2 const a: string = 10; +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[3]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "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": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "signature": "-3531856636-export {};\n" + }, + "version": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "signature": "-3531856636-export {};\n" + }, + "../src/other.ts": { + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + [ + "../src/main.ts", + [ + { + "file": "../src/main.ts", + "start": 46, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'number' is not assignable to type 'string'." + } + ] + ], + "../src/other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "../src/main.ts", + "Js" + ] + ] + }, + "version": "FakeTSVersion", + "size": 1194 +} + + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "isolatedModules": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Completely +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +4: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +4: timerToUpdateProgram + +After running Timeout callback:: count: 0 + + +exitCode:: ExitStatus.undefined + +Change:: Fix Semantic Error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a: string = "hello"; + + +Timeout callback:: count: 1 +5: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +5: timerToUpdateProgram + +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "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": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "signature": "-3531856636-export {};\n" + }, + "version": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "signature": "-3531856636-export {};\n" + }, + "../src/other.ts": { + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1026 +} + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var a = "hello"; + + + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "isolatedModules": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Completely +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +6: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +6: timerToUpdateProgram + +After running Timeout callback:: count: 0 + + +exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/with-noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/with-noEmitOnError-with-incremental.js new file mode 100644 index 0000000000000..3685274c1e882 --- /dev/null +++ b/tests/baselines/reference/tscWatch/emitAndErrorUpdates/isolatedModulesAndD/with-noEmitOnError-with-incremental.js @@ -0,0 +1,724 @@ +currentDirectory:: /user/username/projects/noEmitOnError useCaseSensitiveFileNames: false +Input:: +//// [/user/username/projects/noEmitOnError/tsconfig.json] +{ + "compilerOptions": { + "outDir": "./dev-build", + "noEmitOnError": true + } +} + +//// [/user/username/projects/noEmitOnError/shared/types/db.ts] +export interface A { + name: string; +} + + +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +; + + +//// [/user/username/projects/noEmitOnError/src/other.ts] +console.log("hi"); +export { } + + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + + +/a/lib/tsc.js --w --isolatedModules --d --incremental +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +src/main.ts:4:1 - error TS1005: ',' expected. + +4 ; +  ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4],"affectedFilesPendingEmit":[2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "version": "-5014788164-export interface A {\n name: string;\n}\n", + "signature": "-5014788164-export interface A {\n name: string;\n}\n" + }, + "../src/main.ts": { + "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": { + "version": "9084524823-console.log(\"hi\");\nexport { }\n", + "signature": "9084524823-console.log(\"hi\");\nexport { }\n" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "declaration": true, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../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" + ] + ] + }, + "version": "FakeTSVersion", + "size": 1039 +} + + +PolledWatches:: +/user/username/projects/noEmitOnError/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/noEmitOnError/shared/types/db.ts: *new* + {} +/user/username/projects/noEmitOnError/src/main.ts: *new* + {} +/user/username/projects/noEmitOnError/src/other.ts: *new* + {} +/user/username/projects/noEmitOnError/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/noEmitOnError: *new* + {} + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "isolatedModules": true, + "declaration": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Not +Program files:: +/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 + +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 (used version) +/user/username/projects/noemitonerror/src/main.ts (used version) +/user/username/projects/noemitonerror/src/other.ts (used version) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +1: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +1: timerToUpdateProgram + +After running Timeout callback:: count: 0 + + +exitCode:: ExitStatus.undefined + +Change:: Fix Syntax error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a = { + lastName: 'sdsd' +}; + + +Timeout callback:: count: 1 +2: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +2: timerToUpdateProgram + +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "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": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "signature": "-3531856636-export {};\n" + }, + "version": "-2574605496-import { A } from \"../shared/types/db\";\nconst a = {\n lastName: 'sdsd'\n};", + "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" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "declaration": true, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1105 +} + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); + + +//// [/user/username/projects/noEmitOnError/dev-build/shared/types/db.d.ts] +export interface A { + name: string; +} + + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var a = { + lastName: 'sdsd' +}; + + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.d.ts] +export {}; + + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +console.log("hi"); + + +//// [/user/username/projects/noEmitOnError/dev-build/src/other.d.ts] +export {}; + + + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "isolatedModules": true, + "declaration": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Completely +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: Semantic Error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a: string = 10; + + +Timeout callback:: count: 1 +3: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +3: timerToUpdateProgram + +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +src/main.ts:2:7 - error TS2322: Type 'number' is not assignable to type 'string'. + +2 const a: string = 10; +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"../src/main.ts","start":46,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],4],"affectedFilesPendingEmit":[3]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "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": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "signature": "-3531856636-export {};\n" + }, + "version": "-11111345725-import { A } from \"../shared/types/db\";\nconst a: string = 10;", + "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" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "declaration": true, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + [ + "../src/main.ts", + [ + { + "file": "../src/main.ts", + "start": 46, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'number' is not assignable to type 'string'." + } + ] + ], + "../src/other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "../src/main.ts", + "Js | Dts" + ] + ] + }, + "version": "FakeTSVersion", + "size": 1264 +} + + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "isolatedModules": true, + "declaration": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Completely +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +4: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +4: timerToUpdateProgram + +After running Timeout callback:: count: 0 + + +exitCode:: ExitStatus.undefined + +Change:: Fix Semantic Error + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] +import { A } from "../shared/types/db"; +const a: string = "hello"; + + +Timeout callback:: count: 1 +5: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +5: timerToUpdateProgram + +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.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},"-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":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"fileIdsList":[[2]],"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[1,2,3,4]},"version":"FakeTSVersion"} + +//// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ], + "fileNamesList": [ + [ + "../shared/types/db.ts" + ] + ], + "fileInfos": { + "../../../../../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; };", + "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": { + "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": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "signature": "-3531856636-export {};\n" + }, + "version": "-8373351622-import { A } from \"../shared/types/db\";\nconst a: string = \"hello\";", + "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" + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + ] + ], + "options": { + "declaration": true, + "noEmitOnError": true, + "outDir": "./" + }, + "referencedMap": { + "../src/main.ts": [ + "../shared/types/db.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + "../../../../../a/lib/lib.d.ts", + "../shared/types/db.ts", + "../src/main.ts", + "../src/other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1096 +} + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var a = "hello"; + + +//// [/user/username/projects/noEmitOnError/dev-build/src/main.d.ts] file written with same contents + + +Program root files: [ + "/user/username/projects/noEmitOnError/shared/types/db.ts", + "/user/username/projects/noEmitOnError/src/main.ts", + "/user/username/projects/noEmitOnError/src/other.ts" +] +Program options: { + "outDir": "/user/username/projects/noEmitOnError/dev-build", + "noEmitOnError": true, + "watch": true, + "isolatedModules": true, + "declaration": true, + "incremental": true, + "configFilePath": "/user/username/projects/noEmitOnError/tsconfig.json" +} +Program structureReused: Completely +Program files:: +/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 + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/noEmitOnError/src/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/noemitonerror/src/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: No change + +Input:: +//// [/user/username/projects/noEmitOnError/src/main.ts] file written with same contents + +Timeout callback:: count: 1 +6: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +6: timerToUpdateProgram + +After running Timeout callback:: count: 0 + + +exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/with-nodeNext-resolution.js b/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/with-nodeNext-resolution.js index d59303ac57b12..7b5d8c6952e42 100644 --- a/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/with-nodeNext-resolution.js +++ b/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/with-nodeNext-resolution.js @@ -111,8 +111,10 @@ File '/package.json' does not exist according to earlier cached lookups. node_modules/@types/yargs/index.d.ts Imported via "yargs" from file 'src/bin.ts' with packageId 'yargs/index.d.ts@17.0.12' Entry point for implicit type library 'yargs' with packageId 'yargs/index.d.ts@17.0.12' + File is CommonJS module because 'node_modules/@types/yargs/package.json' does not have field "type" src/bin.ts Matched by default include pattern '**/*' + File is CommonJS module because 'package.json' was not found [HH:MM:SS AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/moduleResolution/alternateResult.js b/tests/baselines/reference/tscWatch/moduleResolution/alternateResult.js index 504db1786f660..d150b7613d9d6 100644 --- a/tests/baselines/reference/tscWatch/moduleResolution/alternateResult.js +++ b/tests/baselines/reference/tscWatch/moduleResolution/alternateResult.js @@ -375,7 +375,7 @@ Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/tscon //// [/home/src/projects/project/index.mjs] "use strict"; -export {}; +Object.defineProperty(exports, "__esModule", { value: true }); //// [/home/src/projects/project/tsconfig.tsbuildinfo] diff --git a/tests/baselines/reference/tscWatch/moduleResolution/diagnostics-from-cache.js b/tests/baselines/reference/tscWatch/moduleResolution/diagnostics-from-cache.js index de2f785e9c58a..5ed903115a938 100644 --- a/tests/baselines/reference/tscWatch/moduleResolution/diagnostics-from-cache.js +++ b/tests/baselines/reference/tscWatch/moduleResolution/diagnostics-from-cache.js @@ -80,9 +80,12 @@ File '/package.json' does not exist. //// [/user/username/projects/myproject/dist/index.js] -import * as me from "@this/package"; +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.thing = thing; +var me = require("@this/package"); me.thing(); -export function thing() { } +function thing() { } //// [/user/username/projects/myproject/types/index.d.ts] @@ -90,7 +93,10 @@ export declare function thing(): void; //// [/user/username/projects/myproject/dist/index2.js] -export function thing() { } +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.thing = thing; +function thing() { } //// [/user/username/projects/myproject/types/index2.d.ts] diff --git a/tests/baselines/reference/tscWatch/watchApi/noEmit-with-composite-with-emit-builder.js b/tests/baselines/reference/tscWatch/watchApi/noEmit-with-composite-with-emit-builder.js new file mode 100644 index 0000000000000..79f40bf35529b --- /dev/null +++ b/tests/baselines/reference/tscWatch/watchApi/noEmit-with-composite-with-emit-builder.js @@ -0,0 +1,752 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/user/username/projects/myproject/tsconfig.json] +{ + "compilerOptions": { + "composite": true + } +} + +//// [/user/username/projects/myproject/main.ts] +export const x = 10; + +//// [/user/username/projects/myproject/other.ts] +export const y = 10; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + + +tsc --w --noEmit +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.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},"-10726455937-export const x = 10;","-13729955264-export const y = 10;"],"root":[2,3],"options":{"composite":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,2,3],"affectedFilesPendingEmit":[2,3],"emitSignatures":[2,3]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.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 + }, + "./main.ts": { + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;" + }, + "./other.ts": { + "version": "-13729955264-export const y = 10;", + "signature": "-13729955264-export const y = 10;" + } + }, + "root": [ + [ + 2, + "./main.ts" + ], + [ + 3, + "./other.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./main.ts", + "Js | Dts" + ], + [ + "./other.ts", + "Js | Dts" + ] + ], + "emitSignatures": [ + "./main.ts", + "./other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 746 +} + + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/myproject/main.ts: *new* + {} +/user/username/projects/myproject/other.ts: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject: *new* + {} + +Program root files: [ + "/user/username/projects/myproject/main.ts", + "/user/username/projects/myproject/other.ts" +] +Program options: { + "composite": true, + "noEmit": true, + "configFilePath": "/user/username/projects/myproject/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/main.ts +/user/username/projects/myproject/other.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/myproject/main.ts +/user/username/projects/myproject/other.ts + +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/myproject/main.ts (used version) +/user/username/projects/myproject/other.ts (used version) + +exitCode:: ExitStatus.undefined + +tsc --w +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.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":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n"},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"}],"root":[2,3],"options":{"composite":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./other.d.ts"},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.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 + }, + "./main.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" + }, + "./other.ts": { + "original": { + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n" + }, + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n" + } + }, + "root": [ + [ + 2, + "./main.ts" + ], + [ + 3, + "./other.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.ts" + ], + "latestChangedDtsFile": "./other.d.ts" + }, + "version": "FakeTSVersion", + "size": 866 +} + +//// [/user/username/projects/myproject/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + + +//// [/user/username/projects/myproject/main.d.ts] +export declare const x = 10; + + +//// [/user/username/projects/myproject/other.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.y = void 0; +exports.y = 10; + + +//// [/user/username/projects/myproject/other.d.ts] +export declare const y = 10; + + + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} *new* +/user/username/projects/node_modules/@types: + {"pollingInterval":500} *new* + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} *new* +/user/username/projects/myproject/main.ts: + {} *new* +/user/username/projects/myproject/other.ts: + {} *new* +/user/username/projects/myproject/tsconfig.json: + {} *new* + +FsWatches *deleted*:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/main.ts: + {} +/user/username/projects/myproject/other.ts: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject: + {} *new* + +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject: + {} + +Program root files: [ + "/user/username/projects/myproject/main.ts", + "/user/username/projects/myproject/other.ts" +] +Program options: { + "composite": true, + "configFilePath": "/user/username/projects/myproject/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/main.ts +/user/username/projects/myproject/other.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + +exitCode:: ExitStatus.undefined + +Change:: Add comment + +Input:: +//// [/user/username/projects/myproject/main.ts] +export const x = 10; +// SomeComment + + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches *deleted*:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/main.ts: + {} +/user/username/projects/myproject/other.ts: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject: + {} + +tsc --w --noEmit +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.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":"-14918944530-export const x = 10;\n// SomeComment","signature":"-6821242887-export declare const x = 10;\n"},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"}],"root":[2,3],"options":{"composite":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,2,3],"affectedFilesPendingEmit":[2],"latestChangedDtsFile":"./other.d.ts"},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.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 + }, + "./main.ts": { + "original": { + "version": "-14918944530-export const x = 10;\n// SomeComment", + "signature": "-6821242887-export declare const x = 10;\n" + }, + "version": "-14918944530-export const x = 10;\n// SomeComment", + "signature": "-6821242887-export declare const x = 10;\n" + }, + "./other.ts": { + "original": { + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n" + }, + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n" + } + }, + "root": [ + [ + 2, + "./main.ts" + ], + [ + 3, + "./other.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./main.ts", + "Js | Dts" + ] + ], + "latestChangedDtsFile": "./other.d.ts" + }, + "version": "FakeTSVersion", + "size": 913 +} + + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/myproject/main.ts: *new* + {} +/user/username/projects/myproject/other.ts: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject: *new* + {} + +Program root files: [ + "/user/username/projects/myproject/main.ts", + "/user/username/projects/myproject/other.ts" +] +Program options: { + "composite": true, + "noEmit": true, + "configFilePath": "/user/username/projects/myproject/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/main.ts +/user/username/projects/myproject/other.ts + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/myproject/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/myproject/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +tsc --w +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.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":"-14918944530-export const x = 10;\n// SomeComment","signature":"-6821242887-export declare const x = 10;\n"},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"}],"root":[2,3],"options":{"composite":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./other.d.ts"},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.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 + }, + "./main.ts": { + "original": { + "version": "-14918944530-export const x = 10;\n// SomeComment", + "signature": "-6821242887-export declare const x = 10;\n" + }, + "version": "-14918944530-export const x = 10;\n// SomeComment", + "signature": "-6821242887-export declare const x = 10;\n" + }, + "./other.ts": { + "original": { + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n" + }, + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n" + } + }, + "root": [ + [ + 2, + "./main.ts" + ], + [ + 3, + "./other.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.ts" + ], + "latestChangedDtsFile": "./other.d.ts" + }, + "version": "FakeTSVersion", + "size": 882 +} + +//// [/user/username/projects/myproject/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; +// SomeComment + + + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} *new* +/user/username/projects/node_modules/@types: + {"pollingInterval":500} *new* + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} *new* +/user/username/projects/myproject/main.ts: + {} *new* +/user/username/projects/myproject/other.ts: + {} *new* +/user/username/projects/myproject/tsconfig.json: + {} *new* + +FsWatches *deleted*:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/main.ts: + {} +/user/username/projects/myproject/other.ts: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject: + {} *new* + +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject: + {} + +Program root files: [ + "/user/username/projects/myproject/main.ts", + "/user/username/projects/myproject/other.ts" +] +Program options: { + "composite": true, + "configFilePath": "/user/username/projects/myproject/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/main.ts +/user/username/projects/myproject/other.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + +exitCode:: ExitStatus.undefined + +Change:: Add comment + +Input:: +//// [/user/username/projects/myproject/main.ts] +export const x = 10; +// SomeComment +// SomeComment + + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches *deleted*:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/main.ts: + {} +/user/username/projects/myproject/other.ts: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject: + {} + +tsc --w +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.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":"-16105752451-export const x = 10;\n// SomeComment\n// SomeComment","signature":"-6821242887-export declare const x = 10;\n"},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"}],"root":[2,3],"options":{"composite":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./other.d.ts"},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.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 + }, + "./main.ts": { + "original": { + "version": "-16105752451-export const x = 10;\n// SomeComment\n// SomeComment", + "signature": "-6821242887-export declare const x = 10;\n" + }, + "version": "-16105752451-export const x = 10;\n// SomeComment\n// SomeComment", + "signature": "-6821242887-export declare const x = 10;\n" + }, + "./other.ts": { + "original": { + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n" + }, + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n" + } + }, + "root": [ + [ + 2, + "./main.ts" + ], + [ + 3, + "./other.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.ts" + ], + "latestChangedDtsFile": "./other.d.ts" + }, + "version": "FakeTSVersion", + "size": 898 +} + +//// [/user/username/projects/myproject/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; +// SomeComment +// SomeComment + + + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/myproject/main.ts: *new* + {} +/user/username/projects/myproject/other.ts: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject: *new* + {} + +Program root files: [ + "/user/username/projects/myproject/main.ts", + "/user/username/projects/myproject/other.ts" +] +Program options: { + "composite": true, + "configFilePath": "/user/username/projects/myproject/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/main.ts +/user/username/projects/myproject/other.ts + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/myproject/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/myproject/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/watchApi/noEmit-with-composite-with-semantic-builder.js b/tests/baselines/reference/tscWatch/watchApi/noEmit-with-composite-with-semantic-builder.js new file mode 100644 index 0000000000000..97b1b01dbf903 --- /dev/null +++ b/tests/baselines/reference/tscWatch/watchApi/noEmit-with-composite-with-semantic-builder.js @@ -0,0 +1,788 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/user/username/projects/myproject/tsconfig.json] +{ + "compilerOptions": { + "composite": true + } +} + +//// [/user/username/projects/myproject/main.ts] +export const x = 10; + +//// [/user/username/projects/myproject/other.ts] +export const y = 10; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + + +tsc --w --noEmit +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.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},"-10726455937-export const x = 10;","-13729955264-export const y = 10;"],"root":[2,3],"options":{"composite":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,2,3],"affectedFilesPendingEmit":[2,3],"emitSignatures":[2,3]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.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 + }, + "./main.ts": { + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;" + }, + "./other.ts": { + "version": "-13729955264-export const y = 10;", + "signature": "-13729955264-export const y = 10;" + } + }, + "root": [ + [ + 2, + "./main.ts" + ], + [ + 3, + "./other.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./main.ts", + "Js | Dts" + ], + [ + "./other.ts", + "Js | Dts" + ] + ], + "emitSignatures": [ + "./main.ts", + "./other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 746 +} + + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/myproject/main.ts: *new* + {} +/user/username/projects/myproject/other.ts: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject: *new* + {} + +Program root files: [ + "/user/username/projects/myproject/main.ts", + "/user/username/projects/myproject/other.ts" +] +Program options: { + "composite": true, + "noEmit": true, + "configFilePath": "/user/username/projects/myproject/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/main.ts +/user/username/projects/myproject/other.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/myproject/main.ts +/user/username/projects/myproject/other.ts + +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/myproject/main.ts (used version) +/user/username/projects/myproject/other.ts (used version) + +exitCode:: ExitStatus.undefined + +Checking if output is same as EmitAndSemanticDiagnosticsBuilderProgram:: +Output file text for /user/username/projects/myproject/main.js is same:: true +Output file text for /user/username/projects/myproject/main.d.ts is same:: true +Output file text for /user/username/projects/myproject/other.js is same:: true +Output file text for /user/username/projects/myproject/other.d.ts is same:: true +Output file text for /user/username/projects/myproject/tsconfig.tsbuildinfo is same:: true + +tsc --w +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.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":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n"},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"}],"root":[2,3],"options":{"composite":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./other.d.ts"},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.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 + }, + "./main.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" + }, + "./other.ts": { + "original": { + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n" + }, + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n" + } + }, + "root": [ + [ + 2, + "./main.ts" + ], + [ + 3, + "./other.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.ts" + ], + "latestChangedDtsFile": "./other.d.ts" + }, + "version": "FakeTSVersion", + "size": 866 +} + +//// [/user/username/projects/myproject/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + + +//// [/user/username/projects/myproject/main.d.ts] +export declare const x = 10; + + +//// [/user/username/projects/myproject/other.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.y = void 0; +exports.y = 10; + + +//// [/user/username/projects/myproject/other.d.ts] +export declare const y = 10; + + + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} *new* +/user/username/projects/node_modules/@types: + {"pollingInterval":500} *new* + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} *new* +/user/username/projects/myproject/main.ts: + {} *new* +/user/username/projects/myproject/other.ts: + {} *new* +/user/username/projects/myproject/tsconfig.json: + {} *new* + +FsWatches *deleted*:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/main.ts: + {} +/user/username/projects/myproject/other.ts: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject: + {} *new* + +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject: + {} + +Program root files: [ + "/user/username/projects/myproject/main.ts", + "/user/username/projects/myproject/other.ts" +] +Program options: { + "composite": true, + "configFilePath": "/user/username/projects/myproject/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/main.ts +/user/username/projects/myproject/other.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + +exitCode:: ExitStatus.undefined + +Checking if output is same as EmitAndSemanticDiagnosticsBuilderProgram:: +Output file text for /user/username/projects/myproject/main.js is same:: true +Output file text for /user/username/projects/myproject/main.d.ts is same:: true +Output file text for /user/username/projects/myproject/other.js is same:: true +Output file text for /user/username/projects/myproject/other.d.ts is same:: true +Output file text for /user/username/projects/myproject/tsconfig.tsbuildinfo is same:: true + +Change:: Add comment + +Input:: +//// [/user/username/projects/myproject/main.ts] +export const x = 10; +// SomeComment + + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches *deleted*:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/main.ts: + {} +/user/username/projects/myproject/other.ts: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject: + {} + +tsc --w --noEmit +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.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":"-14918944530-export const x = 10;\n// SomeComment","signature":"-6821242887-export declare const x = 10;\n"},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"}],"root":[2,3],"options":{"composite":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,2,3],"affectedFilesPendingEmit":[2],"latestChangedDtsFile":"./other.d.ts"},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.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 + }, + "./main.ts": { + "original": { + "version": "-14918944530-export const x = 10;\n// SomeComment", + "signature": "-6821242887-export declare const x = 10;\n" + }, + "version": "-14918944530-export const x = 10;\n// SomeComment", + "signature": "-6821242887-export declare const x = 10;\n" + }, + "./other.ts": { + "original": { + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n" + }, + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n" + } + }, + "root": [ + [ + 2, + "./main.ts" + ], + [ + 3, + "./other.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./main.ts", + "Js | Dts" + ] + ], + "latestChangedDtsFile": "./other.d.ts" + }, + "version": "FakeTSVersion", + "size": 913 +} + + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/myproject/main.ts: *new* + {} +/user/username/projects/myproject/other.ts: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject: *new* + {} + +Program root files: [ + "/user/username/projects/myproject/main.ts", + "/user/username/projects/myproject/other.ts" +] +Program options: { + "composite": true, + "noEmit": true, + "configFilePath": "/user/username/projects/myproject/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/main.ts +/user/username/projects/myproject/other.ts + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/myproject/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/myproject/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Checking if output is same as EmitAndSemanticDiagnosticsBuilderProgram:: +Output file text for /user/username/projects/myproject/main.js is same:: true +Output file text for /user/username/projects/myproject/main.d.ts is same:: true +Output file text for /user/username/projects/myproject/other.js is same:: true +Output file text for /user/username/projects/myproject/other.d.ts is same:: true +Output file text for /user/username/projects/myproject/tsconfig.tsbuildinfo is same:: true + +tsc --w +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.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":"-14918944530-export const x = 10;\n// SomeComment","signature":"-6821242887-export declare const x = 10;\n"},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"}],"root":[2,3],"options":{"composite":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./other.d.ts"},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.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 + }, + "./main.ts": { + "original": { + "version": "-14918944530-export const x = 10;\n// SomeComment", + "signature": "-6821242887-export declare const x = 10;\n" + }, + "version": "-14918944530-export const x = 10;\n// SomeComment", + "signature": "-6821242887-export declare const x = 10;\n" + }, + "./other.ts": { + "original": { + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n" + }, + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n" + } + }, + "root": [ + [ + 2, + "./main.ts" + ], + [ + 3, + "./other.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.ts" + ], + "latestChangedDtsFile": "./other.d.ts" + }, + "version": "FakeTSVersion", + "size": 882 +} + +//// [/user/username/projects/myproject/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; +// SomeComment + + + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} *new* +/user/username/projects/node_modules/@types: + {"pollingInterval":500} *new* + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} *new* +/user/username/projects/myproject/main.ts: + {} *new* +/user/username/projects/myproject/other.ts: + {} *new* +/user/username/projects/myproject/tsconfig.json: + {} *new* + +FsWatches *deleted*:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/main.ts: + {} +/user/username/projects/myproject/other.ts: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject: + {} *new* + +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject: + {} + +Program root files: [ + "/user/username/projects/myproject/main.ts", + "/user/username/projects/myproject/other.ts" +] +Program options: { + "composite": true, + "configFilePath": "/user/username/projects/myproject/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/main.ts +/user/username/projects/myproject/other.ts + +Semantic diagnostics in builder refreshed for:: + +No shapes updated in the builder:: + +exitCode:: ExitStatus.undefined + +Checking if output is same as EmitAndSemanticDiagnosticsBuilderProgram:: +Output file text for /user/username/projects/myproject/main.js is same:: true +Output file text for /user/username/projects/myproject/main.d.ts is same:: true +Output file text for /user/username/projects/myproject/other.js is same:: true +Output file text for /user/username/projects/myproject/other.d.ts is same:: true +Output file text for /user/username/projects/myproject/tsconfig.tsbuildinfo is same:: true + +Change:: Add comment + +Input:: +//// [/user/username/projects/myproject/main.ts] +export const x = 10; +// SomeComment +// SomeComment + + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches *deleted*:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/main.ts: + {} +/user/username/projects/myproject/other.ts: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject: + {} + +tsc --w +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.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":"-16105752451-export const x = 10;\n// SomeComment\n// SomeComment","signature":"-6821242887-export declare const x = 10;\n"},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"}],"root":[2,3],"options":{"composite":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./other.d.ts"},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.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 + }, + "./main.ts": { + "original": { + "version": "-16105752451-export const x = 10;\n// SomeComment\n// SomeComment", + "signature": "-6821242887-export declare const x = 10;\n" + }, + "version": "-16105752451-export const x = 10;\n// SomeComment\n// SomeComment", + "signature": "-6821242887-export declare const x = 10;\n" + }, + "./other.ts": { + "original": { + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n" + }, + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n" + } + }, + "root": [ + [ + 2, + "./main.ts" + ], + [ + 3, + "./other.ts" + ] + ], + "options": { + "composite": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.ts" + ], + "latestChangedDtsFile": "./other.d.ts" + }, + "version": "FakeTSVersion", + "size": 898 +} + +//// [/user/username/projects/myproject/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; +// SomeComment +// SomeComment + + +//// [/user/username/projects/myproject/other.js] file written with same contents + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/myproject/main.ts: *new* + {} +/user/username/projects/myproject/other.ts: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject: *new* + {} + +Program root files: [ + "/user/username/projects/myproject/main.ts", + "/user/username/projects/myproject/other.ts" +] +Program options: { + "composite": true, + "configFilePath": "/user/username/projects/myproject/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/main.ts +/user/username/projects/myproject/other.ts + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/myproject/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/myproject/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Checking if output is same as EmitAndSemanticDiagnosticsBuilderProgram:: +Output file text for /user/username/projects/myproject/main.js is same:: true +Output file text for /user/username/projects/myproject/main.d.ts is same:: true +Output file text for /user/username/projects/myproject/other.js is same:: true +Output file text for /user/username/projects/myproject/other.d.ts is same:: true +Output file text for /user/username/projects/myproject/tsconfig.tsbuildinfo is same:: true diff --git a/tests/baselines/reference/tscWatch/watchApi/noEmitOnError-with-composite-with-emit-builder.js b/tests/baselines/reference/tscWatch/watchApi/noEmitOnError-with-composite-with-emit-builder.js new file mode 100644 index 0000000000000..9b87ec06cc643 --- /dev/null +++ b/tests/baselines/reference/tscWatch/watchApi/noEmitOnError-with-composite-with-emit-builder.js @@ -0,0 +1,509 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/user/username/projects/myproject/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "noEmitOnError": true + } +} + +//// [/user/username/projects/myproject/main.ts] +export const x: string = 10; + +//// [/user/username/projects/myproject/other.ts] +export const y = 10; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + + +tsc --w +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +user/username/projects/myproject/main.ts:1:14 - error TS2322: Type 'number' is not assignable to type 'string'. + +1 export const x: string = 10; +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.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},"-8089124208-export const x: string = 10;","-13729955264-export const y = 10;"],"root":[2,3],"options":{"composite":true,"noEmitOnError":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,[2,[{"file":"./main.ts","start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],3],"affectedFilesPendingEmit":[2,3],"emitSignatures":[2,3]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.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 + }, + "./main.ts": { + "version": "-8089124208-export const x: string = 10;", + "signature": "-8089124208-export const x: string = 10;" + }, + "./other.ts": { + "version": "-13729955264-export const y = 10;", + "signature": "-13729955264-export const y = 10;" + } + }, + "root": [ + [ + 2, + "./main.ts" + ], + [ + 3, + "./other.ts" + ] + ], + "options": { + "composite": true, + "noEmitOnError": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + [ + "./main.ts", + [ + { + "file": "./main.ts", + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'number' is not assignable to type 'string'." + } + ] + ], + "./other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./main.ts", + "Js | Dts" + ], + [ + "./other.ts", + "Js | Dts" + ] + ], + "emitSignatures": [ + "./main.ts", + "./other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 912 +} + + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/myproject/main.ts: *new* + {} +/user/username/projects/myproject/other.ts: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject: *new* + {} + +Program root files: [ + "/user/username/projects/myproject/main.ts", + "/user/username/projects/myproject/other.ts" +] +Program options: { + "composite": true, + "noEmitOnError": true, + "configFilePath": "/user/username/projects/myproject/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/main.ts +/user/username/projects/myproject/other.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/myproject/main.ts +/user/username/projects/myproject/other.ts + +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/myproject/main.ts (used version) +/user/username/projects/myproject/other.ts (used version) + +exitCode:: ExitStatus.undefined + +Change:: Add comment + +Input:: +//// [/user/username/projects/myproject/main.ts] +export const x: string = 10; +// SomeComment + + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches *deleted*:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/main.ts: + {} +/user/username/projects/myproject/other.ts: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject: + {} + +tsc --w +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +user/username/projects/myproject/main.ts:1:14 - error TS2322: Type 'number' is not assignable to type 'string'. + +1 export const x: string = 10; +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.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":"-5691975201-export const x: string = 10;\n// SomeComment","signature":"-10161843860-export declare const x: string;\n"},"-13729955264-export const y = 10;"],"root":[2,3],"options":{"composite":true,"noEmitOnError":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,[2,[{"file":"./main.ts","start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],3],"affectedFilesPendingEmit":[2,3],"emitSignatures":[2,3]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.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 + }, + "./main.ts": { + "original": { + "version": "-5691975201-export const x: string = 10;\n// SomeComment", + "signature": "-10161843860-export declare const x: string;\n" + }, + "version": "-5691975201-export const x: string = 10;\n// SomeComment", + "signature": "-10161843860-export declare const x: string;\n" + }, + "./other.ts": { + "version": "-13729955264-export const y = 10;", + "signature": "-13729955264-export const y = 10;" + } + }, + "root": [ + [ + 2, + "./main.ts" + ], + [ + 3, + "./other.ts" + ] + ], + "options": { + "composite": true, + "noEmitOnError": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + [ + "./main.ts", + [ + { + "file": "./main.ts", + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'number' is not assignable to type 'string'." + } + ] + ], + "./other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./main.ts", + "Js | Dts" + ], + [ + "./other.ts", + "Js | Dts" + ] + ], + "emitSignatures": [ + "./main.ts", + "./other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1001 +} + + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/myproject/main.ts: *new* + {} +/user/username/projects/myproject/other.ts: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject: *new* + {} + +Program root files: [ + "/user/username/projects/myproject/main.ts", + "/user/username/projects/myproject/other.ts" +] +Program options: { + "composite": true, + "noEmitOnError": true, + "configFilePath": "/user/username/projects/myproject/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/main.ts +/user/username/projects/myproject/other.ts + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/myproject/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/myproject/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: Fix error + +Input:: +//// [/user/username/projects/myproject/main.ts] +export const x = 10; + + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches *deleted*:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/main.ts: + {} +/user/username/projects/myproject/other.ts: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject: + {} + +tsc --w +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.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":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n"},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"}],"root":[2,3],"options":{"composite":true,"noEmitOnError":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./other.d.ts"},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.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 + }, + "./main.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" + }, + "./other.ts": { + "original": { + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n" + }, + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n" + } + }, + "root": [ + [ + 2, + "./main.ts" + ], + [ + 3, + "./other.ts" + ] + ], + "options": { + "composite": true, + "noEmitOnError": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.ts" + ], + "latestChangedDtsFile": "./other.d.ts" + }, + "version": "FakeTSVersion", + "size": 887 +} + +//// [/user/username/projects/myproject/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + + +//// [/user/username/projects/myproject/main.d.ts] +export declare const x = 10; + + +//// [/user/username/projects/myproject/other.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.y = void 0; +exports.y = 10; + + +//// [/user/username/projects/myproject/other.d.ts] +export declare const y = 10; + + + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/myproject/main.ts: *new* + {} +/user/username/projects/myproject/other.ts: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject: *new* + {} + +Program root files: [ + "/user/username/projects/myproject/main.ts", + "/user/username/projects/myproject/other.ts" +] +Program options: { + "composite": true, + "noEmitOnError": true, + "configFilePath": "/user/username/projects/myproject/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/main.ts +/user/username/projects/myproject/other.ts + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/myproject/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/myproject/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/watchApi/noEmitOnError-with-composite-with-semantic-builder.js b/tests/baselines/reference/tscWatch/watchApi/noEmitOnError-with-composite-with-semantic-builder.js new file mode 100644 index 0000000000000..d752daa95949f --- /dev/null +++ b/tests/baselines/reference/tscWatch/watchApi/noEmitOnError-with-composite-with-semantic-builder.js @@ -0,0 +1,530 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/user/username/projects/myproject/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "noEmitOnError": true + } +} + +//// [/user/username/projects/myproject/main.ts] +export const x: string = 10; + +//// [/user/username/projects/myproject/other.ts] +export const y = 10; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + + +tsc --w +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +user/username/projects/myproject/main.ts:1:14 - error TS2322: Type 'number' is not assignable to type 'string'. + +1 export const x: string = 10; +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.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},"-8089124208-export const x: string = 10;","-13729955264-export const y = 10;"],"root":[2,3],"options":{"composite":true,"noEmitOnError":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,[2,[{"file":"./main.ts","start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],3],"affectedFilesPendingEmit":[2,3],"emitSignatures":[2,3]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.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 + }, + "./main.ts": { + "version": "-8089124208-export const x: string = 10;", + "signature": "-8089124208-export const x: string = 10;" + }, + "./other.ts": { + "version": "-13729955264-export const y = 10;", + "signature": "-13729955264-export const y = 10;" + } + }, + "root": [ + [ + 2, + "./main.ts" + ], + [ + 3, + "./other.ts" + ] + ], + "options": { + "composite": true, + "noEmitOnError": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + [ + "./main.ts", + [ + { + "file": "./main.ts", + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'number' is not assignable to type 'string'." + } + ] + ], + "./other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./main.ts", + "Js | Dts" + ], + [ + "./other.ts", + "Js | Dts" + ] + ], + "emitSignatures": [ + "./main.ts", + "./other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 912 +} + + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/myproject/main.ts: *new* + {} +/user/username/projects/myproject/other.ts: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject: *new* + {} + +Program root files: [ + "/user/username/projects/myproject/main.ts", + "/user/username/projects/myproject/other.ts" +] +Program options: { + "composite": true, + "noEmitOnError": true, + "configFilePath": "/user/username/projects/myproject/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/main.ts +/user/username/projects/myproject/other.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/myproject/main.ts +/user/username/projects/myproject/other.ts + +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/myproject/main.ts (used version) +/user/username/projects/myproject/other.ts (used version) + +exitCode:: ExitStatus.undefined + +Checking if output is same as EmitAndSemanticDiagnosticsBuilderProgram:: +Output file text for /user/username/projects/myproject/main.js is same:: true +Output file text for /user/username/projects/myproject/main.d.ts is same:: true +Output file text for /user/username/projects/myproject/other.js is same:: true +Output file text for /user/username/projects/myproject/other.d.ts is same:: true +Output file text for /user/username/projects/myproject/tsconfig.tsbuildinfo is same:: true + +Change:: Add comment + +Input:: +//// [/user/username/projects/myproject/main.ts] +export const x: string = 10; +// SomeComment + + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches *deleted*:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/main.ts: + {} +/user/username/projects/myproject/other.ts: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject: + {} + +tsc --w +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +user/username/projects/myproject/main.ts:1:14 - error TS2322: Type 'number' is not assignable to type 'string'. + +1 export const x: string = 10; +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.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":"-5691975201-export const x: string = 10;\n// SomeComment","signature":"-10161843860-export declare const x: string;\n"},"-13729955264-export const y = 10;"],"root":[2,3],"options":{"composite":true,"noEmitOnError":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,[2,[{"file":"./main.ts","start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],3],"affectedFilesPendingEmit":[2,3],"emitSignatures":[2,3]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.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 + }, + "./main.ts": { + "original": { + "version": "-5691975201-export const x: string = 10;\n// SomeComment", + "signature": "-10161843860-export declare const x: string;\n" + }, + "version": "-5691975201-export const x: string = 10;\n// SomeComment", + "signature": "-10161843860-export declare const x: string;\n" + }, + "./other.ts": { + "version": "-13729955264-export const y = 10;", + "signature": "-13729955264-export const y = 10;" + } + }, + "root": [ + [ + 2, + "./main.ts" + ], + [ + 3, + "./other.ts" + ] + ], + "options": { + "composite": true, + "noEmitOnError": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + [ + "./main.ts", + [ + { + "file": "./main.ts", + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'number' is not assignable to type 'string'." + } + ] + ], + "./other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./main.ts", + "Js | Dts" + ], + [ + "./other.ts", + "Js | Dts" + ] + ], + "emitSignatures": [ + "./main.ts", + "./other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 1001 +} + + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/myproject/main.ts: *new* + {} +/user/username/projects/myproject/other.ts: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject: *new* + {} + +Program root files: [ + "/user/username/projects/myproject/main.ts", + "/user/username/projects/myproject/other.ts" +] +Program options: { + "composite": true, + "noEmitOnError": true, + "configFilePath": "/user/username/projects/myproject/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/main.ts +/user/username/projects/myproject/other.ts + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/myproject/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/myproject/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Checking if output is same as EmitAndSemanticDiagnosticsBuilderProgram:: +Output file text for /user/username/projects/myproject/main.js is same:: true +Output file text for /user/username/projects/myproject/main.d.ts is same:: true +Output file text for /user/username/projects/myproject/other.js is same:: true +Output file text for /user/username/projects/myproject/other.d.ts is same:: true +Output file text for /user/username/projects/myproject/tsconfig.tsbuildinfo is same:: true + +Change:: Fix error + +Input:: +//// [/user/username/projects/myproject/main.ts] +export const x = 10; + + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches *deleted*:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/main.ts: + {} +/user/username/projects/myproject/other.ts: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject: + {} + +tsc --w +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.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":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n"},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"}],"root":[2,3],"options":{"composite":true,"noEmitOnError":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./other.d.ts"},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.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 + }, + "./main.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" + }, + "./other.ts": { + "original": { + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n" + }, + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n" + } + }, + "root": [ + [ + 2, + "./main.ts" + ], + [ + 3, + "./other.ts" + ] + ], + "options": { + "composite": true, + "noEmitOnError": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.ts" + ], + "latestChangedDtsFile": "./other.d.ts" + }, + "version": "FakeTSVersion", + "size": 887 +} + +//// [/user/username/projects/myproject/main.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.x = void 0; +exports.x = 10; + + +//// [/user/username/projects/myproject/main.d.ts] +export declare const x = 10; + + +//// [/user/username/projects/myproject/other.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.y = void 0; +exports.y = 10; + + +//// [/user/username/projects/myproject/other.d.ts] +export declare const y = 10; + + + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/myproject/main.ts: *new* + {} +/user/username/projects/myproject/other.ts: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject: *new* + {} + +Program root files: [ + "/user/username/projects/myproject/main.ts", + "/user/username/projects/myproject/other.ts" +] +Program options: { + "composite": true, + "noEmitOnError": true, + "configFilePath": "/user/username/projects/myproject/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/main.ts +/user/username/projects/myproject/other.ts + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/myproject/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/myproject/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Checking if output is same as EmitAndSemanticDiagnosticsBuilderProgram:: +Output file text for /user/username/projects/myproject/main.js is same:: true +Output file text for /user/username/projects/myproject/main.d.ts is same:: true +Output file text for /user/username/projects/myproject/other.js is same:: true +Output file text for /user/username/projects/myproject/other.d.ts is same:: true +Output file text for /user/username/projects/myproject/tsconfig.tsbuildinfo is same:: true diff --git a/tests/baselines/reference/tscWatch/watchApi/semantic-builder-emitOnlyDts.js b/tests/baselines/reference/tscWatch/watchApi/semantic-builder-emitOnlyDts.js new file mode 100644 index 0000000000000..52fdf6f1400ba --- /dev/null +++ b/tests/baselines/reference/tscWatch/watchApi/semantic-builder-emitOnlyDts.js @@ -0,0 +1,337 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Input:: +//// [/user/username/projects/myproject/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "noEmitOnError": true + } +} + +//// [/user/username/projects/myproject/main.ts] +export const x: string = 10; + +//// [/user/username/projects/myproject/other.ts] +export const y = 10; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + + +tsc --w +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +user/username/projects/myproject/main.ts:1:14 - error TS2322: Type 'number' is not assignable to type 'string'. + +1 export const x: string = 10; +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.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},"-8089124208-export const x: string = 10;","-13729955264-export const y = 10;"],"root":[2,3],"options":{"composite":true,"noEmitOnError":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,[2,[{"file":"./main.ts","start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]],3],"affectedFilesPendingEmit":[2,3],"emitSignatures":[2,3]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.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 + }, + "./main.ts": { + "version": "-8089124208-export const x: string = 10;", + "signature": "-8089124208-export const x: string = 10;" + }, + "./other.ts": { + "version": "-13729955264-export const y = 10;", + "signature": "-13729955264-export const y = 10;" + } + }, + "root": [ + [ + 2, + "./main.ts" + ], + [ + 3, + "./other.ts" + ] + ], + "options": { + "composite": true, + "noEmitOnError": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + [ + "./main.ts", + [ + { + "file": "./main.ts", + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'number' is not assignable to type 'string'." + } + ] + ], + "./other.ts" + ], + "affectedFilesPendingEmit": [ + [ + "./main.ts", + "Js | Dts" + ], + [ + "./other.ts", + "Js | Dts" + ] + ], + "emitSignatures": [ + "./main.ts", + "./other.ts" + ] + }, + "version": "FakeTSVersion", + "size": 912 +} + + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/myproject/main.ts: *new* + {} +/user/username/projects/myproject/other.ts: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject: *new* + {} + +Program root files: [ + "/user/username/projects/myproject/main.ts", + "/user/username/projects/myproject/other.ts" +] +Program options: { + "composite": true, + "noEmitOnError": true, + "configFilePath": "/user/username/projects/myproject/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/main.ts +/user/username/projects/myproject/other.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/myproject/main.ts +/user/username/projects/myproject/other.ts + +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/myproject/main.ts (used version) +/user/username/projects/myproject/other.ts (used version) + +exitCode:: ExitStatus.undefined + +Change:: Fix error + +Input:: +//// [/user/username/projects/myproject/main.ts] +export const x = 10; + + +PolledWatches *deleted*:: +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches *deleted*:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/main.ts: + {} +/user/username/projects/myproject/other.ts: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject: + {} + +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"fileNames":["../../../../a/lib/lib.d.ts","./main.ts","./other.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":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n"},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"}],"root":[2,3],"options":{"composite":true,"noEmitOnError":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,2,3],"affectedFilesPendingEmit":[[2,1],[3,1]],"latestChangedDtsFile":"./other.d.ts"},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.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 + }, + "./main.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" + }, + "./other.ts": { + "original": { + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n" + }, + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n" + } + }, + "root": [ + [ + 2, + "./main.ts" + ], + [ + 3, + "./other.ts" + ] + ], + "options": { + "composite": true, + "noEmitOnError": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./main.ts", + "./other.ts" + ], + "affectedFilesPendingEmit": [ + [ + [ + "./main.ts" + ], + "Js" + ], + [ + [ + "./other.ts" + ], + "Js" + ] + ], + "latestChangedDtsFile": "./other.d.ts" + }, + "version": "FakeTSVersion", + "size": 928 +} + +//// [/user/username/projects/myproject/main.d.ts] +export declare const x = 10; + + +//// [/user/username/projects/myproject/other.d.ts] +export declare const y = 10; + + + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/myproject/main.ts: *new* + {} +/user/username/projects/myproject/other.ts: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject: *new* + {} + +Program root files: [ + "/user/username/projects/myproject/main.ts", + "/user/username/projects/myproject/other.ts" +] +Program options: { + "composite": true, + "noEmitOnError": true, + "configFilePath": "/user/username/projects/myproject/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/main.ts +/user/username/projects/myproject/other.ts + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/myproject/main.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/myproject/main.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tscWatch/watchApi/when-emitting-with-emitOnlyDtsFiles.js b/tests/baselines/reference/tscWatch/watchApi/when-emitting-with-emitOnlyDtsFiles.js new file mode 100644 index 0000000000000..33f346a090d1d --- /dev/null +++ b/tests/baselines/reference/tscWatch/watchApi/when-emitting-with-emitOnlyDtsFiles.js @@ -0,0 +1,458 @@ +currentDirectory:: /user/username/projects/myproject useCaseSensitiveFileNames: false +Input:: +//// [/user/username/projects/myproject/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "noEmitOnError": true, + "module": "amd" + }, + "files": [ + "a.ts", + "b.ts" + ] +} + +//// [/user/username/projects/myproject/a.ts] +export const x = 10; + +//// [/user/username/projects/myproject/b.ts] +export const y: 10 = 20; + +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + + +/a/lib/tsc.js --w --extendedDiagnostics +Output:: +[HH:MM:SS AM] Starting compilation in watch mode... + +Current directory: /user/username/projects/myproject CaseSensitiveFileNames: false +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined Config file +Synchronizing program +CreatingProgramWith:: + roots: ["/user/username/projects/myproject/a.ts","/user/username/projects/myproject/b.ts"] + options: {"composite":true,"noEmitOnError":true,"module":2,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/a.ts 250 undefined Source file +FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/b.ts 250 undefined Source file +FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 250 undefined Source file +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Type roots +DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Type roots +Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Type roots +b.ts:1:14 - error TS2322: Type '20' is not assignable to type '10'. + +1 export const y: 10 = 20; +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"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},"-10726455937-export const x = 10;","-11268290852-export const y: 10 = 20;"],"root":[2,3],"options":{"composite":true,"module":2,"noEmitOnError":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,2,[3,[{"file":"./b.ts","start":13,"length":1,"code":2322,"category":1,"messageText":"Type '20' is not assignable to type '10'."}]]],"affectedFilesPendingEmit":[2,3],"emitSignatures":[2,3]},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./a.ts", + "./b.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 + }, + "./a.ts": { + "version": "-10726455937-export const x = 10;", + "signature": "-10726455937-export const x = 10;" + }, + "./b.ts": { + "version": "-11268290852-export const y: 10 = 20;", + "signature": "-11268290852-export const y: 10 = 20;" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "composite": true, + "module": 2, + "noEmitOnError": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./a.ts", + [ + "./b.ts", + [ + { + "file": "./b.ts", + "start": 13, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type '20' is not assignable to type '10'." + } + ] + ] + ], + "affectedFilesPendingEmit": [ + [ + "./a.ts", + "Js | Dts" + ], + [ + "./b.ts", + "Js | Dts" + ] + ], + "emitSignatures": [ + "./a.ts", + "./b.ts" + ] + }, + "version": "FakeTSVersion", + "size": 902 +} + + +PolledWatches:: +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/myproject/a.ts: *new* + {} +/user/username/projects/myproject/b.ts: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +Program root files: [ + "/user/username/projects/myproject/a.ts", + "/user/username/projects/myproject/b.ts" +] +Program options: { + "composite": true, + "noEmitOnError": true, + "module": 2, + "extendedDiagnostics": true, + "configFilePath": "/user/username/projects/myproject/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/a.ts +/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 (used version) +/user/username/projects/myproject/b.ts (used version) + +exitCode:: ExitStatus.undefined + +Change:: Fix error but run emit with emitOnlyDts + +Input:: +//// [/user/username/projects/myproject/b.ts] +export const y = 10; + + +Output:: +FileWatcher:: Triggered with /user/username/projects/myproject/b.ts 1:: WatchInfo: /user/username/projects/myproject/b.ts 250 undefined Source file +Scheduling update +Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/b.ts 1:: WatchInfo: /user/username/projects/myproject/b.ts 250 undefined Source file + + +Timeout callback:: count: 1 +1: timerToUpdateProgram *new* + +Before running Timeout callback:: count: 1 +1: timerToUpdateProgram + +After running Timeout callback:: count: 0 +Output:: +Synchronizing program +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +CreatingProgramWith:: + roots: ["/user/username/projects/myproject/a.ts","/user/username/projects/myproject/b.ts"] + options: {"composite":true,"noEmitOnError":true,"module":2,"extendedDiagnostics":true,"configFilePath":"/user/username/projects/myproject/tsconfig.json"} + + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"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":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n"},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"}],"root":[2,3],"options":{"composite":true,"module":2,"noEmitOnError":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,2,3],"affectedFilesPendingEmit":[[2,1],[3,1]],"latestChangedDtsFile":"./b.d.ts"},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./a.ts", + "./b.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 + }, + "./a.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" + }, + "./b.ts": { + "original": { + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n" + }, + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "composite": true, + "module": 2, + "noEmitOnError": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "affectedFilesPendingEmit": [ + [ + [ + "./a.ts" + ], + "Js" + ], + [ + [ + "./b.ts" + ], + "Js" + ] + ], + "latestChangedDtsFile": "./b.d.ts" + }, + "version": "FakeTSVersion", + "size": 928 +} + +//// [/user/username/projects/myproject/a.d.ts] +export declare const x = 10; + + +//// [/user/username/projects/myproject/b.d.ts] +export declare const y = 10; + + + + +Program root files: [ + "/user/username/projects/myproject/a.ts", + "/user/username/projects/myproject/b.ts" +] +Program options: { + "composite": true, + "noEmitOnError": true, + "module": 2, + "extendedDiagnostics": true, + "configFilePath": "/user/username/projects/myproject/tsconfig.json" +} +Program structureReused: Completely +Program files:: +/a/lib/lib.d.ts +/user/username/projects/myproject/a.ts +/user/username/projects/myproject/b.ts + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/myproject/b.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/myproject/b.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: Emit with emitOnlyDts shouldnt emit anything + +Input:: + + +Program: Same as old program + +BuilderProgram: Same as old builder program + +exitCode:: ExitStatus.undefined + +Change:: Emit all files + +Input:: +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo] +{"program":{"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":"-10726455937-export const x = 10;","signature":"-6821242887-export declare const x = 10;\n"},{"version":"-13729955264-export const y = 10;","signature":"-7152472870-export declare const y = 10;\n"}],"root":[2,3],"options":{"composite":true,"module":2,"noEmitOnError":true},"referencedMap":[],"semanticDiagnosticsPerFile":[1,2,3],"latestChangedDtsFile":"./b.d.ts"},"version":"FakeTSVersion"} + +//// [/user/username/projects/myproject/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "program": { + "fileNames": [ + "../../../../a/lib/lib.d.ts", + "./a.ts", + "./b.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 + }, + "./a.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" + }, + "./b.ts": { + "original": { + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n" + }, + "version": "-13729955264-export const y = 10;", + "signature": "-7152472870-export declare const y = 10;\n" + } + }, + "root": [ + [ + 2, + "./a.ts" + ], + [ + 3, + "./b.ts" + ] + ], + "options": { + "composite": true, + "module": 2, + "noEmitOnError": true + }, + "referencedMap": {}, + "semanticDiagnosticsPerFile": [ + "../../../../a/lib/lib.d.ts", + "./a.ts", + "./b.ts" + ], + "latestChangedDtsFile": "./b.d.ts" + }, + "version": "FakeTSVersion", + "size": 887 +} + +//// [/user/username/projects/myproject/a.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.x = void 0; + exports.x = 10; +}); + + +//// [/user/username/projects/myproject/b.js] +define(["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.y = void 0; + exports.y = 10; +}); + + + + +Program: Same as old program + +BuilderProgram: Same as old builder program + +exitCode:: ExitStatus.undefined + +Change:: Emit with emitOnlyDts shouldnt emit anything + +Input:: + + +Program: Same as old program + +BuilderProgram: Same as old builder program + +exitCode:: ExitStatus.undefined + +Change:: Emit full should not emit anything + +Input:: + + +Program: Same as old program + +BuilderProgram: Same as old builder program + +exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsserver/moduleResolution/alternateResult.js b/tests/baselines/reference/tsserver/moduleResolution/alternateResult.js index 61fd420bfb5dd..095fcb43e04e3 100644 --- a/tests/baselines/reference/tsserver/moduleResolution/alternateResult.js +++ b/tests/baselines/reference/tsserver/moduleResolution/alternateResult.js @@ -394,8 +394,10 @@ Info seq [hh:mm:ss:mss] Files (4) Default library for target 'es5' node_modules/foo2/index.d.ts Imported via "foo2" from file 'index.mts' with packageId 'foo2/index.d.ts@1.0.0' + File is CommonJS module because 'node_modules/foo2/package.json' does not have field "type" node_modules/@types/bar2/index.d.ts Imported via "bar2" from file 'index.mts' with packageId '@types/bar2/index.d.ts@1.0.0' + File is CommonJS module because 'node_modules/@types/bar2/package.json' does not have field "type" index.mts Part of 'files' list in tsconfig.json @@ -2157,10 +2159,13 @@ Info seq [hh:mm:ss:mss] Files (5) Default library for target 'es5' node_modules/@types/bar/index.d.ts Imported via "bar" from file 'index.mts' with packageId '@types/bar/index.d.ts@1.0.0' + File is CommonJS module because 'node_modules/@types/bar/package.json' does not have field "type" node_modules/foo2/index.d.ts Imported via "foo2" from file 'index.mts' with packageId 'foo2/index.d.ts@1.0.0' + File is CommonJS module because 'node_modules/foo2/package.json' does not have field "type" node_modules/@types/bar2/index.d.ts Imported via "bar2" from file 'index.mts' with packageId '@types/bar2/index.d.ts@1.0.0' + File is CommonJS module because 'node_modules/@types/bar2/package.json' does not have field "type" index.mts Part of 'files' list in tsconfig.json @@ -2478,12 +2483,16 @@ Info seq [hh:mm:ss:mss] Files (6) Default library for target 'es5' node_modules/foo/index.d.ts Imported via "foo" from file 'index.mts' with packageId 'foo/index.d.ts@1.0.0' + File is CommonJS module because 'node_modules/foo/package.json' does not have field "type" node_modules/@types/bar/index.d.ts Imported via "bar" from file 'index.mts' with packageId '@types/bar/index.d.ts@1.0.0' + File is CommonJS module because 'node_modules/@types/bar/package.json' does not have field "type" node_modules/foo2/index.d.ts Imported via "foo2" from file 'index.mts' with packageId 'foo2/index.d.ts@1.0.0' + File is CommonJS module because 'node_modules/foo2/package.json' does not have field "type" node_modules/@types/bar2/index.d.ts Imported via "bar2" from file 'index.mts' with packageId '@types/bar2/index.d.ts@1.0.0' + File is CommonJS module because 'node_modules/@types/bar2/package.json' does not have field "type" index.mts Part of 'files' list in tsconfig.json @@ -2869,10 +2878,13 @@ Info seq [hh:mm:ss:mss] Files (5) Default library for target 'es5' node_modules/foo/index.d.ts Imported via "foo" from file 'index.mts' with packageId 'foo/index.d.ts@1.0.0' + File is CommonJS module because 'node_modules/foo/package.json' does not have field "type" node_modules/@types/bar/index.d.ts Imported via "bar" from file 'index.mts' with packageId '@types/bar/index.d.ts@1.0.0' + File is CommonJS module because 'node_modules/@types/bar/package.json' does not have field "type" node_modules/foo2/index.d.ts Imported via "foo2" from file 'index.mts' with packageId 'foo2/index.d.ts@1.0.0' + File is CommonJS module because 'node_modules/foo2/package.json' does not have field "type" index.mts Part of 'files' list in tsconfig.json @@ -3246,8 +3258,10 @@ Info seq [hh:mm:ss:mss] Files (4) Default library for target 'es5' node_modules/foo/index.d.ts Imported via "foo" from file 'index.mts' with packageId 'foo/index.d.ts@1.0.0' + File is CommonJS module because 'node_modules/foo/package.json' does not have field "type" node_modules/@types/bar/index.d.ts Imported via "bar" from file 'index.mts' with packageId '@types/bar/index.d.ts@1.0.0' + File is CommonJS module because 'node_modules/@types/bar/package.json' does not have field "type" index.mts Part of 'files' list in tsconfig.json diff --git a/tests/cases/compiler/esmNoSynthesizedDefault.ts b/tests/cases/compiler/esmNoSynthesizedDefault.ts deleted file mode 100644 index 17fcea5f883c2..0000000000000 --- a/tests/cases/compiler/esmNoSynthesizedDefault.ts +++ /dev/null @@ -1,18 +0,0 @@ -// @target: esnext -// @module: preserve, esnext -// @moduleResolution: bundler - -// @Filename: /node_modules/mdast-util-to-string/package.json -{ "type": "module" } - -// @Filename: /node_modules/mdast-util-to-string/index.d.ts -export function toString(): string; - -// @Filename: /index.ts -import mdast, { toString } from 'mdast-util-to-string'; -mdast; -mdast.toString(); - -const mdast2 = await import('mdast-util-to-string'); -mdast2.toString(); -mdast2.default; diff --git a/tests/cases/compiler/impliedNodeFormatEmit1.ts b/tests/cases/compiler/impliedNodeFormatEmit1.ts deleted file mode 100644 index 6fd41c8c32ac4..0000000000000 --- a/tests/cases/compiler/impliedNodeFormatEmit1.ts +++ /dev/null @@ -1,39 +0,0 @@ -// @allowJs: true -// @checkJs: true -// @outDir: dist -// @module: esnext, commonjs, amd, system, umd, preserve -// @moduleResolution: bundler -// @noTypesAndSymbols: true - -// @Filename: /a.ts -export const _ = 0; - -// @Filename: /b.mts -export const _ = 0; - -// @Filename: /c.cts -export const _ = 0; - -// @Filename: /d.js -export const _ = 0; - -// @Filename: /e.mjs -export const _ = 0; - -// @Filename: /f.mjs -export const _ = 0; - -// @Filename: /g.ts -import {} from "./a"; -import a = require("./a"); - -// @Filename: /h.mts -import {} from "./a"; -import a = require("./a"); - -// @Filename: /i.cts -import {} from "./a"; -import a = require("./a"); - -// @Filename: /dummy.ts -export {}; diff --git a/tests/cases/compiler/impliedNodeFormatEmit2.ts b/tests/cases/compiler/impliedNodeFormatEmit2.ts deleted file mode 100644 index 851fbd748a790..0000000000000 --- a/tests/cases/compiler/impliedNodeFormatEmit2.ts +++ /dev/null @@ -1,42 +0,0 @@ -// @allowJs: true -// @checkJs: true -// @outDir: dist -// @module: esnext, commonjs, preserve -// @moduleResolution: bundler -// @noTypesAndSymbols: true - -// @Filename: /package.json -{} - -// @Filename: /a.ts -export const _ = 0; - -// @Filename: /b.mts -export const _ = 0; - -// @Filename: /c.cts -export const _ = 0; - -// @Filename: /d.js -export const _ = 0; - -// @Filename: /e.mjs -export const _ = 0; - -// @Filename: /f.mjs -export const _ = 0; - -// @Filename: /g.ts -import {} from "./a"; -import a = require("./a"); - -// @Filename: /h.mts -import {} from "./a"; -import a = require("./a"); - -// @Filename: /i.cts -import {} from "./a"; -import a = require("./a"); - -// @Filename: /dummy.ts -export {}; diff --git a/tests/cases/compiler/impliedNodeFormatEmit3.ts b/tests/cases/compiler/impliedNodeFormatEmit3.ts deleted file mode 100644 index 459d542e26e0d..0000000000000 --- a/tests/cases/compiler/impliedNodeFormatEmit3.ts +++ /dev/null @@ -1,44 +0,0 @@ -// @allowJs: true -// @checkJs: true -// @outDir: dist -// @module: esnext, commonjs, preserve -// @moduleResolution: bundler -// @noTypesAndSymbols: true - -// @Filename: /package.json -{ - "type": "module" -} - -// @Filename: /a.ts -export const _ = 0; - -// @Filename: /b.mts -export const _ = 0; - -// @Filename: /c.cts -export const _ = 0; - -// @Filename: /d.js -export const _ = 0; - -// @Filename: /e.mjs -export const _ = 0; - -// @Filename: /f.mjs -export const _ = 0; - -// @Filename: /g.ts -import {} from "./a"; -import a = require("./a"); - -// @Filename: /h.mts -import {} from "./a"; -import a = require("./a"); - -// @Filename: /i.cts -import {} from "./a"; -import a = require("./a"); - -// @Filename: /dummy.ts -export {}; diff --git a/tests/cases/compiler/impliedNodeFormatEmit4.ts b/tests/cases/compiler/impliedNodeFormatEmit4.ts deleted file mode 100644 index 769510c6c0ce9..0000000000000 --- a/tests/cases/compiler/impliedNodeFormatEmit4.ts +++ /dev/null @@ -1,44 +0,0 @@ -// @allowJs: true -// @checkJs: true -// @outDir: dist -// @module: esnext, commonjs, preserve -// @moduleResolution: bundler -// @noTypesAndSymbols: true - -// @Filename: /package.json -{ - "type": "commonjs" -} - -// @Filename: /a.ts -export const _ = 0; - -// @Filename: /b.mts -export const _ = 0; - -// @Filename: /c.cts -export const _ = 0; - -// @Filename: /d.js -export const _ = 0; - -// @Filename: /e.mjs -export const _ = 0; - -// @Filename: /f.mjs -export const _ = 0; - -// @Filename: /g.ts -import {} from "./a"; -import a = require("./a"); - -// @Filename: /h.mts -import {} from "./a"; -import a = require("./a"); - -// @Filename: /i.cts -import {} from "./a"; -import a = require("./a"); - -// @Filename: /dummy.ts -export {}; diff --git a/tests/cases/compiler/impliedNodeFormatInterop1.ts b/tests/cases/compiler/impliedNodeFormatInterop1.ts deleted file mode 100644 index c4e18c0ddc0e9..0000000000000 --- a/tests/cases/compiler/impliedNodeFormatInterop1.ts +++ /dev/null @@ -1,27 +0,0 @@ -// @module: es2020 -// @moduleResolution: node10 -// @esModuleInterop: true - -// @Filename: /node_modules/highlight.js/package.json -{ - "name": "highlight.js", - "type": "commonjs", - "types": "index.d.ts" -} - -// @Filename: /node_modules/highlight.js/index.d.ts -declare module "highlight.js" { - export interface HighlightAPI { - highlight(code: string): string; - } - const hljs: HighlightAPI; - export default hljs; -} - -// @Filename: /node_modules/highlight.js/lib/core.d.ts -import hljs from "highlight.js"; -export default hljs; - -// @Filename: /index.ts -import hljs from "highlight.js/lib/core"; -hljs.highlight("code"); diff --git a/tests/cases/compiler/modulePreserve4.ts b/tests/cases/compiler/modulePreserve4.ts index 9a7014852eefa..9eabe664bb88c 100644 --- a/tests/cases/compiler/modulePreserve4.ts +++ b/tests/cases/compiler/modulePreserve4.ts @@ -106,8 +106,5 @@ const f2 = require("./f.cjs"); // { default: 0 } import g1 from "./g"; // { default: 0 } const g2 = require("./g"); // { default: 0 } -// @Filename: /main4.cjs -exports.x = require("./g"); - // @Filename: /dummy.ts export {}; // Silly test harness diff --git a/tests/cases/conformance/moduleResolution/conditionalExportsResolutionFallback.ts b/tests/cases/conformance/moduleResolution/conditionalExportsResolutionFallback.ts index 26fe08e88fb11..d9a1d480b8ef3 100644 --- a/tests/cases/conformance/moduleResolution/conditionalExportsResolutionFallback.ts +++ b/tests/cases/conformance/moduleResolution/conditionalExportsResolutionFallback.ts @@ -1,4 +1,3 @@ -// @module: esnext // @moduleResolution: node16,nodenext,bundler // @traceResolution: true // @allowJs: true diff --git a/tests/cases/conformance/moduleResolution/customConditions.ts b/tests/cases/conformance/moduleResolution/customConditions.ts index 0533574c6c230..47fb048ac28bf 100644 --- a/tests/cases/conformance/moduleResolution/customConditions.ts +++ b/tests/cases/conformance/moduleResolution/customConditions.ts @@ -1,4 +1,3 @@ -// @module: preserve // @moduleResolution: bundler // @customConditions: webpack, browser // @resolvePackageJsonExports: true, false diff --git a/tests/cases/conformance/moduleResolution/resolvesWithoutExportsDiagnostic1.ts b/tests/cases/conformance/moduleResolution/resolvesWithoutExportsDiagnostic1.ts index 57430c902655d..d01bb47a75ca8 100644 --- a/tests/cases/conformance/moduleResolution/resolvesWithoutExportsDiagnostic1.ts +++ b/tests/cases/conformance/moduleResolution/resolvesWithoutExportsDiagnostic1.ts @@ -1,4 +1,3 @@ -// @module: preserve // @moduleResolution: bundler,node16 // @strict: true // @noTypesAndSymbols: true